Skip to content

Commit

Permalink
EDIT webwork support for saml2 conf file
Browse files Browse the repository at this point in the history
Added another file for the configmap, previously we only had
localOverrides.conf. I renamed the "localOverrides.conf" key to
"localOverrides" as the dot was causing troubles, couldn't figure out
how to escape the dot and this was the simpler solution.

There is now a 'authen_saml2' file under .Values.webworkFiles, this is a
YAML file and needs to be mounted in Webwork's conf/authen_saml2.yml in
order to enable the SAML2 plugin.

Helm lint wasn't happy with the "if .Values.webworkFiles.localOverrides"
check, complaining about nil pointer. Found people saying that if you
wrap (.Values.webworkFiles) in parens, it stops complaining.
  • Loading branch information
ionparticle committed May 3, 2024
1 parent 06faa44 commit 6a62c79
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion webwork/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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: 0.1.9
version: 0.1.10

# 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
Expand Down
20 changes: 18 additions & 2 deletions webwork/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,16 @@ volumeMounts:
mountPath: /opt/webwork/webwork2/htdocs/DATA
- name: webwork-logs-data
mountPath: /opt/webwork/webwork2/logs
{{- if .Values.webworkFiles }}
{{- if (.Values.webworkFiles).localOverrides }}
- name: localoverrides-config
mountPath: /opt/webwork/webwork2/conf/localOverrides.conf
subPath: localOverrides.conf
{{- end }}
{{- if (.Values.webworkFiles).authen_saml2 }}
- name: authen-saml2-config
mountPath: /opt/webwork/webwork2/conf/authen_saml2.yml
subPath: authen_saml2.yml
{{- end }}
{{- end }}


Expand Down Expand Up @@ -251,10 +256,21 @@ volumeMounts:
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.webworkFiles }}
{{- if (.Values.webworkFiles).localOverrides }}
- name: localoverrides-config
configMap:
name: {{ template "webwork.fullname" . }}
items:
- key: localOverrides
path: localOverrides.conf
{{- end }}
{{- if (.Values.webworkFiles).authen_saml2 }}
- name: authen-saml2-config
configMap:
name: {{ template "webwork.fullname" . }}
items:
- key: authen_saml2
path: authen_saml2.yml
{{- end }}

{{- end }}
5 changes: 4 additions & 1 deletion webwork/templates/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ metadata:
labels:
{{- include "webwork.labels" . | nindent 4 }}
data:
{{ toYaml .Values.webworkFiles | indent 2 }}
localOverrides:
{{ toYaml (.Values.webworkFiles).localOverrides | indent 2 }}
authen_saml2:
{{ toYaml (.Values.webworkFiles).authen_saml2 | indent 2 }}
{{- end}}

{{- if .Values.shibd.idp.attribute_map }}
Expand Down
3 changes: 2 additions & 1 deletion webwork/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ shibd:
# TODO: Add vars to deployment

# webworkFiles:
# localOverride.conf: |
# localOverride: |
# authen_saml2: |

# caliper TODO: Add to deployment
caliper:
Expand Down

0 comments on commit 6a62c79

Please sign in to comment.