2022-01-21 04:31:09 +08:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
2022-04-12 01:26:06 +08:00
|
|
|
kind: DaemonSet
|
2022-01-21 04:31:09 +08:00
|
|
|
metadata:
|
|
|
|
name: hcloud-cloud-controller-manager
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: hcloud-cloud-controller-manger
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: hcloud-cloud-controller-manager
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: hcloud-cloud-controller-manager
|
|
|
|
annotations:
|
|
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
|
|
|
spec:
|
|
|
|
serviceAccountName: {{ external_hcloud_cloud.service_account_name }}
|
|
|
|
dnsPolicy: Default
|
|
|
|
tolerations:
|
|
|
|
- key: "node.cloudprovider.kubernetes.io/uninitialized"
|
|
|
|
value: "true"
|
|
|
|
effect: "NoSchedule"
|
|
|
|
- key: "CriticalAddonsOnly"
|
|
|
|
operator: "Exists"
|
|
|
|
- key: "node-role.kubernetes.io/master"
|
|
|
|
effect: NoSchedule
|
|
|
|
operator: Exists
|
|
|
|
- key: "node-role.kubernetes.io/control-plane"
|
|
|
|
effect: NoSchedule
|
|
|
|
operator: Exists
|
|
|
|
- key: "node.kubernetes.io/not-ready"
|
|
|
|
effect: "NoSchedule"
|
|
|
|
hostNetwork: true
|
|
|
|
containers:
|
|
|
|
- image: {{ docker_image_repo }}/hetznercloud/hcloud-cloud-controller-manager:{{ external_hcloud_cloud.controller_image_tag }}
|
|
|
|
name: hcloud-cloud-controller-manager
|
|
|
|
command:
|
|
|
|
- "/bin/hcloud-cloud-controller-manager"
|
|
|
|
- "--cloud-provider=hcloud"
|
|
|
|
- "--leader-elect=false"
|
|
|
|
- "--allow-untagged-cloud"
|
|
|
|
- "--allocate-node-cidrs=true"
|
2022-07-31 11:18:27 +08:00
|
|
|
- "--cluster-cidr={{ kube_pods_subnet }}"
|
2022-04-12 01:26:06 +08:00
|
|
|
{% if external_hcloud_cloud.controller_extra_args is defined %}
|
|
|
|
|
2022-01-21 04:31:09 +08:00
|
|
|
args:
|
|
|
|
{% for key, value in external_hcloud_cloud.controller_extra_args.items() %}
|
|
|
|
- "{{ '--' + key + '=' + value }}"
|
|
|
|
{% endfor %}
|
2022-04-12 01:26:06 +08:00
|
|
|
{% endif %}
|
2022-01-21 04:31:09 +08:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 50Mi
|
|
|
|
env:
|
|
|
|
- name: NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: HCLOUD_TOKEN
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2022-04-12 01:26:06 +08:00
|
|
|
name: {{ external_hcloud_cloud.token_secret_name }}
|
2022-01-21 04:31:09 +08:00
|
|
|
key: token
|
|
|
|
- name: HCLOUD_NETWORK
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: {{ external_hcloud_cloud.token_secret_name }}
|
2022-04-12 01:26:06 +08:00
|
|
|
key: network
|