Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deploy without cni #129

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it easier to use hostnetwork?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT are using for go-kubernetes client connection.

Node can have IPv4 or IPv6 and status.podIP will have preferred IP to reach the node.
I am not sure about 127.0.0.1 or ::1 addresses.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's better I'm all for it :thumbsup

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
Loading