File tree Expand file tree Collapse file tree 4 files changed +25
-13
lines changed Expand file tree Collapse file tree 4 files changed +25
-13
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-helmchart-test charts/namespace-configuration-operator -n namespace-configuration-operator-local --create-namespace
267+ ` ` `
268+
269+ Delete...
270+
271+ ` ` ` shell
272+ helm delete namespace-configuration-operator-helmchart-test -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 2222 imagePullSecrets :
2323 {{- toYaml . | nindent 8 }}
2424 {{- end }}
25- serviceAccountName : {{ include "namespace-configuration-operator.serviceAccountName" . }}
2625 containers :
2726 - command :
2827 - /manager
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
You can’t perform that action at this time.
0 commit comments