mirror of https://git.rancher.io/rke2-charts
78 lines
2.2 KiB
YAML
78 lines
2.2 KiB
YAML
{{ if .Values.calico.calicoKubeControllers }}
|
|
---
|
|
# Source: calico/templates/calico-kube-controllers.yaml
|
|
# See https://github.com/projectcalico/kube-controllers
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}-kube-controllers
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: calico-kube-controllers
|
|
spec:
|
|
# The controllers can only have a single active instance.
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: calico-kube-controllers
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
name: {{ .Release.Name }}-kube-controllers
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: calico-kube-controllers
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/os: linux
|
|
tolerations:
|
|
# Mark the pod as a critical add-on for rescheduling.
|
|
- key: CriticalAddonsOnly
|
|
operator: Exists
|
|
- key: node-role.kubernetes.io/master
|
|
effect: NoSchedule
|
|
serviceAccountName: calico-kube-controllers
|
|
priorityClassName: system-cluster-critical
|
|
containers:
|
|
- name: calico-kube-controllers
|
|
image: {{ template "system_default_registry" . }}{{ .Values.calico.kubeControllerImage.repository }}:{{ .Values.calico.kubeControllerImage.tag }}
|
|
command: ["/usr/bin/kube-controllers"]
|
|
env:
|
|
# Choose which controllers to run.
|
|
- name: ENABLED_CONTROLLERS
|
|
value: node
|
|
- name: DATASTORE_TYPE
|
|
value: kubernetes
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /usr/bin/check-status
|
|
- -l
|
|
periodSeconds: 10
|
|
initialDelaySeconds: 10
|
|
failureThreshold: 6
|
|
timeoutSeconds: 10
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /usr/bin/check-status
|
|
- -r
|
|
periodSeconds: 10
|
|
---
|
|
# This manifest creates a Pod Disruption Budget for Controller to allow K8s Cluster Autoscaler to evict
|
|
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: calico-kube-controllers
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: calico-kube-controllers
|
|
spec:
|
|
maxUnavailable: 1
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: calico-kube-controllers
|
|
{{ end }}
|