Skip to content

Commit 2bf6558

Browse files
authored
updated chart to use globals for CPD spec (#355)
Signed-off-by: Henry Li <[email protected]>
1 parent 4c1cca7 commit 2bf6558

File tree

6 files changed

+22
-24
lines changed

6 files changed

+22
-24
lines changed

helm-cluster-scoped/templates/01-cluster-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ metadata:
3131
subjects:
3232
- kind: ServiceAccount
3333
name: ibm-namespace-scope-operator
34-
namespace: {{ .Values.operatorNamespace }}
34+
namespace: {{ .Values.global.operatorNamespace }}
3535
roleRef:
3636
apiGroup: rbac.authorization.k8s.io
3737
kind: ClusterRole

helm-cluster-scoped/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
imagePullPrefix: icr.io
2-
imagePullSecret: ibm-entitlement-key
1+
# imagePullPrefix: icr.io
2+
# imagePullSecret: ibm-entitlement-key
33
imageRegistryNamespaceOperator: cpopen
44
imageRegistryNamespaceOperand: cpopen/cpfs
55

6-
operatorNamespace: "helm-operators"
6+
# operatorNamespace: ""

helm/templates/00-rbac.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kind: Role
22
apiVersion: rbac.authorization.k8s.io/v1
33
metadata:
44
name: ibm-namespace-scope-operator
5-
namespace: {{ .Values.operatorNamespace }}
5+
namespace: {{ .Values.global.operatorNamespace }}
66
rules:
77
- verbs:
88
- create
@@ -80,11 +80,11 @@ kind: RoleBinding
8080
apiVersion: rbac.authorization.k8s.io/v1
8181
metadata:
8282
name: ibm-namespace-scope-operator
83-
namespace: {{ .Values.operatorNamespace }}
83+
namespace: {{ .Values.global.operatorNamespace }}
8484
subjects:
8585
- kind: ServiceAccount
8686
name: ibm-namespace-scope-operator
87-
namespace: {{ .Values.operatorNamespace }}
87+
namespace: {{ .Values.global.operatorNamespace }}
8888
roleRef:
8989
apiGroup: rbac.authorization.k8s.io
9090
kind: Role
@@ -98,4 +98,4 @@ metadata:
9898
app.kubernetes.io/managed-by: ibm-namespace-scope-operator
9999
app.kubernetes.io/name: ibm-namespace-scope-operator
100100
name: ibm-namespace-scope-operator
101-
namespace: {{ .Values.operatorNamespace }}
101+
namespace: {{ .Values.global.operatorNamespace }}

helm/templates/01-operator-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kind: Deployment
22
apiVersion: apps/v1
33
metadata:
44
name: ibm-namespace-scope-operator
5-
namespace: {{ .Values.operatorNamespace }}
5+
namespace: {{ .Values.global.operatorNamespace }}
66
labels:
77
app.kubernetes.io/instance: ibm-namespace-scope-operator
88
app.kubernetes.io/managed-by: ibm-namespace-scope-operator
@@ -50,7 +50,7 @@ spec:
5050
]
5151
capabilities: Seamless Upgrades
5252
productName: IBM Cloud Platform Common Services
53-
containerImage: '{{ .Values.imagePullPrefix }}/{{ .Values.imageRegistryNamespaceOperator }}/ibm-namespace-scope-operator:4.2.12'
53+
containerImage: '{{ .Values.global.imagePullPrefix }}/{{ .Values.imageRegistryNamespaceOperator }}/ibm-namespace-scope-operator:4.2.12'
5454
productMetric: FREE
5555
spec:
5656
restartPolicy: Always
@@ -70,7 +70,7 @@ spec:
7070
terminationGracePeriodSeconds: 10
7171
securityContext: {}
7272
imagePullSecrets:
73-
- name: {{ .Values.imagePullSecret }}
73+
- name: {{ .Values.global.imagePullSecret }}
7474
containers:
7575
- resources:
7676
limits:
@@ -104,7 +104,7 @@ spec:
104104
type: RuntimeDefault
105105
imagePullPolicy: IfNotPresent
106106
terminationMessagePolicy: File
107-
image: '{{ .Values.imagePullPrefix }}/{{ .Values.imageRegistryNamespaceOperator }}/ibm-namespace-scope-operator:4.2.12'
107+
image: '{{ .Values.global.imagePullPrefix }}/{{ .Values.imageRegistryNamespaceOperator }}/ibm-namespace-scope-operator:4.2.12'
108108
serviceAccount: ibm-namespace-scope-operator
109109
dnsPolicy: ClusterFirst
110110
strategy:

helm/templates/02-nss-cr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ metadata:
44
labels:
55
foundationservices.cloudpak.ibm.com: nss
66
name: common-service
7-
namespace: {{ .Values.operatorNamespace }}
7+
namespace: {{ .Values.global.operatorNamespace }}
88
spec:
99
csvInjector:
1010
enable: true
1111
license:
12-
accept: true
12+
accept: {{ .Values.global.licenseAccept }}
1313
namespaceMembers:
14-
- {{ .Values.operatorNamespace }}
15-
- {{ .Values.servicesNamespace }}
14+
- {{ .Values.global.operatorNamespace }}
15+
- {{ .Values.global.instanceNamespace }}
1616
{{- range $i, $v := $.Values.tenantNamespaces }}
1717
- {{ $v }}
1818
{{- end }}

helm/values.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
imagePullPrefix: icr.io
2-
imagePullSecret: ibm-entitlement-key
1+
# imagePullPrefix: icr.io
2+
# imagePullSecret: ibm-entitlement-key
33
#include all namespaces in the tenant in this list object including the operator and services namespace
44
tenantNamespaces:
5-
- <tenant namespace 1>
6-
- <tenant namespace 2>
5+
- ""
6+
- ""
77
#etc
88
imageRegistryNamespaceOperator: cpopen
99
imageRegistryNamespaceOperand: cpopen/cpfs
1010

11-
operatorImage: ibm-namespace-scope-operator
12-
13-
operatorNamespace: "helm-operators"
14-
servicesNamespace: "helm-services"
11+
# operatorNamespace: ""
12+
# servicesNamespace: ""

0 commit comments

Comments
 (0)