Skip to content

Commit

Permalink
Support initcontainer, sidecar, volumes and mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
AHodell committed Sep 26, 2023
1 parent 593e4fe commit 4b6cc5e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ Note that the samples prefix properties with `WORKERGENID1` which always creates
| signserver.keystoresMountPath | Mount path in the SignServer container for mounted keystore files | |
| signserver.env | Environment variables to pass to container | |
| signserver.envRaw | Environment variables to pass to container in Kubernetes YAML format | |
| signserver.initContainers | Extra init containers to be added to the deployment | [] |
| signserver.sidecarContainers | Extra sidecar containers to be added to the deployment | [] |
| signserver.volumes | Extra volumes to be added to the deployment | [] |
| signserver.volumeMounts | Extra volume mounts to be added to the deployment | [] |

### SignServer Environment Variables

Expand Down Expand Up @@ -330,6 +334,8 @@ Note that the samples prefix properties with `WORKERGENID1` which always creates
| services.proxyHttp.bindIP | IP to bind for proxy HTTP communication | 0.0.0.0 |
| services.proxyHttp.httpPort | Service port for proxy HTTP communication | 8081 |
| services.proxyHttp.httpsPort | Service port for proxy HTTP communication that accepts SSL_CLIENT_CERT header | 8082 |
| services.sidecarPorts | Additional ports to expose in sidecar containers | [] |


### Ingress Parameters

Expand Down
13 changes: 13 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
serviceAccountName: {{ include "signserver-community-helm.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.signserver.initContainers }}
initContainers:
{{- toYaml .Values.signserver.initContainers | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down Expand Up @@ -119,6 +123,12 @@ spec:
- name: signserver-keystores-files
mountPath: {{ .Values.signserver.keystoresMountPath }}
{{- end }}
{{- if .Values.signserver.volumeMounts }}
{{- toYaml .Values.signserver.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.signserver.sidecarContainers }}
{{- toYaml .Values.signserver.sidecarContainers | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.signserver.useH2Persistence }}
- name: signserver-h2-persistence
Expand All @@ -145,6 +155,9 @@ spec:
secret:
secretName: {{ .Values.signserver.keystoresSecret }}
{{- end }}
{{- if .Values.signserver.volumes }}
{{- toYaml .Values.signserver.volumes | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
targetPort: https
protocol: TCP
name: https
{{- if and .Values.signserver.sidecarContainers .Values.services.sidecarPorts }}
{{- toYaml .Values.services.sidecarPorts | nindent 4 }}
{{- end }}
selector:
{{- include "signserver-community-helm.selectorLabels" . | nindent 4 }}
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ signserver:
# secretKeyRef:
# name: signserverdbcredentials
# key: database_password
# Extra init containers to be added to the deployment
initContainers: []
# Extra sidecar containers to be added to the deployment
sidecarContainers: []
# Extra volumes to be added to the deployment
volumes: []
# Extra volume mounts to be added to the deployment
volumeMounts: []


# Only one of the following services can be enabled at a time
Expand All @@ -42,6 +50,9 @@ services:
bindIP: 0.0.0.0
httpPort: 8081
httpsPort: 8082
# Extra sidecar ports to be added to the service, optionally used when sidecarContainers
# are defined and need to expose ports
sidecarPorts: []

# Requires proxyAJP or proxyHttp service to be enabled for adminweb access
ingress:
Expand Down

0 comments on commit 4b6cc5e

Please sign in to comment.