apiVersion: apps/v1
kind: Deployment
metadata:
  name: yncrea-hellomicro
  labels:
    app.kubernetes.io/name: yncrea-hellomicro

spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: yncrea-hellomicro
  template:
    metadata:
      labels:
        app.kubernetes.io/name: yncrea-hellomicro
    spec:
      containers:
        - name: yncrea-hellomicro
          image: louisonsarlinmagnus/Interface:latest
          imagePullPolicy: IfNotPresent
          env:
            - name: GREETING
              valueFrom:
                configMapKeyRef:
                  key: greeting
                  name: yncrea-hellomicro-configmap
            - name: MY_SECRET
              valueFrom:
                secretKeyRef:
                  key: secret.txt
                  name: yncrea-hellomicro-secret
          volumeMounts:
            - mountPath: /var/secret
              name: yncrea-hellomicro-secret
              readOnly: true
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
      volumes:
        - name: yncrea-hellomicro-secret
          secret:
            secretName: yncrea-hellomicro-secret