All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.deployment.helm.deployment.yaml.vm Maven / Gradle / Ivy

# Base Kubernetes deployment artifact.
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/instance: ${appName}
    app.kubernetes.io/name: ${appName}
  name: ${appName}
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: ${appName}
      app.kubernetes.io/name: ${appName}
  strategy: {}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ${appName}
        app.kubernetes.io/name: ${appName}
    spec:
      {{- with .Values.deployment.securityContext }}
      securityContext:
        {{- toYaml . | nindent 12}}
      {{- end }}
      serviceAccountName: {{ .Values.deployment.serviceAccountName }}
      automountServiceAccountToken: {{ .Values.deployment.automountServiceAccountToken | default false }}
      {{- with .Values.deployment.volumes }}
      volumes:
        {{- toYaml . | nindent 12}}
      {{- end }}
      {{- with .Values.deployment.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 12}}
      {{- end }}
      {{- with .Values.deployment.initContainers }}
      initContainers:
        {{- toYaml . | nindent 12 }}
      {{- end }}
      containers:
        - name: ${appName}
          {{ if .Values.image.tag }}
          image: "{{ .Values.image.dockerRepo }}{{ .Values.image.name }}:{{ .Values.image.tag }}"
          {{ else }}
          image: "{{ .Values.image.dockerRepo }}{{ .Values.image.name }}"
          {{ end }}
          imagePullPolicy: "{{ .Values.image.imagePullPolicy }}"
          {{- with .Values.deployment.env }}
          env:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          {{- with .Values.deployment.args }}
          args:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          {{- with .Values.deployment.ports }}
          ports:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          {{- with .Values.deployment.volumeMounts }}
          volumeMounts:
            {{- toYaml . | nindent 12}}
          {{- end }}
          {{- with .Values.deployment.resources }}
          resources:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          {{ if .Values.deployment.command }}
          command: {{ .Values.deployment.command }}
          {{ end }}
      hostname: {{ .Values.hostname }}
      restartPolicy: {{ .Values.deployment.restartPolicy }}
      {{- with .Values.deployment.securityContext }}
      securityContext:
        {{- toYaml . | nindent 8 }}
      {{- end }}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy