Skip to content

Commit

Permalink
feat(helm): add ability to have cp start on hostNetwork (#4209)
Browse files Browse the repository at this point in the history
For alternate overlay networking(other than the basic CNI provided by EKS for example, like cilium),
This is mandatory value that has to be set, otherwise it will have communication errors with the control plane.
If you are using the default CNI component, it's running on the default network.

Implement hostNetwork: true in cp-deployment.yaml file.

Signed-off-by: Sally Blich <sally.blich@walkme.com>
Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>
  • Loading branch information
SallyBlichWalkMe authored and Paul Parkanzky committed May 6, 2022
1 parent 7ac2bd9 commit 95d00db
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ controlPlane:
# -- Additional rules to apply on Kuma owner reference webhook. Useful when building custom policy on top of Kuma.
additionalRules: ""

# -- Specifies if the deployment should be started in hostNetwork mode.
hostNetwork: false

# -- Security context at the pod level for control plane.
podSecurityContext: {}
# # The values below are examples. More values can be added as needed, since the field resolves as free form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "kuma-ci/kuma-cp:greatest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,7 @@ spec:

kubernetes.io/arch: amd64
kubernetes.io/os: linux
hostNetwork: false
containers:
- name: control-plane
image: "docker.io/kumahq/kuma-cp:0.0.1"
Expand Down
1 change: 1 addition & 0 deletions deployments/charts/kuma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ A Helm chart for the Kuma Control Plane
| controlPlane.extraSecrets | list | `[]` | Additional secrets to mount into the control plane |
| controlPlane.webhooks.validator.additionalRules | string | `""` | Additional rules to apply on Kuma validator webhook. Useful when building custom policy on top of Kuma. |
| controlPlane.webhooks.ownerReference.additionalRules | string | `""` | Additional rules to apply on Kuma owner reference webhook. Useful when building custom policy on top of Kuma. |
| controlPlane.hostNetwork | bool | `false` | Specifies if the deployment should be started in hostNetwork mode. |
| controlPlane.podSecurityContext | object | `{}` | Security context at the pod level for control plane. |
| controlPlane.containerSecurityContext | object | `{}` | Security context at the container level for control plane. |
| cni.enabled | bool | `false` | Install Kuma with CNI instead of proxy init container |
Expand Down
1 change: 1 addition & 0 deletions deployments/charts/kuma/templates/cp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ spec:
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
hostNetwork: {{ .Values.controlPlane.hostNetwork }}
containers:
- name: control-plane
image: {{ include "kuma.formatImage" (dict "image" .Values.controlPlane.image "root" $) | quote }}
Expand Down
3 changes: 3 additions & 0 deletions deployments/charts/kuma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ controlPlane:
# -- Additional rules to apply on Kuma owner reference webhook. Useful when building custom policy on top of Kuma.
additionalRules: ""

# -- Specifies if the deployment should be started in hostNetwork mode.
hostNetwork: false

# -- Security context at the pod level for control plane.
podSecurityContext: {}
# # The values below are examples. More values can be added as needed, since the field resolves as free form.
Expand Down

0 comments on commit 95d00db

Please sign in to comment.