apiVersion: apps/v1
kind: Deployment
metadata:
  name: kuard-env
  labels:
    app: kuard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kuard
  template:
    metadata:
      labels:
        app: kuard
    spec:
      containers:
        - name: kuard
          image: gcr.io/kuar-demo/kuard-amd64:1
          ports:
          - containerPort: 8080
            name: http
            protocol: TCP
          env:
            - name: LOG_LEVEL
              valueFrom:
                configMapKeyRef:
                  name: example-config
                  key: app.config
                  optional: true
      volumes:
        - name: kuard-volume
          secret:
            secretName: example-secret
