dictyBase/modware-auth

View on GitHub
deployments/charts/auth-api-server/templates/deployment.yaml

Summary

Maintainability
Test Coverage
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ template "auth-api.fullname" . }}
  labels:
    app: {{ template "auth-api.fullname" . }}
    chart: {{ template "auth-api.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ template "auth-api.fullname" . }}
  template:
    metadata:
      labels:
        app: {{ template "auth-api.fullname" . }}
    spec:
      containers:
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          args: [
            "--log-level",
            "{{ .Values.logLevel }}",
            "start-server",
            "--port",
            "{{ .Values.service.port }}"            
          ]
          env:
          - name: JWT_PUBLIC_KEY
            valueFrom:
              secretKeyRef:
                name: dictybase-configuration
                key: auth.publickey
          - name: JWT_PRIVATE_KEY
            valueFrom:
              secretKeyRef:
                name: dictybase-configuration
                key: auth.privatekey
          - name: OAUTH_CONFIG
            valueFrom:
              secretKeyRef:
                name: dictybase-configuration
                key: auth.config
          ports:
            - name: {{ .Values.service.name }}
              containerPort: {{ .Values.service.port }}
              protocol: TCP
          # livenessProbe:
          #   httpGet:
          #     path: /
          #     port: http
          # readinessProbe:
          #   httpGet:
          #     path: /
          #     port: http
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
    {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
    {{- end }}
    {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
    {{- end }}