2022-01-20 20:31:09 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
2022-04-11 17:26:06 +00:00
|
|
|
kind: DaemonSet
|
2022-01-20 20:31:09 +00: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"
|
|
|
|
- "--cluster-cidr=10.244.0.0/16"
|
2022-04-11 17:26:06 +00:00
|
|
|
{% if external_hcloud_cloud.controller_extra_args is defined %}
|
|
|
|
|
2022-01-20 20:31:09 +00:00
|
|
|
args:
|
|
|
|
{% for key, value in external_hcloud_cloud.controller_extra_args.items() %}
|
|
|
|
- "{{ '--' + key + '=' + value }}"
|
|
|
|
{% endfor %}
|
2022-04-11 17:26:06 +00:00
|
|
|
{% endif %}
|
2022-01-20 20:31:09 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 50Mi
|
|
|
|
env:
|
|
|
|
- name: NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: HCLOUD_TOKEN
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2022-04-11 17:26:06 +00:00
|
|
|
name: {{ external_hcloud_cloud.token_secret_name }}
|
2022-01-20 20:31:09 +00:00
|
|
|
key: token
|
|
|
|
- name: HCLOUD_NETWORK
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: {{ external_hcloud_cloud.token_secret_name }}
|
2022-04-11 17:26:06 +00:00
|
|
|
key: network
|