Skip to content

Commit

Permalink
Add security context for wait-for-mongodb (#332)
Browse files Browse the repository at this point in the history
* Add security context for wait-for-mongodb
- Add securityContext in values.yaml
- Using this securityContext in auth-server-deployment.yaml and server-deployment.yaml
- Bumping Chart version to 2.16.0
- Regenerating docs with helm-docs

Signed-off-by: Calvin Audier <[email protected]>

* Removing default values for initContainer securityContext
- Update values.yaml to remove default values for security securityContext
- Example values for securityContext as comments
- Regenerating docs with helm-docs
- Switching for bump to 2.16.0 to bump to 2.15.11

Signed-off-by: Calvin Audier <[email protected]>

---------

Signed-off-by: Calvin Audier <[email protected]>
Co-authored-by: Calvin Audier <[email protected]>
  • Loading branch information
Calvinaud and Calvin Audier authored Aug 31, 2023
1 parent 65f5dce commit 83daecc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/litmus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "2.14.0"
description: A Helm chart to install ChaosCenter
name: litmus
version: 2.15.10
version: 2.15.11
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/litmus/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# litmus

![Version: 2.15.10](https://img.shields.io/badge/Version-2.15.10-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square)
![Version: 2.15.11](https://img.shields.io/badge/Version-2.15.11-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square)

A Helm chart to install ChaosCenter

Expand Down Expand Up @@ -229,6 +229,7 @@ We separated service configuration from `portal.server.service` to `portal.serve
| portal.server.waitForMongodb.resources.requests.cpu | string | `"25m"` | |
| portal.server.waitForMongodb.resources.requests.ephemeral-storage | string | `"500Mi"` | |
| portal.server.waitForMongodb.resources.requests.memory | string | `"150Mi"` | |
| portal.server.waitForMongodb.securityContext | object | `{}` | |
| portalScope | string | `"cluster"` | |
| upgradeAgent.affinity | object | `{}` | |
| upgradeAgent.controlPlane.image.pullPolicy | string | `"Always"` | |
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus/templates/auth-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
]
resources:
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.portal.server.waitForMongodb.securityContext | nindent 12 }}
containers:
- name: auth-server
image: {{ .Values.image.imageRegistryName }}/{{ .Values.portal.server.authServer.image.repository }}:{{ .Values.portal.server.authServer.image.tag }}
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ spec:
[
"while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.mongodb.service.ports.mongodb }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
]
securityContext:
{{- toYaml .Values.portal.server.waitForMongodb.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}
containers:
Expand Down
5 changes: 5 additions & 0 deletions charts/litmus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ portal:
repository: curl
tag: 2.14.0
pullPolicy: "Always"
securityContext: {}
# runAsUser: 101
# allowPrivilegeEscalation: false
# runAsNonRoot: true
# readOnlyRootFilesystem: true
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit 83daecc

Please sign in to comment.