apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  labels:
    app.kubernetes.io/instance: frontend
    app.kubernetes.io/name: demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: frontend
      app.kubernetes.io/name: demo
  strategy: 
    type: RollingUpdate
    rollingUpdate: 
      maxUnavailable: 1
      maxSurge: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: frontend
        app.kubernetes.io/name: demo
    spec:
      containers:
        - name: frontend
          image: ccr.ccs.tencentyun.com/koderover-public/frontend:latest
          imagePullPolicy: Always
          ports:
            - protocol: TCP
              containerPort: 80
          resources:
            limits:
              cpu: 1
              memory: 512Mi
            requests:
              cpu: 100m
              memory: 100M
      imagePullSecrets:
        - name: default-registry-secret
