feat: deploy without cni

Run TalosCCM Deployment Without CNI Readines.
When the useDaemonSet parameter is set to true, CCM will use the node IP to access Kubernetes and Talos API.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
This commit is contained in:
Serge Logvinov
2024-02-05 11:11:52 +02:00
parent 33faa60ccb
commit 670ead78bd
4 changed files with 24 additions and 3 deletions

View File

@@ -80,7 +80,7 @@ helm upgrade -i --namespace=kube-system -f talos-ccm.yaml \
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
| tolerations | list | `[{"effect":"NoSchedule","key":"node-role.kubernetes.io/control-plane","operator":"Exists"},{"effect":"NoSchedule","key":"node.cloudprovider.kubernetes.io/uninitialized","operator":"Exists"}]` | Tolerations for data pods assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
| updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | Deployment update stategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment |
| useDaemonSet | bool | `false` | Deploy CCM in Daemonset mode. CCM will use hostNetwork and host resolv.conf |
| useDaemonSet | bool | `false` | Deploy CCM in Daemonset mode. CCM will use hostNetwork and current node to access kubernetes/talos API You can run it without CNI plugin. |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)

View File

@@ -65,6 +65,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KUBERNETES_SERVICE_HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KUBERNETES_SERVICE_PORT
value: "6443"
{{- end }}
ports:
- containerPort: {{ .Values.service.containerPort }}
@@ -95,10 +101,15 @@ spec:
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- with .Values.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.useDaemonSet }}
- effect: NoSchedule
key: node.kubernetes.io/not-ready
operator: Exists
{{- end }}
volumes:
- name: cloud-config
configMap:

View File

@@ -104,7 +104,8 @@ resources:
memory: 64Mi
# -- Deploy CCM in Daemonset mode.
# CCM will use hostNetwork and host resolv.conf
# CCM will use hostNetwork and current node to access kubernetes/talos API
# You can run it without CNI plugin.
useDaemonSet: false
# -- Deployment update stategy type.

View File

@@ -236,6 +236,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KUBERNETES_SERVICE_HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KUBERNETES_SERVICE_PORT
value: "6443"
ports:
- containerPort: 50258
name: https
@@ -268,6 +274,9 @@ spec:
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
operator: Exists
- effect: NoSchedule
key: node.kubernetes.io/not-ready
operator: Exists
volumes:
- name: cloud-config
configMap: