|
| 1 | +--- |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: digitalocean-cloud-controller-manager |
| 6 | + namespace: kube-system |
| 7 | +spec: |
| 8 | + replicas: 1 |
| 9 | + revisionHistoryLimit: 2 |
| 10 | + selector: |
| 11 | + matchLabels: |
| 12 | + app: digitalocean-cloud-controller-manager |
| 13 | + template: |
| 14 | + metadata: |
| 15 | + labels: |
| 16 | + app: digitalocean-cloud-controller-manager |
| 17 | + spec: |
| 18 | + dnsPolicy: Default |
| 19 | + hostNetwork: true |
| 20 | + serviceAccountName: cloud-controller-manager |
| 21 | + priorityClassName: system-cluster-critical |
| 22 | + tolerations: |
| 23 | + # this taint is set by all kubelets running `--cloud-provider=external` |
| 24 | + # so we should tolerate it to schedule the digitalocean ccm |
| 25 | + - key: "node.cloudprovider.kubernetes.io/uninitialized" |
| 26 | + value: "true" |
| 27 | + effect: "NoSchedule" |
| 28 | + - key: "CriticalAddonsOnly" |
| 29 | + operator: "Exists" |
| 30 | + # cloud controller manages should be able to run on masters |
| 31 | + # TODO: remove this when ccm is not supported on k8s <= 1.23 |
| 32 | + - key: "node-role.kubernetes.io/master" |
| 33 | + effect: NoSchedule |
| 34 | + # k8s clusters 1.24+ uses control-plane name instead of master |
| 35 | + - key: "node-role.kubernetes.io/control-plane" |
| 36 | + effect: NoSchedule |
| 37 | + containers: |
| 38 | + - image: digitalocean/digitalocean-cloud-controller-manager:v0.1.47 |
| 39 | + name: digitalocean-cloud-controller-manager |
| 40 | + command: |
| 41 | + - "/bin/digitalocean-cloud-controller-manager" |
| 42 | + - "--leader-elect=false" |
| 43 | + resources: |
| 44 | + requests: |
| 45 | + cpu: 100m |
| 46 | + memory: 50Mi |
| 47 | + env: |
| 48 | + - name: DO_ACCESS_TOKEN |
| 49 | + valueFrom: |
| 50 | + secretKeyRef: |
| 51 | + name: digitalocean |
| 52 | + key: access-token |
| 53 | + - image: digitalocean/digitalocean-cloud-controller-manager-admission-server:v0.1.47 |
| 54 | + name: digitalocean-cloud-controller-manager-admission-server |
| 55 | + command: |
| 56 | + - "/bin/digitalocean-cloud-controller-manager-admission-server" |
| 57 | + resources: |
| 58 | + requests: |
| 59 | + cpu: 100m |
| 60 | + memory: 50Mi |
| 61 | + env: |
| 62 | + - name: DO_ACCESS_TOKEN |
| 63 | + valueFrom: |
| 64 | + secretKeyRef: |
| 65 | + name: digitalocean |
| 66 | + key: access-token |
| 67 | + ports: |
| 68 | + - containerPort: 9443 |
| 69 | + name: admission |
| 70 | + protocol: TCP |
| 71 | + volumeMounts: |
| 72 | + - mountPath: /tmp/k8s-webhook-server/serving-certs |
| 73 | + name: digitalocean-cloud-controller-manager-serving-certs |
| 74 | + readOnly: true |
| 75 | + volumes: |
| 76 | + - name: digitalocean-cloud-controller-manager-serving-certs |
| 77 | + secret: |
| 78 | + defaultMode: 420 |
| 79 | + secretName: digitalocean-cloud-controller-manager-serving-certs |
| 80 | +--- |
| 81 | +apiVersion: v1 |
| 82 | +kind: ServiceAccount |
| 83 | +metadata: |
| 84 | + name: cloud-controller-manager |
| 85 | + namespace: kube-system |
| 86 | +--- |
| 87 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 88 | +kind: ClusterRole |
| 89 | +metadata: |
| 90 | + annotations: |
| 91 | + rbac.authorization.kubernetes.io/autoupdate: "true" |
| 92 | + name: system:cloud-controller-manager |
| 93 | +rules: |
| 94 | +- apiGroups: |
| 95 | + - coordination.k8s.io |
| 96 | + resources: |
| 97 | + - leases |
| 98 | + verbs: |
| 99 | + - get |
| 100 | + - watch |
| 101 | + - list |
| 102 | + - create |
| 103 | + - update |
| 104 | + - delete |
| 105 | +- apiGroups: |
| 106 | + - "" |
| 107 | + resources: |
| 108 | + - events |
| 109 | + verbs: |
| 110 | + - create |
| 111 | + - patch |
| 112 | + - update |
| 113 | +- apiGroups: |
| 114 | + - "" |
| 115 | + resources: |
| 116 | + - nodes |
| 117 | + verbs: |
| 118 | + - '*' |
| 119 | +- apiGroups: |
| 120 | + - "" |
| 121 | + resources: |
| 122 | + - nodes/status |
| 123 | + verbs: |
| 124 | + - patch |
| 125 | +- apiGroups: |
| 126 | + - "" |
| 127 | + resources: |
| 128 | + - services |
| 129 | + verbs: |
| 130 | + - list |
| 131 | + - patch |
| 132 | + - update |
| 133 | + - watch |
| 134 | +- apiGroups: |
| 135 | + - "" |
| 136 | + resources: |
| 137 | + - services/status |
| 138 | + verbs: |
| 139 | + - list |
| 140 | + - patch |
| 141 | + - update |
| 142 | + - watch |
| 143 | +- apiGroups: |
| 144 | + - "" |
| 145 | + resources: |
| 146 | + - serviceaccounts |
| 147 | + verbs: |
| 148 | + - create |
| 149 | +- apiGroups: |
| 150 | + - "" |
| 151 | + resources: |
| 152 | + - persistentvolumes |
| 153 | + verbs: |
| 154 | + - get |
| 155 | + - list |
| 156 | + - update |
| 157 | + - watch |
| 158 | +- apiGroups: |
| 159 | + - "" |
| 160 | + resources: |
| 161 | + - endpoints |
| 162 | + verbs: |
| 163 | + - create |
| 164 | + - get |
| 165 | + - list |
| 166 | + - watch |
| 167 | + - update |
| 168 | +--- |
| 169 | +kind: ClusterRoleBinding |
| 170 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 171 | +metadata: |
| 172 | + name: system:cloud-controller-manager |
| 173 | +roleRef: |
| 174 | + apiGroup: rbac.authorization.k8s.io |
| 175 | + kind: ClusterRole |
| 176 | + name: system:cloud-controller-manager |
| 177 | +subjects: |
| 178 | +- kind: ServiceAccount |
| 179 | + name: cloud-controller-manager |
| 180 | + namespace: kube-system |
| 181 | +--- |
| 182 | +apiVersion: v1 |
| 183 | +kind: Service |
| 184 | +metadata: |
| 185 | + name: digitalocean-cloud-controller-manager |
| 186 | + namespace: kube-system |
| 187 | +spec: |
| 188 | + selector: |
| 189 | + app: digitalocean-cloud-controller-manager |
| 190 | + ports: |
| 191 | + - protocol: TCP |
| 192 | + port: 443 |
| 193 | + targetPort: 9443 |
| 194 | +--- |
| 195 | +apiVersion: cert-manager.io/v1 |
| 196 | +kind: Certificate |
| 197 | +metadata: |
| 198 | + name: digitalocean-cloud-controller-manager-serving-certs |
| 199 | + namespace: kube-system |
| 200 | +spec: |
| 201 | + dnsNames: |
| 202 | + - digitalocean-cloud-controller-manager |
| 203 | + - digitalocean-cloud-controller-manager.kube-system.svc |
| 204 | + - digitalocean-cloud-controller-manager.kube-system.svc.cluster.local |
| 205 | + issuerRef: |
| 206 | + kind: Issuer |
| 207 | + name: digitalocean-cloud-controller-manager-selfsigned-issuer |
| 208 | + secretName: digitalocean-cloud-controller-manager-serving-certs |
| 209 | +--- |
| 210 | +apiVersion: cert-manager.io/v1 |
| 211 | +kind: Issuer |
| 212 | +metadata: |
| 213 | + name: digitalocean-cloud-controller-manager-selfsigned-issuer |
| 214 | + namespace: kube-system |
| 215 | +spec: |
| 216 | + selfSigned: {} |
| 217 | +--- |
| 218 | +apiVersion: admissionregistration.k8s.io/v1 |
| 219 | +kind: ValidatingWebhookConfiguration |
| 220 | +metadata: |
| 221 | + annotations: |
| 222 | + cert-manager.io/inject-ca-from: kube-system/digitalocean-cloud-controller-manager-serving-certs |
| 223 | + name: digitalocean-cloud-controller-manager-admission-webhook |
| 224 | +webhooks: |
| 225 | +- name: validation-webhook.loadbalancer.doks.io |
| 226 | + admissionReviewVersions: |
| 227 | + - v1 |
| 228 | + clientConfig: |
| 229 | + service: |
| 230 | + namespace: "kube-system" |
| 231 | + name: "digitalocean-cloud-controller-manager" |
| 232 | + path: "/lb-service" |
| 233 | + failurePolicy: Ignore |
| 234 | + rules: |
| 235 | + - apiGroups: |
| 236 | + - "" |
| 237 | + apiVersions: |
| 238 | + - v1 |
| 239 | + operations: |
| 240 | + - CREATE |
| 241 | + - UPDATE |
| 242 | + resources: |
| 243 | + - services |
| 244 | + scope: Namespaced |
| 245 | + sideEffects: None |
0 commit comments