apiVersion: apps/v1
kind: Deployment
metadata:
  name: template-golang-kubernetes
  labels:
    component: template-golang-kubernetes
spec:
  replicas: 1
  minReadySeconds: 10
  revisionHistoryLimit: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      component: template-golang-kubernetes
  template:
    metadata:
      labels:
        component: template-golang-kubernetes
    spec:
      containers:
      - name: template-golang-kubernetes
        image: tedris/template-golang-kubernetes:v0.0.2
        imagePullPolicy: Always
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 8080
        env:
          - name: LOG_LEVEL
            value: info
          - name: SOME_VARIABLE
            valueFrom:
              secretKeyRef:
                name: some-secret-file
                key: some_variable
