Skip to content

Commit

Permalink
create new dual-stack flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyDumaine committed Apr 5, 2024
1 parent 645b584 commit a2240c7
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 2 deletions.
29 changes: 29 additions & 0 deletions templates/addons/cilium/cilium-ipv6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: cilium-ipv6
spec:
clusterSelector:
matchLabels:
cni: cilium
ipv6: "true"
repoURL: https://helm.cilium.io/
chartName: cilium
namespace: kube-system
version: ${CILIUM_VERSION:=1.15.0}
options:
waitForJobs: true
wait: true
timeout: 5m
valuesTemplate: |
ipv6:
enabled: true
ipam:
mode: kubernetes
k8s:
requireIPv4PodCIDR: true
hubble:
relay:
enabled: true
ui:
enabled: true
5 changes: 3 additions & 2 deletions templates/addons/cilium/cilium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ metadata:
name: cilium
spec:
clusterSelector:
matchLabels:
cni: cilium
matchExpressions:
- {key: ipv6, operator: DoesNotExist}
- {key: cni, operator: In, values: ['cilium']}
repoURL: https://helm.cilium.io/
chartName: cilium
namespace: kube-system
Expand Down
1 change: 1 addition & 0 deletions templates/addons/cilium/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cilium.yaml
- cilium-ipv6.yaml
1 change: 1 addition & 0 deletions templates/common-init-files/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ stringData:
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
kubeadm-pre-init.sh: |
#!/bin/bash
set -euo pipefail
Expand Down
42 changes: 42 additions & 0 deletions templates/flavors/dual-stack/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../default

patches:
- target:
group: cluster.x-k8s.io
version: v1beta1
kind: Cluster
patch: |-
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
ipv6: true
spec:
clusterNetwork:
pods:
cidrBlocks:
- 10.192.0.0/10
- fd02::/80
services:
cidrBlocks:
- 10.96.0.0/12
- fd03::/108
- target:
group: controlplane.cluster.x-k8s.io
version: v1beta1
kind: KubeadmControlPlane
patch: |-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
kubeadmConfigSpec:
clusterConfiguration:
controllerManager:
extraArgs:
node-cidr-mask-size-ipv6: "96"

0 comments on commit a2240c7

Please sign in to comment.