Skip to content

Commit

Permalink
allow to disable security context. (#185)
Browse files Browse the repository at this point in the history
* allow to disable security context.

Fix issue #184

* update documentation and run pre-commit checks.

* fix appVersion type to comply with linter
  • Loading branch information
thpham authored Sep 15, 2022
1 parent 20dc3ee commit ee24149
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/weblate/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 4.14
description: Weblate is a free web-based translation management system.
name: weblate
type: application
version: 0.4.13
version: 0.4.14
home: https://weblate.org/
icon: https://s.weblate.org/cdn/weblate.svg
maintainers:
Expand Down
5 changes: 3 additions & 2 deletions charts/weblate/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# weblate

![Version: 0.4.13](https://img.shields.io/badge/Version-0.4.13-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.14](https://img.shields.io/badge/AppVersion-4.14-informational?style=flat-square)
![Version: 0.4.14](https://img.shields.io/badge/Version-0.4.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.14](https://img.shields.io/badge/AppVersion-4.14-informational?style=flat-square)

Weblate is a free web-based translation management system.

Expand Down Expand Up @@ -39,6 +39,7 @@ $ helm install my-release weblate/weblate
| caCertSecretName | string | `""` | Secret containing a custom CA cert bundle to be mounted. See https://docs.weblate.org/en/latest/admin/install.html?highlight=certificates#using-custom-certificate-authority |
| caCertSubPath | string | `""` | Name of the CA cert bundle in the secret, e.g. ca-certificates.crt or ca-bundle.crt |
| configOverride | string | `""` | Config override. See https://docs.weblate.org/en/latest/admin/install/docker.html#custom-configuration-files |
| containerSecurityContext.enabled | bool | `false` | |
| debug | string | `"0"` | Enable debugging |
| defaultFromEmail | string | `""` | From email for outgoing emails |
| emailHost | string | `""` | Host for sending emails |
Expand Down Expand Up @@ -69,6 +70,7 @@ $ helm install my-release weblate/weblate
| persistence.existingClaim | string | `""` | Use an existing volume claim |
| persistence.filestore_dir | string | `"/app/data"` | |
| persistence.size | string | `"10Gi"` | |
| podSecurityContext.enabled | bool | `true` | |
| podSecurityContext.fsGroup | int | `1000` | |
| postgresql.enabled | bool | `true` | |
| postgresql.postgresqlDatabase | string | `"weblate"` | |
Expand All @@ -83,7 +85,6 @@ $ helm install my-release weblate/weblate
| redis.redisHost | string | `None` | External redis database endpoint, to be used if `redis.enabled == false` |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| serverEmail | string | `""` | Sender for outgoing emails |
| service.annotations | string | `nil` | |
| service.port | int | `80` | |
Expand Down
10 changes: 6 additions & 4 deletions charts/weblate/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "weblate.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.podSecurityContext.enabled }}
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
Expand Down
4 changes: 3 additions & 1 deletion charts/weblate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ serviceAccount:
name:

podSecurityContext:
enabled: true
fsGroup: 1000

securityContext: {}
containerSecurityContext:
enabled: false
# capabilities:
# drop:
# - ALL
Expand Down

0 comments on commit ee24149

Please sign in to comment.