blob: 65bb35c19f64460b83a578dc6afebc5078d1489e [file] [log] [blame]
Mohammed Naserafcf0a12024-05-19 00:13:27 +02001# SOURCE: https://install.portworx.com/?comp=pxoperator
2
3apiVersion: v1
4kind: ServiceAccount
5metadata:
6 name: portworx-operator
7 namespace: kube-system
8---
9kind: ClusterRole
10apiVersion: rbac.authorization.k8s.io/v1
11metadata:
12 name: portworx-operator
13rules:
14 - apiGroups: ["*"]
15 resources: ["*"]
16 verbs: ["*"]
17---
18kind: ClusterRoleBinding
19apiVersion: rbac.authorization.k8s.io/v1
20metadata:
21 name: portworx-operator
22subjects:
23- kind: ServiceAccount
24 name: portworx-operator
25 namespace: kube-system
26roleRef:
27 kind: ClusterRole
28 name: portworx-operator
29 apiGroup: rbac.authorization.k8s.io
30---
31apiVersion: apps/v1
32kind: Deployment
33metadata:
34 name: portworx-operator
35 namespace: kube-system
36spec:
37 strategy:
38 rollingUpdate:
39 maxSurge: 1
40 maxUnavailable: 1
41 type: RollingUpdate
42 replicas: 1
43 selector:
44 matchLabels:
45 name: portworx-operator
46 template:
47 metadata:
48 labels:
49 name: portworx-operator
50 spec:
51 containers:
52 - name: portworx-operator
53 imagePullPolicy: Always
54 image: portworx/px-operator:23.10.5
55 command:
56 - /operator
57 - --verbose
58 - --driver=portworx
59 - --leader-elect=true
60 env:
61 - name: OPERATOR_NAME
62 value: portworx-operator
63 - name: POD_NAME
64 valueFrom:
65 fieldRef:
66 fieldPath: metadata.name
67 affinity:
68 podAntiAffinity:
69 requiredDuringSchedulingIgnoredDuringExecution:
70 - labelSelector:
71 matchExpressions:
72 - key: "name"
73 operator: In
74 values:
75 - portworx-operator
76 topologyKey: "kubernetes.io/hostname"
77 serviceAccountName: portworx-operator
78 # NOTE(mnaser): Add this to keep running on control plane
79 nodeSelector:
80 openstack-control-plane: enabled