Skip to content

Commit

Permalink
Feature/add security context field (#97)
Browse files Browse the repository at this point in the history
* #96 Adding securityContext field to deployment templates
  • Loading branch information
Edu-DevOps authored Feb 20, 2024
1 parent b5ae773 commit 12a9dc0
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| api.properties.databaseName | No | |
| api.properties.databaseUser | No | |
| api.properties.databasePassword | No | |
| api.securityContext | No | Fill securityContext field |
| executor.enabled | Yes | true/false |
| executor.version | Yes | Terrakube Executor version |
| executor.replicaCount | Yes | |
Expand All @@ -280,6 +281,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| executor.volumeMounts | No | |
| executor.properties.toolsRepository | Yes | Example: https://github.com/AzBuilder/terrakube-extensions |
| executor.properties.toolsBranch | Yes | Example: main |
| executor.securityContext | No | Fill securityContext field |
| registry.enabled | Yes | |
| registry.version | Yes | |
| registry.replicaCount | Yes | |
Expand All @@ -288,11 +290,13 @@ Once you have completed the above steps you can complete the file values.yaml to
| registry.env | No | |
| registry.volumes | No | |
| registry.volumeMounts | No | |
| registry.securityContext | No | Fill securityContext field |
| ui.enabled | Yes | true/false |
| ui.version | Yes | |
| ui.replicaCount | Yes | |
| ui.serviceAccountName | No | Kubernetes Service Account name |
| ui.serviceType | Yes | ClusterIP/NodePort/LoadBalancer/ExternalName |
| ui.securityContext | No | Fill securityContext field |
| ingress.ui.useTls | Yes | true/false |
| ingress.ui.enabled | Yes | true/false |
| ingress.ui.domain | Yes | |
Expand Down
2 changes: 1 addition & 1 deletion charts/terrakube/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: 3.13.1
version: 3.14.1

# 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
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ spec:
{{- with .Values.api.serviceAccountName }}
serviceAccountName: {{ quote . }}
{{- end }}
{{- with .Values.api.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ spec:
{{- with .Values.executor.serviceAccountName }}
serviceAccountName: {{ quote . }}
{{- end }}
{{- with .Values.executor.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-openldap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ spec:
items:
- key: "config-ldap.ldif"
path: "config-ldap.ldif"
{{- with .Values.openldap.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ spec:
{{- with .Values.registry.serviceAccountName }}
serviceAccountName: {{ quote . }}
{{- end }}
{{- with .Values.registry.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ spec:
{{- with .Values.ui.serviceAccountName }}
serviceAccountName: {{ quote . }}
{{- end }}
{{- with .Values.ui.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}
6 changes: 5 additions & 1 deletion charts/terrakube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ security:
## OpenLdap
openldap:
podLabels: {}
securityContext: {}

## Dex
dex:
Expand Down Expand Up @@ -171,6 +172,7 @@ api:
defaultRedis: true
loadSampleData: true
terraformReleasesUrl: "https://releases.hashicorp.com/terraform/index.json"
securityContext: {}
cache:
moduleCacheMaxTotal: "128"
moduleCacheMaxIdle: "128"
Expand Down Expand Up @@ -207,7 +209,7 @@ executor:
properties:
toolsRepository: "https://github.com/AzBuilder/terrakube-extensions"
toolsBranch: "main"

securityContext: {}
## Registry properties
registry:
enabled: true
Expand All @@ -218,6 +220,7 @@ registry:
serviceAccountName: ""
resources: {}
podLabels: {}
securityContext: {}

## UI Properties
ui:
Expand All @@ -229,6 +232,7 @@ ui:
serviceAccountName: ""
resources: {}
podLabels: {}
securityContext: {}

## Ingress properties
ingress:
Expand Down

0 comments on commit 12a9dc0

Please sign in to comment.