apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: preview
  name: community-website-archived-preview
spec:
  replicas: 1
  selector:
    matchLabels:
      app: community-website-archived-preview
  template:
    metadata:
      labels:
        app: community-website-archived-preview
    spec:
      containers:
      - name: nginx
        image: registry.cn-hangzhou.aliyuncs.com/pingcap-ee/tidb-community-website-archived:v2
        livenessProbe:
          httpGet:
            path: /archived/events/
            port: 80
          periodSeconds: 10
          initialDelaySeconds: 3
          successThreshold: 1
          timeoutSeconds: 4
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: "1"
            memory: 512Mi
          requests:
            cpu: "0.25"
            memory: 256Mi
      imagePullSecrets:
      - name: aliyun-hangzhou-registry

---

apiVersion: v1
kind: Service
metadata:
  namespace: preview
  name: community-website-archived-preview
  labels:
    app: community-website-archived-preview
spec:
  ports:
    - port: 80
      targetPort: 80
      protocol: TCP
      name: http
  selector:
    app: community-website-archived-preview