feat: add hcloud-cloud-controller-manager
- needed for HCloud CSI driver to provide topology labels on nodes, so volumes can be provisioned
This commit is contained in:
parent
a88a681828
commit
4936e0cc99
2 changed files with 105 additions and 0 deletions
18
_argocd/apps/hcloud-cloud-controller-manager.yaml
Normal file
18
_argocd/apps/hcloud-cloud-controller-manager.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: hcloud-cloud-controller-manager
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
namespace: kube-system
|
||||
server: https://kubernetes.default.svc
|
||||
project: default
|
||||
source:
|
||||
path: cluster-components/hcloud-cloud-controller-manager
|
||||
repoURL: https://gitlab.mareshq.com/gitops/mareshq/bee.git
|
||||
targetRevision: HEAD
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
# NOTE: this release was tested against kubernetes v1.18.x
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: cloud-controller-manager
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: system:cloud-controller-manager
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: cloud-controller-manager
|
||||
namespace: kube-system
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hcloud-cloud-controller-manager
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hcloud-cloud-controller-manager
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: hcloud-cloud-controller-manager
|
||||
spec:
|
||||
serviceAccountName: cloud-controller-manager
|
||||
dnsPolicy: Default
|
||||
tolerations:
|
||||
# this taint is set by all kubelets running `--cloud-provider=external`
|
||||
# so we should tolerate it to schedule the cloud controller manager
|
||||
- key: "node.cloudprovider.kubernetes.io/uninitialized"
|
||||
value: "true"
|
||||
effect: "NoSchedule"
|
||||
- key: "CriticalAddonsOnly"
|
||||
operator: "Exists"
|
||||
# cloud controller manages should be able to run on masters
|
||||
- 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: hetznercloud/hcloud-cloud-controller-manager:v1.13.2
|
||||
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"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: HCLOUD_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hcloud
|
||||
key: token
|
||||
- name: HCLOUD_NETWORK
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hcloud
|
||||
key: network
|
||||
priorityClassName: system-cluster-critical
|
||||
Reference in a new issue