Skip to content

Commit fc794fb

Browse files
committed
#8 (HELM) - allow for proxy app passwords to be from secrets
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent ce7ac7a commit fc794fb

6 files changed

Lines changed: 34 additions & 10 deletions

File tree

charts/proxy-http-client/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: proxy-http-client
33
description: "Subscribe to events over HTTP from a proxy-http-server instance, and publish them on a local broker"
4-
version: 0.1.2
4+
version: 0.1.3
55
dependencies:
66
- name: common
77
repository: oci://registry-1.docker.io/bitnamicharts

charts/proxy-http-client/templates/deployment.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ spec:
9898
{{- if .Values.app.broker.password.isSecret }}
9999
valueFrom:
100100
secretKeyRef:
101-
name: {{ .Values.app.broker.password.secretName }}
102-
key: {{ .Values.app.broker.password.secretKey }}
101+
name: {{ .Values.app.broker.password.secretName | quote }}
102+
key: {{ .Values.app.broker.password.secretKey | quote }}
103103
{{- else }}
104104
value: {{ .Values.app.broker.password.hardcoded | quote }}
105105
{{- end }}
@@ -114,7 +114,14 @@ spec:
114114
- name: PROXYAPP_OTHER_PROXY__USERNAME
115115
value: {{ .Values.app.other_proxy.username | quote }}
116116
- name: PROXYAPP_OTHER_PROXY__PASSWORD
117-
value: {{ .Values.app.other_proxy.password | quote }}
117+
{{- if .Values.app.other_proxy.password.isSecret }}
118+
valueFrom:
119+
secretKeyRef:
120+
name: {{ .Values.app.other_proxy.password.secretName | quote }}
121+
key: {{ .Values.app.other_proxy.password.secretKey | quote }}
122+
{{- else }}
123+
value: {{ .Values.app.other_proxy.password.hardcoded | quote }}
124+
{{- end }}
118125
- name: PROXYAPP_TOPIC_PREFIX
119126
value: {{ required "app.topic_prefix not set (i.e. 'organization.facility.system.')" .Values.app.topic_prefix | quote }}
120127
envFrom:

charts/proxy-http-client/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ app:
132132
other_proxy:
133133
url: "" # this should not include the path
134134
username: "" # needed credential for clients calling HTTP endpoints other than /healthcheck
135-
password: "" # needed credential for clients calling HTTP endpoints other than /healthcheck
135+
# needed credential for clients calling HTTP endpoints other than /healthcheck
136+
password:
137+
isSecret: false
138+
hardcoded: ""
139+
secretName: ""
140+
secretKey: ""
136141
broker:
137142
host: "127.0.0.1"
138143
port: "5672"

charts/proxy-http-server/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: proxy-http-server
33
description: "Subscribe to broker messages and broadcast them to HTTP listeners"
4-
version: 0.1.2
4+
version: 0.1.3
55
dependencies:
66
- name: common
77
repository: oci://registry-1.docker.io/bitnamicharts

charts/proxy-http-server/templates/deployment.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ spec:
101101
{{- if .Values.app.broker.password.isSecret }}
102102
valueFrom:
103103
secretKeyRef:
104-
name: {{ .Values.app.broker.password.secretName }}
105-
key: {{ .Values.app.broker.password.secretKey }}
104+
name: {{ .Values.app.broker.password.secretName | quote }}
105+
key: {{ .Values.app.broker.password.secretKey | quote }}
106106
{{- else }}
107107
value: {{ .Values.app.broker.password.hardcoded | quote }}
108108
{{- end }}
@@ -119,7 +119,14 @@ spec:
119119
- name: PROXYAPP_USERNAME
120120
value: {{ .Values.app.username | quote }}
121121
- name: PROXYAPP_PASSWORD
122-
value: {{ .Values.app.password | quote }}
122+
{{- if .Values.app.password.isSecret }}
123+
valueFrom:
124+
secretKeyRef:
125+
name: {{ .Values.app.password.secretName | quote }}
126+
key: {{ .Values.app.password.secretKey | quote }}
127+
{{- else }}
128+
value: {{ .Values.app.password.hardcoded | quote }}
129+
{{- end }}
123130
envFrom:
124131
{{- if .Values.extraEnvVarsCM }}
125132
- configMapRef:

charts/proxy-http-server/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,12 @@ app:
162162
log_level: "info"
163163
topic_prefix: "" # i.e. "organization.facility.system.", you should consciously set this value.
164164
username: "" # needed credential for clients calling HTTP endpoints other than /healthcheck
165-
password: "" # needed credential for clients calling HTTP endpoints other than /healthcheck
165+
# needed credential for clients calling HTTP endpoints other than /healthcheck
166+
password:
167+
isSecret: false
168+
hardcoded: ""
169+
secretName: ""
170+
secretKey: ""
166171
broker:
167172
host: "127.0.0.1"
168173
port: "5672"

0 commit comments

Comments
 (0)