Skip to content

Commit

Permalink
fix: generate localUsers.yml from localUsers in values.yaml (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
MLenterman authored Oct 21, 2024
1 parent dad8309 commit c047ba5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/ff-common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ff-common
description: ff-common chart building components and helpers for the Frank!Framework
version: 0.1.23
version: 0.1.24
appVersion: "8.0"
type: library
home: https://frankframework.org
Expand Down
3 changes: 3 additions & 0 deletions charts/ff-common/templates/_configmap.env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ data:
# Reverse proxy/ingress should be used for https
application.security.http.transportGuarantee: "NONE"
{{- if .Values.frank.security.http.authentication }}
{{- if .Values.frank.security.http.localUsers }}
application.security.console.authentication.type: "YML"
{{- end }}
{{- with .Values.frank.security.http.activeDirectory.enabled }}
application.security.http.authenticators: AdAuthenticator
application.security.http.authenticators.AdAuthenticator.type: AD
Expand Down
4 changes: 4 additions & 0 deletions charts/ff-common/templates/_configmap.tomcat-users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ data:
<user username="{{ .username }}" password="{{ .password }}" roles="{{ join "," .roles | default "IbisTester" }}"/>
{{- end }}
</tomcat-users>
localUsers.yml: |-
users:
{{- toYaml .Values.frank.security.http.localUsers | nindent 4 }}
{{- end -}}
{{- end -}}
{{- define "ff-common.configmap.tomcat-users" -}}
Expand Down
4 changes: 4 additions & 0 deletions charts/ff-common/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ volumeMounts:
mountPath: /usr/local/tomcat/conf/tomcat-users.xml
subPath: tomcat-users.xml
readOnly: true
- name: {{ template "ff-common.fullname" . }}-tomcat-users
mountPath: /opt/frank/resources/localUsers.yml
subPath: localUsers.yml
readOnly: true
{{- end }}
{{- if .Values.frank.security.http.activeDirectory.enabled }}
- name: {{ template "ff-common.fullname" . }}-ldap-role-mapping
Expand Down

0 comments on commit c047ba5

Please sign in to comment.