Skip to content

Make the operator deployment GitOps/ArgoCD friendly #460

Open
simplyblock/documentation
#304

Description

@boddumanohar

Context

The operator can already be deployed declaratively: cluster and node activation is CR-driven (#459), and OLM installation through Red Hat's certified-operators catalog is supported and documented (OpenShift installation). What remains is making both install paths sync cleanly under ArgoCD. State below is as of main at 70cd946.

Done

  • OLM path exists: OperatorGroup + Subscription (channel: alpha, source: certified-operators). OLM owns the CRDs, so the CRD-lifecycle problem below does not apply on OpenShift.
  • templates/controlplane_configmap.yaml no longer uses lookup for the Prometheus config.
  • Core secrets already have a BYO skip via externallyManagedSecret.

Remaining

OLM path (OpenShift)

  1. Pinned Subscription. The documented Subscription defaults to installPlanApproval: Automatic with no startingCSV, so the installed version drifts from git. Document a pinned variant (Manual + startingCSV) and either an approval hook scoped to the pinned CSV or a documented approval step.
  2. Replace imperative prerequisites with manifests. oc adm policy add-scc-to-group privileged|anyuid and oc label namespace become a labeled Namespace and ClusterRoleBindings to system:openshift:scc:privileged / system:openshift:scc:anyuid.
  3. Sync ordering. Namespace/SCC bindings → OperatorGroup/Subscription → ControlPlane and other CRs. The CRs need the CRD, which exists only after the CSV is Succeeded, so the CR wave needs SkipDryRunOnMissingResource=true or a CSV health check.

Helm path (non-OpenShift)

  1. CRDs out of crds/. The simplyblock CRDs are still in helm-charts/charts/simplyblock-operator/crds/, which Helm/Argo applies once and never upgrades. Move to templates/crds/ with argocd.argoproj.io/sync-wave: "-1" and helm.sh/resource-policy: keep, and update helm-charts/scripts/sync-from-operator.sh so make helm-sync produces the new layout.
  2. lookup calls that misbehave under helm template (Argo renders them as empty):
    • templates/_control_center_helpers.tpl:59 (sbcc.operatorUrl): always renders empty under Argo, so the console returns 503 on operator-backed screens unless controlCenter.operatorUrl is set. Functional bug; fix first (e.g. default from the release's own values instead of a live lookup).
    • templates/validate-controlplane.yaml:47 (deployment.profile=empty guard) and :69 (guard against pruning an old release's control plane and FoundationDB): silently never fire under Argo. Not a drift source, but the FoundationDB protection does not exist there; document it or move the check into the operator.

Both paths

  1. Example ArgoCD manifests. An Application for each path (Helm chart; Namespace + SCC bindings + OperatorGroup + Subscription + CRs), with sync waves. None exist today.
  2. (Optional) Observability secrets skip. templates/controlplane_secret.yaml always renders simplyblock-grafana-secrets and simplyblock-graylog-secret when observability is enabled; add a skip matching externallyManagedSecret.
  3. Ops CR guidance. Document that hand-authored *Ops CRs should not be auto-synced or self-healed.

Suggested order

5 (operatorUrl) and 4 are cheap and fix real Helm bugs independent of Argo. 1–3 are mostly documentation. 6 once there is a concrete consumer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlowoperator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions