|
1 | 1 | # Note: kubectl apply the generated file after the cluster is provisioned
|
2 |
| -# todo: csi and ccm here!! |
| 2 | +# todo: csi here!! |
| 3 | +--- |
| 4 | +apiVersion: apps/v1 |
| 5 | +kind: Deployment |
| 6 | +metadata: |
| 7 | + name: packet-cloud-controller-manager |
| 8 | + namespace: kube-system |
| 9 | + labels: |
| 10 | + app: packet-cloud-controller-manager |
| 11 | +spec: |
| 12 | + replicas: 1 |
| 13 | + selector: |
| 14 | + matchLabels: |
| 15 | + app: packet-cloud-controller-manager |
| 16 | + template: |
| 17 | + metadata: |
| 18 | + labels: |
| 19 | + app: packet-cloud-controller-manager |
| 20 | + annotations: |
| 21 | + scheduler.alpha.kubernetes.io/critical-pod: '' |
| 22 | + spec: |
| 23 | + dnsPolicy: Default |
| 24 | + hostNetwork: true |
| 25 | + serviceAccountName: cloud-controller-manager |
| 26 | + tolerations: |
| 27 | + # this taint is set by all kubelets running `--cloud-provider=external` |
| 28 | + # so we should tolerate it to schedule the packet ccm |
| 29 | + - key: "node.cloudprovider.kubernetes.io/uninitialized" |
| 30 | + value: "true" |
| 31 | + effect: "NoSchedule" |
| 32 | + - key: "CriticalAddonsOnly" |
| 33 | + operator: "Exists" |
| 34 | + - key: "node.kubernetes.io/not-ready" |
| 35 | + effect: "NoSchedule" |
| 36 | + # cloud controller manager should be able to run on masters |
| 37 | + - key: "node-role.kubernetes.io/master" |
| 38 | + effect: NoSchedule |
| 39 | + containers: |
| 40 | + - image: packethost/packet-ccm:v0.0.4 |
| 41 | + name: packet-cloud-controller-manager |
| 42 | + command: |
| 43 | + - "./packet-cloud-controller-manager" |
| 44 | + - "--cloud-provider=packet" |
| 45 | + - "--leader-elect=false" |
| 46 | + - "--allow-untagged-cloud=true" |
| 47 | + resources: |
| 48 | + requests: |
| 49 | + cpu: 100m |
| 50 | + memory: 50Mi |
| 51 | + env: |
| 52 | + - name: PACKET_AUTH_TOKEN |
| 53 | + valueFrom: |
| 54 | + secretKeyRef: |
| 55 | + name: packet-cloud-config |
| 56 | + key: apiKey |
| 57 | + - name: PACKET_PROJECT_ID |
| 58 | + valueFrom: |
| 59 | + secretKeyRef: |
| 60 | + name: packet-cloud-config |
| 61 | + key: projectID |
| 62 | +--- |
| 63 | +apiVersion: v1 |
| 64 | +kind: ServiceAccount |
| 65 | +metadata: |
| 66 | + name: cloud-controller-manager |
| 67 | + namespace: kube-system |
| 68 | +--- |
| 69 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 70 | +kind: ClusterRole |
| 71 | +metadata: |
| 72 | + annotations: |
| 73 | + rbac.authorization.kubernetes.io/autoupdate: "true" |
| 74 | + name: system:cloud-controller-manager |
| 75 | +rules: |
| 76 | +- apiGroups: |
| 77 | + - "" |
| 78 | + resources: |
| 79 | + - events |
| 80 | + verbs: |
| 81 | + - create |
| 82 | + - patch |
| 83 | + - update |
| 84 | +- apiGroups: |
| 85 | + - "" |
| 86 | + resources: |
| 87 | + - nodes |
| 88 | + verbs: |
| 89 | + - '*' |
| 90 | +- apiGroups: |
| 91 | + - "" |
| 92 | + resources: |
| 93 | + - nodes/status |
| 94 | + verbs: |
| 95 | + - patch |
| 96 | +- apiGroups: |
| 97 | + - "" |
| 98 | + resources: |
| 99 | + - services |
| 100 | + verbs: |
| 101 | + - list |
| 102 | + - patch |
| 103 | + - update |
| 104 | + - watch |
| 105 | +- apiGroups: |
| 106 | + - "" |
| 107 | + resources: |
| 108 | + - services/status |
| 109 | + verbs: |
| 110 | + - list |
| 111 | + - patch |
| 112 | + - update |
| 113 | + - watch |
| 114 | +- apiGroups: |
| 115 | + - "" |
| 116 | + resources: |
| 117 | + - serviceaccounts |
| 118 | + verbs: |
| 119 | + - create |
| 120 | +- apiGroups: |
| 121 | + - "" |
| 122 | + resources: |
| 123 | + - persistentvolumes |
| 124 | + verbs: |
| 125 | + - get |
| 126 | + - list |
| 127 | + - update |
| 128 | + - watch |
| 129 | +- apiGroups: |
| 130 | + - "" |
| 131 | + resources: |
| 132 | + - endpoints |
| 133 | + verbs: |
| 134 | + - create |
| 135 | + - get |
| 136 | + - list |
| 137 | + - watch |
| 138 | + - update |
| 139 | +--- |
| 140 | +kind: ClusterRoleBinding |
| 141 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 142 | +metadata: |
| 143 | + name: system:cloud-controller-manager |
| 144 | +roleRef: |
| 145 | + apiGroup: rbac.authorization.k8s.io |
| 146 | + kind: ClusterRole |
| 147 | + name: system:cloud-controller-manager |
| 148 | +subjects: |
| 149 | +- kind: ServiceAccount |
| 150 | + name: cloud-controller-manager |
| 151 | + namespace: kube-system |
3 | 152 | ---
|
4 | 153 | kind: StorageClass
|
5 | 154 | apiVersion: storage.k8s.io/v1
|
|
0 commit comments