apiVersion: apps/v1
kind: Deployment
metadata:
  name: go-demo-web
  labels:
    app: go-demo-web
spec:
  replicas: 2
  selector:
    matchLabels:
      app: go-demo-web
  template:
    metadata:
      labels:
        app: go-demo-web
    spec:
      imagePullSecrets:
      - name: tencenthubkey
      volumes:
      - name: config
        configMap:
          name: go-demo-config
      containers:
      - name: go-demo
        image: "{{docker_image}}" # hub.tencentyun.com/workshop/go-demo # TODO from args
        command: ["/go-demo"]
        args: ["-c", "/etc/go-demo/config.yaml", "serve"]
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: config
          mountPath: /etc/go-demo/config.yaml
          subPath: config.yaml

