---
# Source: pxc-operator/templates/role-binding.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: pxc-operator
  namespace: default
---
# Source: pxc-operator/templates/role.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: pxc-operator
  namespace: default
  labels:
    app.kubernetes.io/name: pxc-operator
    helm.sh/chart: pxc-operator-1.19.1
    app.kubernetes.io/instance: pxc-operator
    app.kubernetes.io/version: "1.19.1"
    app.kubernetes.io/managed-by: Helm
rules:
- apiGroups:
  - pxc.percona.com
  resources:
  - perconaxtradbclusters
  - perconaxtradbclusters/status
  - perconaxtradbclusterbackups
  - perconaxtradbclusterbackups/status
  - perconaxtradbclusterrestores
  - perconaxtradbclusterrestores/status
  - perconaxtradbclusterrestores/finalizers
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - ""
  resources:
  - pods
  - pods/exec
  - pods/log
  - configmaps
  - services
  - persistentvolumeclaims
  - secrets
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - apps
  resources:
  - deployments
  - replicasets
  - statefulsets
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - batch
  resources:
  - jobs
  - cronjobs
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - policy
  resources:
  - poddisruptionbudgets
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - events.k8s.io
  - ""
  resources:
  - events
  verbs:
  - create
  - patch
  - get
  - list
  - watch
- apiGroups:
  - certmanager.k8s.io
  - cert-manager.io
  resources:
  - issuers
  - certificates
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
  - deletecollection
---
# Source: pxc-operator/templates/role-binding.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: pxc-operator
  namespace: default
  labels:
    app.kubernetes.io/name: pxc-operator
    helm.sh/chart: pxc-operator-1.19.1
    app.kubernetes.io/instance: pxc-operator
    app.kubernetes.io/version: "1.19.1"
    app.kubernetes.io/managed-by: Helm
subjects:
- kind: ServiceAccount
  name: pxc-operator
roleRef:
  kind: Role
  name: pxc-operator
  apiGroup: rbac.authorization.k8s.io
---
# Source: pxc-operator/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: pxc-operator
  namespace: default
  labels:
    app.kubernetes.io/name: pxc-operator
    helm.sh/chart: pxc-operator-1.19.1
    app.kubernetes.io/instance: pxc-operator
    app.kubernetes.io/version: "1.19.1"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: operator
      app.kubernetes.io/name: pxc-operator
      app.kubernetes.io/instance: pxc-operator
      app.kubernetes.io/part-of: pxc-operator
  strategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/component: operator
        app.kubernetes.io/name: pxc-operator
        app.kubernetes.io/instance: pxc-operator
        app.kubernetes.io/part-of: pxc-operator
    spec:
      serviceAccountName: pxc-operator
      terminationGracePeriodSeconds: 600
      containers:
        - name: percona-xtradb-cluster-operator
          image: percona/percona-xtradb-cluster-operator:1.19.1
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 8080
            name: metrics
            protocol: TCP
          command:
          - percona-xtradb-cluster-operator
          env:
            - name: WATCH_NAMESPACE
              value: "default"
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: pxc-operator
            - name: LOG_STRUCTURED
              value: "false"
            - name: LOG_LEVEL
              value: "INFO"
            - name: DISABLE_TELEMETRY
              value: "false"
            - name: MAX_CONCURRENT_RECONCILES
              value: "1"
            - name: S3_WORKERS_LIMIT
              value: "10"
            - name: PXCO_FEATURE_GATES
              value: "XtrabackupSidecar=false"
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /metrics
              port: metrics
              scheme: HTTP
          resources:
            limits:
              cpu: 200m
              memory: 500Mi
            requests:
              cpu: 100m
              memory: 20Mi
