forked from janus-idp/helm-backstage
-
Notifications
You must be signed in to change notification settings - Fork 40
feat(orchestrator-infra): add OLM v1 ClusterExtension install path (RHIDP-14789) #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rm3l
merged 27 commits into
redhat-developer:main
from
Fortune-Ndlovu:feat/RHIDP-14789-orchestrator-infra-olm-v1
Sep 22, 2026
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
4c9336d
feat(orchestrator-infra): add OLM v1 ClusterExtension install path
Fortune-Ndlovu 120070a
fix(orchestrator-infra): resolve OLM v1 install failures on cluster
Fortune-Ndlovu b48f58a
fix(orchestrator-infra): defer Knative CRs on OLM v1 install path
Fortune-Ndlovu 8759870
chore(orchestrator-infra): align docs/schema and drop NOTES.txt changes
Fortune-Ndlovu 121d33d
docs(orchestrator-infra): simplify OLM installation README text
Fortune-Ndlovu d4b66d6
fix(orchestrator-infra): address Qodo review findings for OLM v1 path
Fortune-Ndlovu c83f8ec
fix(orchestrator-infra): fix CRD hooks for chart-testing upgrade path
Fortune-Ndlovu 21d1301
fix(orchestrator-infra): restore Knative CRDs under crds/ unchanged
Fortune-Ndlovu 5b84aec
fix(orchestrator-infra): use OLM API name in helm test
Fortune-Ndlovu dbb6b4c
fix(orchestrator-infra): address Qodo review items 1, 4, and 5 (#543)
Fortune-Ndlovu 098f5e3
fix(orchestrator-infra): fix CI pre-commit and CRD upgrade path
Fortune-Ndlovu 64d9c5a
fix(orchestrator-infra): provision Knative CRs via post-install hooks
Fortune-Ndlovu ffaacd3
fix(orchestrator-infra): run Knative provisioning on post-upgrade
Fortune-Ndlovu de929fc
fix(orchestrator-infra): add memory limits to Knative hook jobs
Fortune-Ndlovu 60e6711
chore(orchestrator-infra): regenerate README with helm-docs
Fortune-Ndlovu b35f83c
refactor(orchestrator-infra): simplify OLM v1 path to ClusterExtensio…
Fortune-Ndlovu 73d522f
Merge branch 'main' into feat/RHIDP-14789-orchestrator-infra-olm-v1
Fortune-Ndlovu b882606
fix(orchestrator-infra): remove auto olmVersion to support ArgoCD
Fortune-Ndlovu d38b528
Merge branch 'main' into feat/RHIDP-14789-orchestrator-infra-olm-v1
Fortune-Ndlovu 687e864
fix(orchestrator-infra): remove all lookup and Capabilities.APIVersio…
Fortune-Ndlovu 7187acc
fix(orchestrator-infra): add Helm ownership metadata to namespaces fo…
Fortune-Ndlovu dc0ac55
fix(orchestrator-infra): prevent duplicate namespace creation
Fortune-Ndlovu cf4487a
fix(orchestrator-infra): remove Helm ownership metadata from namespaces
Fortune-Ndlovu 34288c8
fix(orchestrator-infra): address PR review feedback
Fortune-Ndlovu c9d6a0b
docs: update references from files/ to crds/ directory
Fortune-Ndlovu 8d4abd2
fix(orchestrator-infra): add createNamespace flag to avoid adoption e…
Fortune-Ndlovu c596528
docs: regenerate README with helm-docs
Fortune-Ndlovu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,13 @@ | ||
| {{/* Helper functions */}} | ||
|
|
||
| {{- define "unmanaged-resource-exists" -}} | ||
| {{- $api := index . 0 -}} | ||
| {{- $kind := index . 1 -}} | ||
| {{- $namespace := index . 2 -}} | ||
| {{- $name := index . 3 -}} | ||
| {{- $releaseName := index . 4 -}} | ||
| {{- $apiCapabilities := index . 5 -}} | ||
| {{- $unmanagedSubscriptionExists := "true" -}} | ||
| {{- if $apiCapabilities.Has (printf "%s/%s" $api $kind) }} | ||
| {{- $existingOperator := lookup $api $kind $namespace $name -}} | ||
| {{- if empty $existingOperator -}} | ||
| {{- "false" -}} | ||
| {{- else -}} | ||
| {{- $isManagedResource := include "is-managed-resource" (list $existingOperator $releaseName) -}} | ||
| {{- if eq $isManagedResource "true" -}} | ||
| {{- "false" -}} | ||
| {{- else -}} | ||
| {{- "true" -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- else -}} | ||
| {{- "false" -}} | ||
| {{- end -}} | ||
| {{- define "olm-version" -}} | ||
| {{- $requested := default "v0" .Values.olmVersion -}} | ||
| {{- $requested -}} | ||
| {{- end -}} | ||
|
|
||
| {{- define "is-managed-resource" -}} | ||
| {{- $resource := index . 0 -}} | ||
| {{- $releaseName := index . 1 -}} | ||
| {{- $resourceReleaseName := dig "metadata" "annotations" (dict "meta.helm.sh/release-name" "NA") $resource -}} | ||
| {{- if eq (get $resourceReleaseName "meta.helm.sh/release-name") $releaseName -}} | ||
| {{- "true" -}} | ||
| {{- else -}} | ||
| {{- "false" -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- define "csv-version" -}} | ||
| {{- $csv := index . 0 -}} | ||
| {{- $packageName := index . 1 -}} | ||
| {{- $version := trimPrefix (printf "%s." $packageName) $csv -}} | ||
| {{- trimPrefix "v" $version -}} | ||
| {{- end -}} |
55 changes: 55 additions & 0 deletions
55
charts/orchestrator-infra/templates/serverless-logic/clusterextension.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| {{- $packageName := .Values.serverlessLogicOperator.subscription.spec.name -}} | ||
| {{- $namespace := .Values.serverlessLogicOperator.subscription.namespace -}} | ||
| {{- $serviceAccountName := .Values.serverlessLogicOperator.clusterExtension.serviceAccount.name -}} | ||
| {{- if and (eq (include "olm-version" .) "v1") .Values.serverlessLogicOperator.enabled }} | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ $serviceAccountName }} | ||
| namespace: {{ $namespace }} | ||
| annotations: | ||
| meta.helm.sh/release-name: {{ .Release.Name }} | ||
| meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: {{ $packageName }}-installer-binding | ||
| annotations: | ||
| meta.helm.sh/release-name: {{ .Release.Name }} | ||
| meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: cluster-admin | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ $serviceAccountName }} | ||
| namespace: {{ $namespace }} | ||
| --- | ||
| apiVersion: olm.operatorframework.io/v1 | ||
| kind: ClusterExtension | ||
| metadata: | ||
| name: {{ $packageName }} | ||
| annotations: | ||
| meta.helm.sh/release-name: {{ .Release.Name }} | ||
| meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| install: | ||
| preflight: | ||
| crdUpgradeSafety: | ||
| enforcement: None | ||
| namespace: {{ $namespace }} | ||
| serviceAccount: | ||
| name: {{ $serviceAccountName }} | ||
| source: | ||
| sourceType: Catalog | ||
| catalog: | ||
| packageName: {{ $packageName }} | ||
| channels: | ||
| - {{ .Values.serverlessLogicOperator.subscription.spec.channel }} | ||
| version: {{ include "csv-version" (list .Values.serverlessLogicOperator.subscription.spec.startingCSV $packageName) | quote }} | ||
| selector: | ||
| {{- toYaml .Values.olm.catalog.selector | nindent 8 }} | ||
| upgradeConstraintPolicy: CatalogProvided | ||
| {{- end }} |
5 changes: 3 additions & 2 deletions
5
charts/orchestrator-infra/templates/serverless-logic/namespace.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| {{- $unmanagedNamespaceExists := include "unmanaged-resource-exists" (list "v1" "Namespace" "" .Values.serverlessLogicOperator.subscription.namespace .Release.Name .Capabilities.APIVersions) }} | ||
| {{- if and (eq $unmanagedNamespaceExists "false") .Values.serverlessLogicOperator.enabled }} | ||
| {{- if and .Values.serverlessLogicOperator.enabled .Values.serverlessLogicOperator.createNamespace (ne .Values.serverlessLogicOperator.subscription.namespace .Values.serverlessOperator.subscription.namespace) }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: {{ .Values.serverlessLogicOperator.subscription.namespace }} | ||
| annotations: | ||
| "helm.sh/resource-policy": keep | ||
| {{- end }} |
2 changes: 1 addition & 1 deletion
2
charts/orchestrator-infra/templates/serverless-logic/operator-group.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
charts/orchestrator-infra/templates/serverless-logic/subscription.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| {{- $unmanagedSubscriptionExists := include "unmanaged-resource-exists" (list "operators.coreos.com/v1alpha1" "Subscription" .Values.serverlessLogicOperator.subscription.namespace .Values.serverlessLogicOperator.subscription.spec.name .Release.Name .Capabilities.APIVersions ) }} | ||
| {{- if and (eq $unmanagedSubscriptionExists "false") .Values.serverlessLogicOperator.enabled }} | ||
| {{- $packageName := .Values.serverlessLogicOperator.subscription.spec.name -}} | ||
| {{- $subscriptionNamespace := .Values.serverlessLogicOperator.subscription.namespace -}} | ||
| {{- if and (eq (include "olm-version" .) "v0") .Values.serverlessLogicOperator.enabled }} | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: {{ .Values.serverlessLogicOperator.subscription.spec.name }} | ||
| namespace: {{ .Values.serverlessLogicOperator.subscription.namespace }} | ||
| name: {{ $packageName }} | ||
| namespace: {{ $subscriptionNamespace }} | ||
| spec: | ||
| {{- toYaml .Values.serverlessLogicOperator.subscription.spec | nindent 2 }} | ||
| {{- end }} |
54 changes: 54 additions & 0 deletions
54
charts/orchestrator-infra/templates/serverless/clusterextension.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| {{- $packageName := .Values.serverlessOperator.subscription.spec.name -}} | ||
| {{- $namespace := .Values.serverlessOperator.subscription.namespace -}} | ||
| {{- $serviceAccountName := .Values.serverlessOperator.clusterExtension.serviceAccount.name -}} | ||
| {{- if and (eq (include "olm-version" .) "v1") .Values.serverlessOperator.enabled }} | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ $serviceAccountName }} | ||
| namespace: {{ $namespace }} | ||
| annotations: | ||
| meta.helm.sh/release-name: {{ .Release.Name }} | ||
| meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: {{ $packageName }}-installer-binding | ||
| annotations: | ||
| meta.helm.sh/release-name: {{ .Release.Name }} | ||
| meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: cluster-admin | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ $serviceAccountName }} | ||
| namespace: {{ $namespace }} | ||
| --- | ||
| apiVersion: olm.operatorframework.io/v1 | ||
| kind: ClusterExtension | ||
| metadata: | ||
| name: {{ $packageName }} | ||
| annotations: | ||
| meta.helm.sh/release-name: {{ .Release.Name }} | ||
| meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| install: | ||
| preflight: | ||
| crdUpgradeSafety: | ||
| enforcement: None | ||
| namespace: {{ $namespace }} | ||
| serviceAccount: | ||
| name: {{ $serviceAccountName }} | ||
| source: | ||
| sourceType: Catalog | ||
| catalog: | ||
| packageName: {{ $packageName }} | ||
| channels: | ||
| - {{ .Values.serverlessOperator.subscription.spec.channel }} | ||
| selector: | ||
| {{- toYaml .Values.olm.catalog.selector | nindent 8 }} | ||
| upgradeConstraintPolicy: CatalogProvided | ||
| {{- end }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we can have both OLM v0 and v1 running in the same cluster, I think it might be worth adding a separate CI values file testing with
olmVersion: v1. But that can be addressed in a followup issue/PR.