---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: releaseinfo
  namespace: release
  labels:
    app: releaseinfo
  annotations:
    flux.weave.works/automated: "true"
    flux.weave.works/tag.releaseinfod: semver:~1.0
spec:
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: releaseinfo
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        app: releaseinfo
    spec:
      containers:
      - name: releaseinfod
        image: swr.ap-southeast-1.myhuaweicloud.com/opengauss/web-release:v1.0.2020052900
        imagePullPolicy: IfNotPresent
        args:
        - --stderrthreshold=0
        env:
        - name: config.yaml
          valueFrom:
            configMapKeyRef:
              name: release-config
              key: config.yaml
        securityContext:
          privileged: true
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        volumeMounts:
        - name: vol-config-map
          readOnly: true
          mountPath: /go/src/webrelease/config/
        - name: vol-docker-sock
          mountPath: /var/run/docker.sock
        - name: vol-docker-logpath
          mountPath: /var/log/web-release
      volumes:
      - name: vol-config-map
        configMap:
          name: release-config
          items:
          - key: config.yaml
            path: config.yaml
      - name: vol-docker-sock
        hostPath:
          path: /var/run/docker.sock
      - name: vol-docker-logpath
        hostPath:
          path: /var/log/web-release

