Skip to content

Commit

Permalink
fix(cluster-pools): fix parameter
Browse files Browse the repository at this point in the history
`cluster-pool-ipv4-cidr` and `cluster-pool-ipv6-cidr` should be string slices and not string

Signed-off-by: cndoit18 <cndoit18@outlook.com>
  • Loading branch information
cndoit18 authored and aanm committed Nov 22, 2021
1 parent 7112706 commit 8a7c37f
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Documentation/cmdref/cilium-operator-alibabacloud.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Documentation/cmdref/cilium-operator-aws.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Documentation/cmdref/cilium-operator-azure.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Documentation/cmdref/cilium-operator-generic.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Documentation/cmdref/cilium-operator.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Documentation/gettingstarted/ipam-cluster-pool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Enable Cluster-pool IPAM mode
#. Depending if you are using IPv4 and / or IPv6, you might want to adjust
the ``podCIDR`` allocated for your cluster's pods with the options:

* ``--set ipam.operator.clusterPoolIPv4PodCIDR=<IPv4CIDR>``
* ``--set ipam.operator.clusterPoolIPv6PodCIDR=<IPv6CIDR>``
* ``--set ipam.operator.clusterPoolIPv4PodCIDRList=<IPv4CIDR>``
* ``--set ipam.operator.clusterPoolIPv6PodCIDRList=<IPv6CIDR>``

#. To adjust the CIDR size that should be allocated for each node you can use
the following options:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/gettingstarted/k8s-install-openshift-okd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The resulting configuration will look like this:
You may wish to make a few changes, e.g. increase the number of nodes.

If you do change any of the CIDRs, you will need to make sure that Helm values in ``${CLUSTER_NAME}/manifests/cluster-network-07-cilium-ciliumconfig.yaml``
reflect those changes. Namely ``clusterNetwork`` should match ``nativeRoutingCIDR``, ``clusterPoolIPv4PodCIDR`` and ``clusterPoolIPv4MaskSize``.
reflect those changes. Namely ``clusterNetwork`` should match ``nativeRoutingCIDR``, ``clusterPoolIPv4PodCIDRList`` and ``clusterPoolIPv4MaskSize``.
Also make sure that the ``clusterNetwork`` does not conflict with ``machineNetwork`` (which represents the VPC CIDR in AWS).

.. warning::
Expand Down
12 changes: 10 additions & 2 deletions Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Documentation/operations/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ Helm Options
~~~~~~~~~~~~

* ``hostFirewall`` was renamed to ``hostFirewall.enabled``.
* ``ipam.operator.clusterPoolIPv4PodCIDR`` was deprecated in favor of ``ipam.operator.clusterPoolIPv4PodCIDRList``
* ``ipam.operator.clusterPoolIPv6PodCIDR`` was deprecated in favor of ``ipam.operator.clusterPoolIPv6PodCIDRList``

.. _1.10_upgrade_notes:

Expand Down
1 change: 1 addition & 0 deletions Documentation/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ O'Reilly
Pepelnjak
Pfaff
PodCIDR
PodCIDRList
Polytechnique
QCon
Qemu
Expand Down
6 changes: 4 additions & 2 deletions install/kubernetes/cilium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ contributors across the globe, there is almost always someone available to help.
| ipMasqAgent | object | `{"enabled":false}` | Configure the eBPF-based ip-masq-agent |
| ipam.mode | string | `"cluster-pool"` | Configure IP Address Management mode. ref: https://docs.cilium.io/en/stable/concepts/networking/ipam/ |
| ipam.operator.clusterPoolIPv4MaskSize | int | `24` | IPv4 CIDR mask size to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv4PodCIDR | string | `"10.0.0.0/8"` | IPv4 CIDR range to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv4PodCIDR | string | `"10.0.0.0/8"` | Deprecated in favor of ipam.operator.clusterPoolIPv4PodCIDRList. IPv4 CIDR range to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv4PodCIDRList | list | `[]` | IPv4 CIDR list range to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv6MaskSize | int | `120` | IPv6 CIDR mask size to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv6PodCIDR | string | `"fd00::/104"` | IPv6 CIDR range to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv6PodCIDR | string | `"fd00::/104"` | Deprecated in favor of ipam.operator.clusterPoolIPv6PodCIDRList. IPv6 CIDR range to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv6PodCIDRList | list | `[]` | IPv6 CIDR list range to delegate to individual nodes for IPAM. |
| ipv4.enabled | bool | `true` | Enable IPv4 support. |
| ipv6.enabled | bool | `false` | Enable IPv6 support. |
| ipvlan.enabled | bool | `false` | Enable the IPVLAN datapath |
Expand Down
10 changes: 9 additions & 1 deletion install/kubernetes/cilium/templates/cilium-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,19 @@ data:

{{- if eq $ipam "cluster-pool" }}
{{- if .Values.ipv4.enabled }}
{{- if .Values.ipam.operator.clusterPoolIPv4PodCIDRList }}
cluster-pool-ipv4-cidr: {{ .Values.ipam.operator.clusterPoolIPv4PodCIDRList | join " " | quote }}
{{- else }}
cluster-pool-ipv4-cidr: {{ .Values.ipam.operator.clusterPoolIPv4PodCIDR | quote }}
cluster-pool-ipv4-mask-size: {{ .Values.ipam.operator.clusterPoolIPv4MaskSize | quote }}
{{- end }}
cluster-pool-ipv4-mask-size: {{ .Values.ipam.operator.clusterPoolIPv4MaskSize | quote }}
{{- end }}
{{- if .Values.ipv6.enabled }}
{{- if .Values.ipam.operator.clusterPoolIPv6PodCIDRList }}
cluster-pool-ipv6-cidr: {{ .Values.ipam.operator.clusterPoolIPv6PodCIDRList | join " " | quote }}
{{- else }}
cluster-pool-ipv6-cidr: {{ .Values.ipam.operator.clusterPoolIPv6PodCIDR | quote }}
{{- end }}
cluster-pool-ipv6-mask-size: {{ .Values.ipam.operator.clusterPoolIPv6MaskSize | quote }}
{{- end }}
{{- end }}
Expand Down
10 changes: 8 additions & 2 deletions install/kubernetes/cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -926,12 +926,18 @@ ipam:
# ref: https://docs.cilium.io/en/stable/concepts/networking/ipam/
mode: "cluster-pool"
operator:
# -- IPv4 CIDR range to delegate to individual nodes for IPAM.
# -- Deprecated in favor of ipam.operator.clusterPoolIPv4PodCIDRList.
# IPv4 CIDR range to delegate to individual nodes for IPAM.
clusterPoolIPv4PodCIDR: "10.0.0.0/8"
# -- IPv4 CIDR list range to delegate to individual nodes for IPAM.
clusterPoolIPv4PodCIDRList: []
# -- IPv4 CIDR mask size to delegate to individual nodes for IPAM.
clusterPoolIPv4MaskSize: 24
# -- IPv6 CIDR range to delegate to individual nodes for IPAM.
# -- Deprecated in favor of ipam.operator.clusterPoolIPv6PodCIDRList.
# IPv6 CIDR range to delegate to individual nodes for IPAM.
clusterPoolIPv6PodCIDR: "fd00::/104"
# -- IPv6 CIDR list range to delegate to individual nodes for IPAM.
clusterPoolIPv6PodCIDRList: []
# -- IPv6 CIDR mask size to delegate to individual nodes for IPAM.
clusterPoolIPv6MaskSize: 120

Expand Down
4 changes: 2 additions & 2 deletions operator/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func init() {
flags.Bool(option.EnableIPv4Name, defaults.EnableIPv4, "Enable IPv4 support")
option.BindEnv(option.EnableIPv4Name)

flags.String(operatorOption.ClusterPoolIPv4CIDR, "",
flags.StringSlice(operatorOption.ClusterPoolIPv4CIDR, []string{},
fmt.Sprintf("IPv4 CIDR Range for Pods in cluster. Requires '%s=%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool,
option.EnableIPv4Name, "true"))
Expand All @@ -193,7 +193,7 @@ func init() {
flags.Bool(option.EnableIPv6Name, defaults.EnableIPv6, "Enable IPv6 support")
option.BindEnv(option.EnableIPv6Name)

flags.String(operatorOption.ClusterPoolIPv6CIDR, "",
flags.StringSlice(operatorOption.ClusterPoolIPv6CIDR, []string{},
fmt.Sprintf("IPv6 CIDR Range for Pods in cluster. Requires '%s=%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool,
option.EnableIPv6Name, "true"))
Expand Down

0 comments on commit 8a7c37f

Please sign in to comment.