Skip to content

Commit

Permalink
feat(helm): add "deployment" mode in helm value
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Sep 1, 2023
1 parent 151dc19 commit ba6492c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/actions/deploy-operator/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ runs:
helm install emqx-operator deploy/charts/emqx-operator\
--set image.repository=$repository \
--set image.tag=$tag \
--set development=true \
--namespace emqx-operator-system \
--create-namespace
kubectl patch -n emqx-operator-system deployment emqx-operator-controller-manager \
--type=json \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--zap-devel=true"}]'
- name: Check operator
shell: bash
run: kubectl wait --for=condition=Ready pods -l "control-plane=controller-manager" -n emqx-operator-system
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ jobs:
run: |
helm install emqx-operator deploy/charts/emqx-operator \
--set image.tag=${{ github.sha }} \
--set development=true \
--namespace emqx-operator-system \
--create-namespace
kubectl patch -n emqx-operator-system deployment emqx-operator-controller-manager \
--type=json \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--zap-devel=true"}]'
- name: Check operator
timeout-minutes: 5
run: kubectl wait --for=condition=Ready pods -l "control-plane=controller-manager" -n emqx-operator-system
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
--namespace emqx-operator-system \
--create-namespace \
--set image.tag=${{ github.sha }} \
--set development=true \
--debug
- name: Check operator
env:
Expand Down
1 change: 0 additions & 1 deletion config/samples/emqx/v2beta1/emqx-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ spec:
spec:
replicas: 2
volumeClaimTemplates:
storageClassName: standard
resources:
requests:
storage: 20Mi
Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/emqx-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.2.2-rc.1
version: 2.2.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.2.2-rc.1
appVersion: 2.2.2
2 changes: 2 additions & 0 deletions deploy/charts/emqx-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The following table lists the configurable parameters of the cert-manager chart

| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `skipCRDs` | If `true`, skips installing CRDs | `false` |
| `development` | Development configures the logger to use a Zap development config (stacktraces on warnings, no sampling), otherwise a Zap production config will be used (stacktraces on errors, sampling). | `false` |
| `image.repository` | Image repository | `emqx/emqx-operator-controller` |
| `image.tag` | Image tag | `{{RELEASE_VERSION}}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
- --leader-elect
- --metrics-bind-address=:8080
- --health-probe-bind-address=:8081
- --zap-devel={{ .Values.development }}
command:
- /manager
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
5 changes: 5 additions & 0 deletions deploy/charts/emqx-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

skipCRDs: false

# Development configures the logger to use a Zap development config
# (stacktraces on warnings, no sampling), otherwise a Zap production
# config will be used (stacktraces on errors, sampling).
development: false

replicaCount: 1

image:
Expand Down

0 comments on commit ba6492c

Please sign in to comment.