apiVersion: apps/v1
kind: Deployment
metadata:
  name: advanced-statefulset-controller
  namespace: advanced-statefulset
  labels:
    app: advanced-statefulset-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: advanced-statefulset-controller
  template:
    metadata:
      labels:
        app: advanced-statefulset-controller
    spec:
      containers:
      - name: advanced-statefulset-controller
        image: uhub.service.ucloud.cn/infra/statefulset-pingcap-controller-manager:303930b
        imagePullPolicy: IfNotPresent
        args:
        - --v=4
        - --leader-elect
        - --leader-elect-resource-name=advanced-statefulset-controller
        - --leader-elect-resource-namespace=$(POD_NAMESPACE)
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
      serviceAccountName: advanced-statefulset-controller
