apiVersion: apps/v1
kind: Deployment
metadata:
  name: gva-server
  annotations:
    moon-wind/gin-vue-admin: backend
    github: "https://github.com/moon-wind/gin-vue-admin.git"
    app.kubernetes.io/version: 0.0.1
  labels:
    app: gva-server
    version: gva-vue3
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gva-server
      version: gva-vue3
  template:
    metadata:
      labels:
        app: gva-server
        version: gva-vue3
    spec:
      containers:
        - name: gin-vue-admin-container
          image: registry.cn-hangzhou.aliyuncs.com/moon-wind/k8s:v1
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8888
              name: http
          volumeMounts:
            - mountPath: /go/src/github.com/moon-wind/gin-vue-admin/server/config.yaml
              name: config
              subPath: config.yaml
            - mountPath: /etc/localtime
              name: localtime
          resources:
            limits:
              cpu: 1000m
              memory: 2000Mi
            requests:
              cpu: 100m
              memory: 200Mi
#          readinessProbe:
#            httpGet:
#              path: /ready
#              port: http
#            initialDelaySeconds: 20
#            periodSeconds: 10
#            successThreshold: 1
#            failureThreshold: 3
#          livenessProbe:
#            httpGet:
#              path: /health
#              port: http
#            initialDelaySeconds: 20
#            periodSeconds: 10
#            successThreshold: 1
#            failureThreshold: 3
      #imagePullSecrets:
      #  - name: docker-registry
      volumes:
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: config
          configMap:
            name: config.yaml