Skip to content

Commit e937516

Browse files
authored
Add customer namespace labels per operator (redhat-cop#655)
* Add namespace label * Bump operators-installer version to 3.3 * Add test-install-operator-with-namespace-labels.yaml
1 parent 99be7ae commit e937516

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

charts/operators-installer/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 3.2.4
19+
version: 3.3.0
2020

2121
home: https://github.com/redhat-cop/helm-charts
2222

charts/operators-installer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ For all of the Subscription parameters see
3939
| operatorGroups | `[]` | No | Optional list of configuration for OperatorGroups. If this is not supplied then it is assumed OperatorGroups are already in place in the selected `operators[].namespace`s.
4040
| operatorGroups[].name | `.Release.Namespace` | No | Name of the OperatorGroup & Namespace the OperatorGroup will be placed in.
4141
| operatorGroups[].createNamespace | `false` | No | If `true` create the Namespace of the same name of the OperatorGroup. If `false` assumed the Namespace is already in place.
42+
| operatorGroups[].namespaceLabels | `{}` | No | Labels to add to the created OperatorGroup namespace.
4243
| operatorGroups[].targetOwnNamespace | `false` | No | If `true` add the OperatorGroup's Namespace as a `targetNamespaces`. If `true` then OperatorGroup will only work for Operators using `OwnNamespace` or `MultiNamespace` `installModes`. If blank and no `otherTargetNamespaces` specified then OperatorGroup will be configured to allow for operators using `installModes` `AllNamespaces`.
4344
| operatorGroups[].otherTargetNamespaces | `[]` | No | List of additional Namespaces to target. If specified OperatorGroup will only work for operators using `SingleNamespace` or `MultiNamespace` `installModes` depending on value of `targetOwnNamespace`.
4445
| installPlanApproverAndVerifyJobsImage | `registry.redhat.io/openshift4/ose-cli:v4.10` | Yes | Image to use for the InstallPlan Approver and Verify Jobs
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
approveManualInstallPlanViaHook: true
2+
3+
installPlanApproverAndVerifyJobsImage: quay.io/openshift/origin-cli:4.15
4+
5+
operators:
6+
- name: argocd-operator
7+
channel: alpha
8+
csv: argocd-operator.v0.6.0
9+
installPlanApproval: Manual
10+
source: operatorhubio-catalog
11+
sourceNamespace: olm
12+
namespace: argocd-operator-with-namespace-labels
13+
installPlanVerifierActiveDeadlineSeconds: 1200
14+
operatorGroups:
15+
- name: argocd-operator-with-namespace-labels
16+
createNamespace: true
17+
targetOwnNamespace: true
18+
otherTargetNamespaces:
19+
namespaceLabels:
20+
pod-security.kubernetes.io/audit: privileged
21+
pod-security.kubernetes.io/enforce: privileged
22+
pod-security.kubernetes.io/warn: privileged

charts/operators-installer/templates/Namespace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
name: {{ .name | default $.Release.Namespace }}
88
labels:
99
{{- include "operators-installer.labels" $ | nindent 4 }}
10+
{{- if $operatorGroup.namespaceLabels }}
11+
{{ toYaml $operatorGroup.namespaceLabels | indent 4 }}
12+
{{- end }}
1013
annotations:
1114
argocd.argoproj.io/sync-wave: "-60"
1215
{{- end }}

0 commit comments

Comments
 (0)