fiunchinho/iam-role-annotator

View on GitHub
charts/iam-role-annotator/templates/deployment.yaml

Summary

Maintainability
Test Coverage
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: {{ template "iam-role-annotator.fullname" . }}
  labels:
    app: {{ template "iam-role-annotator.name" . }}
    chart: {{ template "iam-role-annotator.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ template "iam-role-annotator.name" . }}
      release: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ template "iam-role-annotator.name" . }}
        release: {{ .Release.Name }}
    spec:
      containers:
        - name: healthz
          image: k8s.gcr.io/exechealthz-amd64:1.2
          args:
          - "-cmd=nslookup localhost"
          - "--quiet"
          ports:
          - containerPort: 8080
            protocol: TCP
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          env:
          - name: NAMESPACE
            value: "{{ .Release.Namespace }}"
          - name: AWS_ACCOUNT_ID
            value: '{{ required "Missing awsAccountId parameter" .Values.awsAccountId }}'
          livenessProbe:
            httpGet:
              path: "/healthz"
              port: 8080
{{ if hasSuffix "-pro" .Release.Namespace }}
          resources:
{{ toYaml .Values.resources | indent 12 }}
{{ end }}