Created
August 1, 2018 21:46
-
-
Save andrewsykim/26e22e36471c1774e3626a70d2b7465f to your computer and use it in GitHub Desktop.
DaemonSet for DigitalOcean Cloud Controller Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: digitalocean | |
namespace: kube-system | |
stringData: | |
# insert your DO access token here | |
access-token: {{ DO_TOKEN }} | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: digitalocean-cloud-controller-manager | |
namespace: kube-system | |
spec: | |
selector: | |
matchLabels: | |
k8s-app: digitalocean-cloud-controller-manager | |
template: | |
metadata: | |
labels: | |
k8s-app: digitalocean-cloud-controller-manager | |
annotations: | |
scheduler.alpha.kubernetes.io/critical-pod: '' | |
spec: | |
nodeSelector: | |
node-role.kubernetes.io/master: "" | |
serviceAccountName: cloud-controller-manager | |
dnsPolicy: Default | |
hostNetwork: true | |
tolerations: | |
- key: "node.cloudprovider.kubernetes.io/uninitialized" | |
value: "true" | |
effect: "NoSchedule" | |
- key: "CriticalAddonsOnly" | |
operator: "Exists" | |
- key: "node-role.kubernetes.io/master" | |
effect: NoSchedule | |
- effect: NoExecute | |
key: node.kubernetes.io/not-ready | |
operator: Exists | |
tolerationSeconds: 300 | |
- effect: NoExecute | |
key: node.kubernetes.io/unreachable | |
operator: Exists | |
tolerationSeconds: 300 | |
containers: | |
- image: digitalocean/digitalocean-cloud-controller-manager:v0.1.6 | |
name: digitalocean-cloud-controller-manager | |
command: | |
- "/bin/digitalocean-cloud-controller-manager" | |
- "--cloud-provider=digitalocean" | |
- "--leader-elect=true" | |
resources: | |
requests: | |
cpu: 100m | |
memory: 50Mi | |
env: | |
- name: KUBERNETES_SERVICE_HOST | |
value: "127.0.0.1" | |
- name: KUBERNETES_SERVICE_PORT | |
value: "443" | |
- name: DO_ACCESS_TOKEN | |
valueFrom: | |
secretKeyRef: | |
name: digitalocean | |
key: access-token | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: cloud-controller-manager | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
annotations: | |
rbac.authorization.kubernetes.io/autoupdate: "true" | |
name: system:cloud-controller-manager | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- events | |
verbs: | |
- create | |
- patch | |
- update | |
- apiGroups: | |
- "" | |
resources: | |
- nodes | |
verbs: | |
- '*' | |
- apiGroups: | |
- "" | |
resources: | |
- nodes/status | |
verbs: | |
- patch | |
- apiGroups: | |
- "" | |
resources: | |
- services | |
verbs: | |
- list | |
- patch | |
- update | |
- watch | |
- apiGroups: | |
- "" | |
resources: | |
- services/status | |
verbs: | |
- list | |
- patch | |
- update | |
- watch | |
- apiGroups: | |
- "" | |
resources: | |
- serviceaccounts | |
verbs: | |
- create | |
- apiGroups: | |
- "" | |
resources: | |
- persistentvolumes | |
verbs: | |
- get | |
- list | |
- update | |
- watch | |
- apiGroups: | |
- "" | |
resources: | |
- endpoints | |
verbs: | |
- create | |
- get | |
- list | |
- watch | |
- update | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: system:cloud-controller-manager | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: system:cloud-controller-manager | |
subjects: | |
- kind: ServiceAccount | |
name: cloud-controller-manager | |
namespace: kube-system |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment