File tree Expand file tree Collapse file tree 6 files changed +37
-27
lines changed Expand file tree Collapse file tree 6 files changed +37
-27
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,10 @@ bundle-build:
127127# Generate helm chart
128128helmchart : kustomize
129129 mkdir -p ./charts/${OPERATOR_NAME} /templates
130+ mkdir -p ./charts/${OPERATOR_NAME} /crds
130131 cp ./config/helmchart/templates/* ./charts/${OPERATOR_NAME} /templates
131132 $(KUSTOMIZE ) build ./config/helmchart | sed ' s/release-namespace/{{.Release.Namespace}}/' > ./charts/${OPERATOR_NAME} /templates/rbac.yaml
133+ $(KUSTOMIZE ) build ./config/crd > ./charts/${OPERATOR_NAME} /crds/crds.yaml
132134 version=${VERSION} envsubst < ./config/helmchart/Chart.yaml.tpl > ./charts/${OPERATOR_NAME} /Chart.yaml
133135 version=${VERSION} image_repo=$$ {IMG%:* } envsubst < ./config/helmchart/values.yaml.tpl > ./charts/${OPERATOR_NAME} /values.yaml
134136 helm lint ./charts/${OPERATOR_NAME}
Original file line number Diff line number Diff line change @@ -250,6 +250,29 @@ oc login --token ${token}
250250make run ENABLE_WEBHOOKS=false
251251` ` `
252252
253+ # ## Test helm chart locally
254+
255+ Define an image and tag. For example...
256+
257+ ` ` ` shell
258+ export imageRepository="quay.io/redhat-cop/namespace-configuration-operator"
259+ export imageTag="v1.0.2"
260+ ` ` `
261+
262+ Deploy chart...
263+
264+ ` ` ` shell
265+ make helmchart IMG=${imageRepository} VERSION=${imageTag}
266+ helm upgrade -i namespace-configuration-operator-local charts/namespace-configuration-operator -n namespace-configuration-operator-local --create-namespace
267+ ` ` `
268+
269+ Delete...
270+
271+ ` ` ` shell
272+ helm delete namespace-configuration-operator-local -n namespace-configuration-operator-local
273+ kubectl delete -f charts/namespace-configuration-operator/crds/crds.yaml
274+ ` ` `
275+
253276# ## Building/Pushing the operator image
254277
255278` ` ` shell
Original file line number Diff line number Diff line change @@ -50,14 +50,3 @@ Selector labels
5050app.kubernetes.io/name: { { include " namespace-configuration-operator.name" . } }
5151app.kubernetes.io/instance: { { .Release.Name } }
5252{ {- end } }
53-
54- { {/*
55- Create the name of the service account to use
56- */} }
57- { {- define " namespace-configuration-operator.serviceAccountName" -} }
58- { {- if .Values.serviceAccount.create } }
59- { {- default (include " namespace-configuration-operator.fullname" .) .Values.serviceAccount.name } }
60- { {- else } }
61- { {- default " default" .Values.serviceAccount.name } }
62- { {- end } }
63- { {- end } }
Original file line number Diff line number Diff line change 2222 imagePullSecrets :
2323 {{- toYaml . | nindent 8 }}
2424 {{- end }}
25- serviceAccountName : {{ include "namespace-configuration-operator.serviceAccountName" . }}
2625 containers :
2726 - command :
2827 - /manager
3332 name : {{ .Chart.Name }}
3433 resources :
3534 {{- toYaml .Values.resources | nindent 12 }}
35+ livenessProbe :
36+ httpGet :
37+ path : /healthz
38+ port : 8081
39+ initialDelaySeconds : 15
40+ periodSeconds : 20
41+ readinessProbe :
42+ httpGet :
43+ path : /readyz
44+ port : 8081
45+ initialDelaySeconds : 5
46+ periodSeconds : 10
3647 {{- with .Values.nodeSelector }}
3748 nodeSelector :
3849 {{- toYaml . | nindent 8 }}
Original file line number Diff line number Diff line change @@ -14,21 +14,9 @@ imagePullSecrets: []
1414nameOverride: ""
1515fullnameOverride: ""
1616
17- serviceAccount:
18- # Specifies whether a service account should be created
19- create: true
20- # Annotations to add to the service account
21- annotations: { }
22- # The name of the service account to use.
23- # If not set and create is true, a name is generated using the fullname template
24- name: ""
25-
2617podAnnotations: { }
2718
2819resources:
29- limits:
30- cpu: 100m
31- memory: 30Mi
3220 requests:
3321 cpu: 100m
3422 memory: 20Mi
Original file line number Diff line number Diff line change 4444 initialDelaySeconds : 5
4545 periodSeconds : 10
4646 resources :
47- limits :
48- cpu : 100m
49- memory : 30Mi
5047 requests :
5148 cpu : 100m
5249 memory : 20Mi
You can’t perform that action at this time.
0 commit comments