apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: kubesphere
    component: ks-sample
    tier: backend
  name: ks-sample
  namespace: kubesphere-prod
spec:
  progressDeadlineSeconds: 600
  replicas: 2
  selector:
    matchLabels:
      app: kubesphere
      component: ks-sample
      tier: backend
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: kubesphere
        component: ks-sample
        tier: backend
    spec:
      containers:
        - env:
            - name: CACHE_IGNORE
              value: js|html
            - name: CACHE_PUBLIC_EXPIRATION
              value: 3d
          image: $REDISTRY/$NAMESPACE/$APP_NAME:$TAG_NAME
          imagePullPolicy: Always
          name: ks
          ports:
            - containerPort: 8080
              protocol: TCP
          resources:
            limits:
              cpu: 200m
              memory: 500Mi
            requests:
              cpu: 100m
              memory: 100Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30