apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: gogs
  labels:
    app: cheese
    cheese: gogs
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cheese
      task: gogs
  template:
    metadata:
      labels:
        app: cheese
        task: gogs
        version: v0.0.1
    spec:
      containers:
      - name: gogs
        image: registry.aliyuncs.com/hydsoft/ddc-cicd-gogs
        ports:
        - name: http
          containerPort: 3000
        env:
        - name: DOMAIN
          value: "gogs.default:3000"
---
apiVersion: v1
kind: Service
metadata:
  name: gogs
spec:
  clusterIP: None
  ports:
   - name: http
     port: 80
     targetPort: 3000
     protocol: TCP
  selector:
    app: cheese
    task: gogs
