Skip to content

Commit

Permalink
feat(mongo-express): allow deployment annotations and remove basic au…
Browse files Browse the repository at this point in the history
…thentication from probes (#634)
  • Loading branch information
sebastien-prudhomme authored Apr 9, 2024
1 parent 23d4c32 commit 1da6d9e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 41 deletions.
4 changes: 2 additions & 2 deletions charts/mongo-express/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ name: mongo-express
sources:
- https://github.com/mongo-express/mongo-express
- https://github.com/cowboysysop/charts/tree/master/charts/mongo-express
version: 6.4.2
version: 6.5.0
dependencies:
- name: common
version: 2.19.0
version: 2.19.1
repository: https://charts.bitnami.com/bitnami/
- name: mongodb
version: 15.1.3
Expand Down
1 change: 1 addition & 0 deletions charts/mongo-express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ The command deletes the release named `my-release` and frees all the kubernetes
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.annotations` | Service account annotations | `{}` |
| `serviceAccount.name` | The name of the service account to use (Generated using the `mongo-express.fullname` template if not set) | `nil` |
| `deploymentAnnotations` | Additional deployment annotations | `{}` |
| `podAnnotations` | Additional pod annotations | `{}` |
| `podLabels` | Additional pod labels | `{}` |
| `podSecurityContext` | Pod security context | `{}` |
Expand Down
21 changes: 3 additions & 18 deletions charts/mongo-express/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ metadata:
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if or .Values.deploymentAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.deploymentAnnotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
Expand Down Expand Up @@ -153,11 +153,6 @@ spec:
httpGet:
path: {{ .Values.siteBaseUrl | trimSuffix "/" }}/status
port: http
{{- if and .Values.basicAuthUsername .Values.basicAuthPassword }}
httpHeaders:
- name: Authorization
value: {{ include "mongo-express.basicAuthHttpHeader" . }}
{{- end }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
Expand All @@ -169,11 +164,6 @@ spec:
httpGet:
path: {{ .Values.siteBaseUrl | trimSuffix "/" }}/status
port: http
{{- if and .Values.basicAuthUsername .Values.basicAuthPassword }}
httpHeaders:
- name: Authorization
value: {{ include "mongo-express.basicAuthHttpHeader" . }}
{{- end }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
Expand All @@ -185,11 +175,6 @@ spec:
httpGet:
path: {{ .Values.siteBaseUrl | trimSuffix "/" }}/status
port: http
{{- if and .Values.basicAuthUsername .Values.basicAuthPassword }}
httpHeaders:
- name: Authorization
value: {{ include "mongo-express.basicAuthHttpHeader" . }}
{{- end }}
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
Expand Down
9 changes: 2 additions & 7 deletions charts/mongo-express/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ metadata:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
Expand Down
9 changes: 2 additions & 7 deletions charts/mongo-express/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ metadata:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
Expand Down
9 changes: 2 additions & 7 deletions charts/mongo-express/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ metadata:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.serviceAccount.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end -}}
3 changes: 3 additions & 0 deletions charts/mongo-express/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ serviceAccount:
## @param serviceAccount.name The name of the service account to use (Generated using the `mongo-express.fullname` template if not set)
name:

## @param deploymentAnnotations Additional deployment annotations
deploymentAnnotations: {}

## @param podAnnotations Additional pod annotations
podAnnotations: {}

Expand Down

0 comments on commit 1da6d9e

Please sign in to comment.