Deployment Properties
You can configure properties for deployment parameters, initialization and application containers, environment variables, and resources that manage the deployment and scaling of a set of pods in your cluster. These properties define declarative updates to applications, allowing you to describe the required state for your application, and Kubernetes deploys and manages the specified number of replica pods to meet that required state.
Deployment Parameter Properties specifies the deployment parameter properties:
Name | Description |
---|---|
deployment.enabled | Enables the deployment of the application in Helm chart deployments. The default value is false . Set this to true to deploy the
application. |
deployment.strategy | The strategy for updating deployments. By default, deploymentStrategy is set to rollingUpdate with a maximum surge of 25% and
maximum unavailability of 25%. |
deployment.nodeSelector | Selects the node in which to deploy the application. The default value is {} . |
deployment.hostAliases | Adds entries to a pod's /etc/hosts file and provides a pod-level override of the host name resolution when DNS and other options do not apply. |
deployment.additionalLabels | More labels for deployment. |
deployment.podLabels | More labels added on a pod that are used in the service's label selector. The default value is {} . |
deployment.annotations | Annotations on deployments. The default value is {} . |
deployment.additionalPodAnnotations | More pod annotations added on a pod created by this deployment. |
deployment.replicas | The number of pod replicas to create. |
deployment.imagePullSecrets | The Secrets used to pull an image. The default value is null. |
deployment.initContainers | A map of the initialization containers that run before the application containers, where each initialization container is identified by a name key. This key is used to assign the name of the initialization container. |
deployment.containers | A map of the application containers that run after the initialization containers, where each application container is identified by a name key. This key is used to assign the name of the application container. |
deployment.volumes | The volumes to be added to the pod, for example:
|
deployment.revisionHistoryLimit | The number of historical revisions to save in case rollbacks are needed. |
deployment.tolerations | The taint tolerations for nodes. |
deployment.affinity | The affinity for a pod or node. |
deployment.topologySpreadConstraints | The topology spread constraint definitions. |
deployment.securityContext | The security context for the pod. |
deployment.terminationGracePeriodSeconds | The graceful termination timeout in seconds. |
deployment.rbac | The role-based access control parameters. |
deployment.automountToken | Determines whether the service account token is mounted as a volume. |
Initialization Container Properties specifies the initialization container properties, where each initialization container in the list is identified by
[name]
:
Name | Description |
---|---|
deployment.initContainers.[name] | The names of the initialization containers, for example:
|
deployment.initContainers.[name].image | The image for initializing the application, for example:
|
deployment.initContainers.[name].env | The environment variables to be passed to the initialization container. |
deployment.initContainers.[name].volumeMounts | The mount path for volumes, for example:
|
Container Properties specifies the container properties, where each container in the list is identified by [name]
:
Name | Description |
---|---|
deployment.containers.[name] | The name of the application container, for example, chf-standalone . |
deployment.containers.[name].image | The image for running the application, for example:
|
deployment.containers.[name].command | Defines a command for the container. The default value is [] . |
deployment.containers.[name].args | Arguments for the primary deployment container. The default value is --no-colors . |
deployment.containers.[name].ports | A map of the ports for the primary container, with each port identified by a port number integer key. This key is used to set the containerPort
field.
|
deployment.containers.[name].envFrom | Environment variables to be selected from a configuration map or Secret. |
deployment.containers.[name].env | Environment variables to be passed to the container, for example:
|
deployment.containers.[name].startupProbe | The start-up probe for checking whether the container starts successfully. |
deployment.containers.[name].readinessProbe | The probe for checking the container's readiness. |
deployment.containers.[name].livenessProbe | The probe for checking the container's liveness. |
deployment.containers.[name].lifecycle | Life cycle hooks for the container. |
deployment.containers.[name].resources | Resource parameters for the container. |
deployment.containers.[name].volumeMounts | The mount path for volumes. |
deployment.containers.[name].containerSecurityContext | A security context at the container level. |
deployment.containers.[name].terminationMessagePolicy | A customized termination message if the application container stops. |
Environment Variable Properties specifies the environment variable properties to be picked from the Kubernetes configuration map and Secret configuration sources:
Name | Description |
---|---|
deployment.containers.[name].envFrom | Environment variables to be picked from the configuration map or Secret. |
deployment.containers.[name].envFrom.type | The configuration source type: configmap or secret . |
deployment.containers.[name].envFrom.name | The name of the configuration map or Secret. If this is empty, set it to the application name. |
deployment.containers.[name].envFrom.nameSuffix | The suffix of the configuration map or Secret. (The appended prefix is the application name.) |
Resource Properties specifies the resource properties:
Name | Description |
---|---|
deployment.containers.[name].resources | The application pod resource requests and limits, for example:
|
deployment:
enabled: true
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
reloadOnChange: true
initContainers:
init-contaner
image:
name: busybox
repository: repos/busybox
imagePullPolicy: IfNotPresent
env:
TZ:
value: UTC
additionalPodAnnotations:
kubectl.kubernetes.io/default-container: busybox-chf
kubectl.kubernetes.io/default-logs-container: busybox-chf
replicas: 1
volumes:
config-volume:
configMap:
name: configmap-name
containers:
chf:
image:
name: chf
repository: localhost:32000/sba-5gc-networkfunctions-chf
tag: "5280"
pullPolicy: Always
args: [ '--no-colors','--no-wait' ]
ports:
80:
name: http
protocol: TCP
443:
name: https
protocol: TCP
envFrom:
production-cm:
type: configmap
nameSuffix: my-configmap
env:
TZ:
value: UTC
startupProbe:
enabled: false
readinessProbe:
enabled: true
initialDelaySeconds: 20
periodSeconds: 10
httpGet:
path: /readycheck
port: operations
livenessProbe:
enabled: true
initialDelaySeconds: 60
periodSeconds: 20
httpGet:
path: /healthcheck
port: operations
lifecycle:
postStart:
exec:
command: [ "/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message" ]
preStop:
exec:
command: [ "/bin/sh","-c","nginx -s quit; while killall -0 nginx; do sleep 1; done" ]
volumeMounts:
volume-name:
mountPath: /path1
resources:
limits:
memory: 4Gi
cpu: 4
requests:
memory: 2Gi
cpu: 4
containerSecurityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
securityContext:
fsGroup: 1000