|
| 1 | +apiVersion: v1 |
| 2 | +kind: Namespace |
| 3 | +metadata: |
| 4 | + name: rook-system |
| 5 | +--- |
| 6 | +kind: ClusterRole |
| 7 | +apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 8 | +metadata: |
| 9 | + name: rook-operator |
| 10 | +rules: |
| 11 | +- apiGroups: |
| 12 | + - "" |
| 13 | + resources: |
| 14 | + - namespaces |
| 15 | + - serviceaccounts |
| 16 | + - secrets |
| 17 | + - pods |
| 18 | + - services |
| 19 | + - nodes |
| 20 | + - nodes/proxy |
| 21 | + - configmaps |
| 22 | + - events |
| 23 | + - persistentvolumes |
| 24 | + - persistentvolumeclaims |
| 25 | + verbs: |
| 26 | + - get |
| 27 | + - list |
| 28 | + - watch |
| 29 | + - patch |
| 30 | + - create |
| 31 | + - update |
| 32 | + - delete |
| 33 | +- apiGroups: |
| 34 | + - extensions |
| 35 | + resources: |
| 36 | + - thirdpartyresources |
| 37 | + - deployments |
| 38 | + - daemonsets |
| 39 | + - replicasets |
| 40 | + verbs: |
| 41 | + - get |
| 42 | + - list |
| 43 | + - watch |
| 44 | + - create |
| 45 | + - update |
| 46 | + - delete |
| 47 | +- apiGroups: |
| 48 | + - apiextensions.k8s.io |
| 49 | + resources: |
| 50 | + - customresourcedefinitions |
| 51 | + verbs: |
| 52 | + - get |
| 53 | + - list |
| 54 | + - watch |
| 55 | + - create |
| 56 | + - delete |
| 57 | +- apiGroups: |
| 58 | + - rbac.authorization.k8s.io |
| 59 | + resources: |
| 60 | + - clusterroles |
| 61 | + - clusterrolebindings |
| 62 | + - roles |
| 63 | + - rolebindings |
| 64 | + verbs: |
| 65 | + - get |
| 66 | + - list |
| 67 | + - watch |
| 68 | + - create |
| 69 | + - update |
| 70 | + - delete |
| 71 | +- apiGroups: |
| 72 | + - storage.k8s.io |
| 73 | + resources: |
| 74 | + - storageclasses |
| 75 | + verbs: |
| 76 | + - get |
| 77 | + - list |
| 78 | + - watch |
| 79 | + - delete |
| 80 | +- apiGroups: |
| 81 | + - rook.io |
| 82 | + resources: |
| 83 | + - "*" |
| 84 | + verbs: |
| 85 | + - "*" |
| 86 | +--- |
| 87 | +apiVersion: v1 |
| 88 | +kind: ServiceAccount |
| 89 | +metadata: |
| 90 | + name: rook-operator |
| 91 | + namespace: rook-system |
| 92 | +--- |
| 93 | +kind: ClusterRoleBinding |
| 94 | +apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 95 | +metadata: |
| 96 | + name: rook-operator |
| 97 | + namespace: rook-system |
| 98 | +roleRef: |
| 99 | + apiGroup: rbac.authorization.k8s.io |
| 100 | + kind: ClusterRole |
| 101 | + name: rook-operator |
| 102 | +subjects: |
| 103 | +- kind: ServiceAccount |
| 104 | + name: rook-operator |
| 105 | + namespace: rook-system |
| 106 | +--- |
| 107 | +apiVersion: apps/v1beta1 |
| 108 | +kind: Deployment |
| 109 | +metadata: |
| 110 | + name: rook-operator |
| 111 | + namespace: rook-system |
| 112 | +spec: |
| 113 | + replicas: 1 |
| 114 | + template: |
| 115 | + metadata: |
| 116 | + labels: |
| 117 | + app: rook-operator |
| 118 | + spec: |
| 119 | + serviceAccountName: rook-operator |
| 120 | + containers: |
| 121 | + - name: rook-operator |
| 122 | + image: rook/rook:master |
| 123 | + args: ["operator"] |
| 124 | + env: |
| 125 | + # To disable RBAC, uncomment the following: |
| 126 | + # - name: RBAC_ENABLED |
| 127 | + # value: "false" |
| 128 | + # Rook Agent toleration. Will tolerate all taints with all keys. |
| 129 | + # Choose between NoSchedule, PreferNoSchedule and NoExecute: |
| 130 | + # - name: AGENT_TOLERATION |
| 131 | + # value: "NoSchedule" |
| 132 | + # (Optional) Rook Agent toleration key. Set this to the key of the taint you want to tolerate |
| 133 | + # - name: AGENT_TOLERATION_KEY |
| 134 | + # value: "<KeyOfTheTaintToTolerate>" |
| 135 | + # Set the path where the Rook agent can find the flex volumes |
| 136 | + # - name: FLEXVOLUME_DIR_PATH |
| 137 | + # value: "<PathToFlexVolumes>" |
| 138 | + # The interval to check if every mon is in the quorum. |
| 139 | + - name: ROOK_MON_HEALTHCHECK_INTERVAL |
| 140 | + value: "45s" |
| 141 | + - name: FLEXVOLUME_DIR_PATH |
| 142 | + value: "/var/lib/kubelet/volumeplugins" |
| 143 | + # The duration to wait before trying to failover or remove/replace the |
| 144 | + # current mon with a new mon (useful for compensating flapping network). |
| 145 | + - name: ROOK_MON_OUT_TIMEOUT |
| 146 | + value: "300s" |
| 147 | + - name: NODE_NAME |
| 148 | + valueFrom: |
| 149 | + fieldRef: |
| 150 | + fieldPath: spec.nodeName |
| 151 | + - name: POD_NAME |
| 152 | + valueFrom: |
| 153 | + fieldRef: |
| 154 | + fieldPath: metadata.name |
| 155 | + - name: POD_NAMESPACE |
| 156 | + valueFrom: |
| 157 | + fieldRef: |
| 158 | + fieldPath: metadata.namespace |
0 commit comments