Skip to main content

Additionals

In Kubernetes or OpenShift, your can add additional configurations to the following resources: nodeSelector, tolerations, affinity, securityContext and containerSecurityContext
This pages explains you how.


1. In your manifest repository's main branch, you will find the values.yaml file, it showld be in the following folder structure [environment]/[project]/[application]

2. In the values.yaml file, search for the Additional Customizations section, you will find it like this:


## Additional Customizations #################################################

3. Bellow the section title, add the following configuration and change the values as you need:


# - Additionals
deployment:
# Select nodes to deploy which matches the following labels
nodeSelector:
#cloud.google.com/gke-nodepool: default-pool
# Taint tolerations for nodes
tolerations:
#- key: "dedicated"
# operator: "Equal"
# value: "app"
# effect: "NoSchedule"
# Pod affinity and pod anti-affinity allow you to specify rules about how pods should be placed relative to other pods.
affinity:
#nodeAffinity:
#requiredDuringSchedulingIgnoredDuringExecution:
#nodeSelectorTerms:
#- matchExpressions:
# - key: disktype
# operator: In
# values:
# - ssd
# Additional Labels
additionalLabels:
#key: value
additionalAnnotations:
#key: value
additionalPodLabels:
#key: value
additionalPodAnnotations:
#key: value
# Security Context for the pod
securityContext:
#fsGroup: 2000
# Security Context at Container Level
containerSecurityContext:
#runAsUser: 2000
#readOnlyRootFilesystem: true
#runAsNonRoot: true
#####

4. Commit and enjoy! ✨