Skip to content

SDCICD-1958 move leftover unreferenced base manifests from argo centr… - #236

Merged
maknop merged 1 commit into
openshift-online:mainfrom
ritmun:SDCICD-1958-move-base
Sep 2, 2026
Merged

SDCICD-1958 move leftover unreferenced base manifests from argo centr…#236
maknop merged 1 commit into
openshift-online:mainfrom
ritmun:SDCICD-1958-move-base

Conversation

@maknop

@maknop maknop commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move leftover unreferenced base manifests to owner repo.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Team

Run ID: 250af4d2-61ea-4ba4-8035-5184f3aebedf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@maknop
maknop enabled auto-merge September 2, 2026 15:15
@jsell-rh

jsell-rh commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Amber review: comment

Amber review

Status: Complete

View the submitted review.

@jsell-rh jsell-rh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

This PR adds six base manifests (api-server, control-plane, RBAC, service, configmap, network policies) copied from the Argo central repo into deploy/base/, with correct restrictive SecurityContexts and no Go code changes. My concerns are structural: the new files duplicate the existing kustomize-referenced base manifests with divergent values, are not wired into any kustomization, and are missing the ServiceAccount/ClusterRoleBinding that would make the control-plane copy functional if applied as-is. Because these are unreferenced reference manifests owned externally, I'm landing on COMMENT rather than blocking, but the duplication/drift and the RBAC gap deserve a maintainer decision before merge.

Findings

[Major] Second, unsynchronized source of truth for base manifests. The new deploy/base/api-server/deployment.yaml, deploy/base/control-plane/deployment.yaml, deploy/base/control-plane/service.yaml, deploy/base/control-plane/rbac/clusterrole.yaml, and deploy/base/platform/networkpolicies.yaml duplicate the already-referenced deploy/base/api-server.yaml, controller.yaml, controller-rbac.yaml, and networkpolicies.yaml, but with divergent values: service/deployment name hypershell-control-plane vs hypershell-controller; provisioner target hypershell-control-plane:9443 vs hypershell-controller:9443; secret hypershell-db vs hypershell-db-app; health port 4434 vs 8434; db-name file /secrets/name vs /secrets/dbname; and the new ClusterRole omits the route.openshift.io/routes/custom-host rule present in controller-rbac.yaml. None of the new files are listed in deploy/base/kustomization.yaml, so they are orphaned in-repo. Two divergent copies of the same components will drift. Please document which set is authoritative (or consolidate).

[Major] Control-plane copy is missing its ServiceAccount and ClusterRoleBinding. deploy/base/control-plane/deployment.yaml sets serviceAccountName: hypershell-control-plane, and deploy/base/control-plane/rbac/clusterrole.yaml defines a ClusterRole named hypershell-controller, but this PR adds no ServiceAccount and no ClusterRoleBinding tying the role to the SA. Applied as-is, the control-plane pod would run with an unbound service account and every reconcile would be RBAC-denied. Confirm the SA and binding are provided in the owner repo (and that the binding subject/namespace match hypershell-control-plane).

[Minor] Environment-specific values baked into a base layer. deploy/base/control-plane/deployment.yaml hardcodes HYPERSHELL_NAMESPACE: hypershell-stage and GATEWAY_API_BASE_DOMAIN: openshell.stage.devshift.net. Base manifests should be environment-agnostic and set these via overlays / downward API, per the config-separate-from-code convention.

[Minor] Mutable :latest image tags. The api-server and control-plane deployments pin hypershell-api-server-main:latest / hypershell-control-plane-main:latest, while the gateway images are digest-pinned. Mutable tags make rollouts non-reproducible; prefer digest pinning.

Cross-PR coordination

Two open pull requests are concurrently editing the exact base manifests this PR duplicates, which forces a source-of-truth decision:

  • #232 adds the bind verb to deploy/base/controller-rbac.yaml and switches HYPERSHELL_NAMESPACE to a downward-API fieldRef in deploy/base/controller.yaml. This PR's parallel copies (control-plane/rbac/clusterrole.yaml, control-plane/deployment.yaml) do not include the bind verb and hardcode hypershell-stage. Maintainers must decide which copy is authoritative; otherwise #232's RBAC fix and namespace change are silently absent from these new manifests.
  • #211 adds --metrics-server-bindaddress to deploy/base/api-server.yaml and an Egress rule to the provisioner NetworkPolicy in deploy/base/networkpolicies.yaml. The corresponding new copies here (platform/networkpolicies.yaml) lack the Egress rule, so the same divergence applies.

These are not mere text merge conflicts: they are competing copies of the same components, and a decision is needed on which layout is canonical and whether concurrent edits must be replicated into the new files (and in what merge order).

Findings Summary (highest severity first)

  1. [Major] Duplicate, divergent, unreferenced base manifests create a second source of truth - Spec Consistency / Maintainability
  2. [Major] Control-plane copy missing ServiceAccount + ClusterRoleBinding for hypershell-control-plane - Reconciliation / RBAC
  3. [Minor] Stage-specific values hardcoded in base layer - Config separate from code
  4. [Minor] Mutable :latest image tags - Reproducibility

Convention Checklist

Convention Result
Restricted SecurityContext on all containers Pass
Image references consistent across the stack Fail
Config separate from code Fail
Base manifests wired into kustomization Fail
RBAC binding present for service account Fail

labels:
app: hypershell-control-plane
spec:
serviceAccountName: hypershell-control-plane

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sets serviceAccountName: hypershell-control-plane, but this PR adds no ServiceAccount by that name and no ClusterRoleBinding tying the hypershell-controller ClusterRole (in rbac/clusterrole.yaml) to it. Applied as-is, the control-plane pod would run unbound and every reconcile would be RBAC-denied. Confirm the SA + binding exist in the owner repo with matching name/namespace.

- name: HYPERSHELL_API_SERVER_URL
value: "http://hypershell-api-server:8000"
- name: HYPERSHELL_NAMESPACE
value: "hypershell-stage"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stage-specific values (hypershell-stage here, openshell.stage.devshift.net below) are hardcoded into a base manifest. Base layers should be environment-agnostic; set namespace via the downward API (as #232 does for the referenced controller.yaml) and domain via an overlay, per config-separate-from-code.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: hypershell-controller

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ClusterRole duplicates deploy/base/controller-rbac.yaml but has already diverged: it omits the route.openshift.io/routes/custom-host rule the referenced copy has, and there is no accompanying ClusterRoleBinding or ServiceAccount here. If this copy becomes authoritative, the controller loses the ability to set spec.host on Routes and runs unbound. Note #232 also adds a bind verb to the referenced copy that is missing here.

volumes:
- name: db-secrets
secret:
secretName: hypershell-db

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Divergence from the referenced deploy/base/api-server.yaml: secret name is hypershell-db here vs hypershell-db-app there, health port is 4434 vs 8434, and the db-name file is /secrets/name vs /secrets/dbname. Two copies of the same Deployment with different values will drift. Please clarify which is canonical.

serviceAccountName: hypershell-api-server
initContainers:
- name: migrate
image: quay.io/redhat-services-prod/hcm-eng-prod-tenant/hypershell-main/hypershell-api-server-main:latest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mutable :latest tag makes rollouts non-reproducible; the gateway images in the control-plane manifest are digest-pinned. Prefer pinning by digest here too (and in the control-plane deployment).

@@ -0,0 +1,125 @@
---

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates deploy/base/networkpolicies.yaml (which is kustomization-referenced) with divergences: no namespace, and the provisioner policy targets app: hypershell-control-plane instead of hypershell-controller. It also lacks the Egress rule #211 adds to the referenced copy. Confirm which network-policy set is authoritative to avoid drift.

@maknop
maknop added this pull request to the merge queue Sep 2, 2026
Merged via the queue into openshift-online:main with commit f35eb11 Sep 2, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants