Skip to content

Commit a0397a8

Browse files
Merge pull request #47 from olamilekan000/make-auth-file-configurable
make auth file configurable with secret
2 parents 2a005b0 + 871bbd3 commit a0397a8

10 files changed

Lines changed: 87 additions & 33 deletions

File tree

.github/workflows/lint-test.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Add Bitnami Charts Repo
2727
run: helm repo add bitnami https://charts.bitnami.com/bitnami
2828

29+
- name: Build chart dependencies
30+
run: helm dependency build
31+
2932
- name: Run chart-testing (list-changed)
3033
id: list-changed
3134
run: |
@@ -38,8 +41,16 @@ jobs:
3841
run: ct lint --config ct.yaml --all
3942

4043
- name: Create kind cluster
41-
uses: helm/kind-action@v1.2.0
44+
uses: helm/kind-action@v1.12.0
4245
if: steps.list-changed.outputs.changed == 'true'
4346

44-
- name: Run chart-testing (install)
45-
run: ct install --config ct.yaml
47+
# - name: Run chart-testing (install subcharts)
48+
# run: ct install --config ct.yaml
49+
50+
- name: Test main convoy chart installation
51+
if: steps.list-changed.outputs.changed == 'true'
52+
run: |
53+
echo "Testing main convoy chart with root values..."
54+
helm install convoy-test . --values values.yaml --timeout 300s --wait --wait-for-jobs --debug
55+
helm test convoy-test
56+
helm uninstall convoy-test

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Package and upload helm chart
4343
env:
44-
CR_TOKEN: ${{ secrets.PAT }}
44+
CR_TOKEN: ${{ secrets.TEMP_PAT }}
4545
CR_VERSION: "1.8.1"
4646
run: |
4747
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v${CR_VERSION}/chart-releaser_${CR_VERSION}_linux_amd64.tar.gz"

Chart.lock

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ dependencies:
66
repository: https://charts.bitnami.com/bitnami
77
version: 17.11.3
88
digest: sha256:2c6ff47eb9a3976dbdb1a5b762cdc4343ef1846f63a8f00a612c9da0336602b5
9-
generated: "2023-06-05T14:49:57.883606542+01:00"
9+
generated: "2025-10-07T05:58:55.875838+01:00"

Chart.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ dependencies:
2121
version: 17.11.3
2222
repository: https://charts.bitnami.com/bitnami
2323
condition: redis.enabled
24-

charts/agent/templates/deployment.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ spec:
9999
- name: CONVOY_DISPATCHER_CACERT_PATH
100100
value: "/etc/convoy/ca.crt"
101101
{{- end }}
102+
{{- if and .Values.env.auth.file.secret (ne .Values.env.auth.file.secret "") }}
103+
- name: CONVOY_BASIC_AUTH_CONFIG
104+
valueFrom:
105+
secretKeyRef:
106+
name: "{{ .Values.env.auth.file.secret }}"
107+
key: basic_auth_config
108+
{{- else if .Values.env.auth.file.basic }}
109+
- name: CONVOY_BASIC_AUTH_CONFIG
110+
value: {{ .Values.env.auth.file.basic | toJson | quote }}
111+
{{- end }}
102112

103113
{{- if .Values.global.externalDatabase.enabled }}
104114
- name: CONVOY_DB_SCHEME
@@ -183,7 +193,7 @@ spec:
183193
value: {{ .Values.env.smtp.url | quote }}
184194
- name: CONVOY_SMTP_USERNAME
185195
value: {{ .Values.env.smtp.username | quote }}
186-
{{- if ne .Values.env.smtp.secret "" }}
196+
{{- if and .Values.env.smtp.secret (ne .Values.env.smtp.secret "") }}
187197
- name: CONVOY_SMTP_PASSWORD
188198
valueFrom:
189199
secretKeyRef:
@@ -237,7 +247,7 @@ spec:
237247
value: {{ .Values.env.storage.s3.bucket | quote }}
238248
- name: CONVOY_STORAGE_AWS_ACCESS_KEY
239249
value: {{ .Values.env.storage.s3.accessKey | quote }}
240-
{{- if ne .Values.env.storage.s3.secret "" }}
250+
{{- if and .Values.env.storage.s3.secret (ne .Values.env.storage.s3.secret "") }}
241251
- name: CONVOY_STORAGE_AWS_SECRET_KEY
242252
valueFrom:
243253
secretKeyRef:

charts/agent/values.yaml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ global:
2020
read_replica_dsn: ""
2121

2222
externalDatabase:
23-
enabled: true
23+
enabled: false
2424
host: "postgresql"
2525
password: "postgres"
2626
database: "convoy"
@@ -40,13 +40,13 @@ global:
4040
externalRedis:
4141
enabled: false
4242
addresses: ""
43-
host: ""
44-
scheme: ""
43+
host: "redis-master"
44+
scheme: "redis"
4545
username: ""
4646
password: ""
4747
secret: ""
48-
database: ""
49-
port: ""
48+
database: "0"
49+
port: "6379"
5050

5151
app:
5252
replicaCount: 1
@@ -64,14 +64,22 @@ app:
6464
prometheus.io/port: "{{ .Values.app.port }}"
6565

6666
env:
67-
sign_up_enabled: false
68-
environment: ""
67+
environment: "oss"
6968
proxy: ""
69+
sign_up_enabled: false
7070
log_level: "error"
71+
auth:
72+
file:
73+
basic: []
74+
# -- If this secret parameter is not empty, basic auth inline value will be ignored. The basic auth config should be in the 'basic_auth_config' key
75+
secret: ""
7176
smtp:
72-
enabled: true
77+
enabled: false
7378
from: ""
79+
# -- Ignored in case of secret parameter with non-empty value
7480
password: ""
81+
# -- If this secret parameter is not empty, password value will be ignored. The password in the secret should be in the 'password' key
82+
secret: ""
7583
port: 0
7684
provider: ""
7785
url: ""
@@ -80,7 +88,7 @@ env:
8088
reply_to: ""
8189
tracer:
8290
enabled: false
83-
type: ""
91+
type: "otel"
8492
otel:
8593
otel_auth:
8694
header_name: ""
@@ -110,7 +118,10 @@ env:
110118
bucket: ""
111119
prefix: ""
112120
accessKey: ""
121+
# -- Ignored in case of secret parameter with non-empty value
113122
secretKey: ""
123+
# -- If this secret parameter is not empty, secretKey value will be ignored. The password in the secret should be in the 'secretKey' key
124+
secret: ""
114125
region: ""
115126
session_token: ""
116127
endpoint: ""
@@ -136,7 +147,7 @@ env:
136147
# - global.convoy.tag
137148
image:
138149
repository: getconvoy/convoy
139-
pullPolicy: Always
150+
pullPolicy: IfNotPresent
140151
tag: v25.9.2
141152

142153
nameOverride: "convoy-agent"
@@ -148,7 +159,7 @@ service:
148159

149160
autoscaling:
150161
enabled: true
151-
minReplicas: 1
162+
minReplicas: 2
152163
maxReplicas: 10
153164
targetCPUUtilizationPercentage: 80
154165
targetMemoryUtilizationPercentage: 80

charts/server/templates/deployment.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,16 @@ spec:
134134
{{- end }}
135135
- name: CONVOY_JWT_REALM_ENABLED
136136
value: {{ .Values.env.auth.jwt.enabled | quote }}
137-
{{- if .Values.env.auth.file.basic }}
137+
{{- if ne .Values.env.auth.file.secret "" }}
138+
- name: CONVOY_BASIC_AUTH_CONFIG
139+
valueFrom:
140+
secretKeyRef:
141+
name: "{{ .Values.env.auth.file.secret }}"
142+
key: basic_auth_config
143+
{{- else if .Values.env.auth.file.basic }}
138144
- name: CONVOY_BASIC_AUTH_CONFIG
139145
value: {{ .Values.env.auth.file.basic | toJson | quote }}
140-
{{ end }}
146+
{{- end }}
141147

142148
{{- if .Values.global.externalDatabase.enabled }}
143149
- name: CONVOY_DB_SCHEME

charts/server/values.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ global:
2020
read_replica_dsn: ""
2121

2222
externalDatabase:
23-
enabled: true
23+
enabled: false
2424
host: "postgresql"
2525
password: "postgres"
2626
database: "convoy"
@@ -33,20 +33,20 @@ global:
3333
nativeRedis:
3434
enabled: true
3535
host: "redis-master"
36-
password: "convoy"
36+
password: ""
3737
secret: ""
3838
port: 6379
3939

4040
externalRedis:
4141
enabled: false
4242
addresses: ""
43-
host: ""
44-
scheme: ""
43+
host: "redis-master"
44+
scheme: "redis"
4545
username: ""
4646
password: ""
4747
secret: ""
48-
database: ""
49-
port: ""
48+
database: "0"
49+
port: "6379"
5050

5151
app:
5252
replicaCount: 1
@@ -74,6 +74,8 @@ env:
7474
enabled: true
7575
file:
7676
basic: []
77+
# -- If this secret parameter is not empty, basic auth inline value will be ignored. The basic auth config should be in the 'basic_auth_config' key
78+
secret: ""
7779
log_level: "error"
7880
max_response_size: 50
7981
environment: ""
@@ -101,6 +103,8 @@ env:
101103
prefix: ""
102104
accessKey: ""
103105
secretKey: ""
106+
# -- If this secret parameter is not empty, secretKey value will be ignored. The password in the secret should be in the 'secretKey' key
107+
secret: ""
104108
region: ""
105109
session_token: ""
106110
endpoint: ""

ct.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ chart-dirs:
33
- charts
44
chart-repos:
55
- bitnami=https://charts.bitnami.com/bitnami
6-
helm-extra-args: --timeout 600s
6+
helm-extra-args: --timeout 300s --wait --wait-for-jobs
7+
upgrade: true
78
check-version-increment: true
89
debug: true
910
validate-maintainers: false

values.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,25 +107,30 @@ global:
107107
# -- redis cluster addresses, if set the other values won't be used
108108
addresses: ""
109109
# -- Host for the external redis
110-
host: ""
110+
host: "redis-master"
111111
# -- Scheme for the external redis. This can be redis, rediss, redis-socket or redis-sentinel
112-
scheme: ""
112+
scheme: "redis"
113113
# -- username for the external redis.
114114
username: ""
115115
# -- password for the external redis, ignored in case of secret parameter with non-empty value
116-
password: ""
116+
password: "convoy"
117117
# -- If this secret parameter is not empty, password value will be ignored. The password in the secret should be in the 'password' key
118118
secret: ""
119119
# -- Database name for the external redis.
120-
database: ""
120+
database: "0"
121121
# -- Port for the external redis
122-
port: ""
122+
port: "6379"
123123

124124
# @ignored, used in case of external chart
125125
postgresql:
126126
# -- Set to false if you don't want to create a postgres instance
127127
enabled: true
128128
fullnameOverride: "postgresql"
129+
image:
130+
registry: docker.io
131+
repository: bitnamilegacy/postgresql
132+
tag: 17.6.0-debian-12-r0
133+
pullPolicy: IfNotPresent
129134
global:
130135
postgresql:
131136
auth:
@@ -138,6 +143,11 @@ postgresql:
138143
redis:
139144
# -- Set to false if you don't want to create a redis instance
140145
enabled: true
146+
image:
147+
registry: docker.io
148+
repository: bitnamilegacy/redis
149+
tag: 8.2.1-debian-12-r0
150+
pullPolicy: IfNotPresent
141151
architecture: standalone
142152
fullnameOverride: "redis"
143153
auth:
@@ -282,6 +292,8 @@ server:
282292
enabled: true
283293
file:
284294
basic: {}
295+
# -- If this secret parameter is not empty, basic auth inline value will be ignored. The basic auth config should be in the 'basic_auth_config' key
296+
secret: ""
285297
# @ignored
286298
tracer:
287299
type: *tracerType

0 commit comments

Comments
 (0)