apiVersion: apps/v1
kind: Deployment
metadata:
  name: go4microservice2azurekvbyenv
spec:
  selector:
    matchLabels:
      app: go4microservice2azurekvbyenv
  template:
    metadata:
      labels:
         app: go4microservice2azurekvbyenv
    spec:
      containers:
      - image: alvaradojl/go4microservice2azurekvbyenv:latest
        name: go4microservice2azurekvbyenv
        env:
         - name: JAEGER_AGENT_HOST
           value: "localhost" #sidecar pattern for jeagger agent
         - name: JAEGER_AGENT_PORT
           value: "6831"
         - name: RELAYSERVICES_KEYVAULTAUTHCLIENTID
           valueFrom:
             secretKeyRef:
               name: secrets
               key: keyvaultauthclientid
         - name: RELAYSERVICES_KEYVAULTAUTHCLIENTSECRET
           valueFrom:
            secretKeyRef:
              name: secrets
              key: keyvaultauthclientsecret
         - name: RELAYSERVICES_KEYVAULTAUTHENDPOINT
           valueFrom:
            secretKeyRef:
              name: secrets
              key: keyvaultauthendpoint
         - name: RELAYSERVICES_KEYVAULTSVCBASEENDPOINT
           valueFrom:
            secretKeyRef:
              name: secrets
              key: keyvaultsvcbaseendpoint
        ports:
        - containerPort: 8080
      - image: jaegertracing/jaeger-agent:1.5.0
        name: jaeger-agent
        ports:
        - containerPort: 5775
          protocol: UDP
        - containerPort: 5778
        - containerPort: 6831
          protocol: UDP
        - containerPort: 6832
          protocol: UDP
        command:
        - "/go/bin/agent-linux"
        args: 
        - "--collector.host-port=jaeger-collector:14267"