Skip to content

Commit

Permalink
feat: deploy without cni
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sergelogvinov committed Feb 5, 2024
1 parent 33faa60 commit 670ead7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/talos-cloud-controller-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
13 changes: 12 additions & 1 deletion charts/talos-cloud-controller-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion charts/talos-cloud-controller-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions docs/deploy/cloud-controller-manager-daemonset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 670ead7

Please sign in to comment.