apiVersion: apps/v1
kind: Deployment
metadata:
  name: busybox-secret
  namespace: velotio-shruti
  labels:
    app: busybox-secret
spec:
  replicas: 1
  selector:
    matchLabels:
      app: busybox-secret
  template:
    metadata:
      labels:
        app: busybox-secret
    spec:
      containers:
      - name: busybox
        image: busybox
        imagePullPolicy: "Always"
        command: [ "/bin/sh","-c","echo ${USERNAME} > /bin/username; echo ${PASSWORD} > /bin/password; while true; do continue; done;" ]
        env:
        - name: USERNAME
          valueFrom:
            secretKeyRef:
              name: velotio-secret
              key: username
        - name: PASSWORD
          valueFrom:
            secretKeyRef:
              name: velotio-secret
              key: password