Skip to content

Commit

Permalink
Generate calico templates from source and update to 3.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed Feb 1, 2022
1 parent 6cc55e0 commit a5b8626
Show file tree
Hide file tree
Showing 20 changed files with 57,513 additions and 36,198 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ generate-e2e-templates: $(KUSTOMIZE)
.PHONY: generate-addons
generate-addons:
$(KUSTOMIZE) build $(ADDONS_DIR)/metrics-server > $(ADDONS_DIR)/metrics-server/metrics-server.yaml
$(KUSTOMIZE) build $(ADDONS_DIR)/calico > $(ADDONS_DIR)/calico.yaml
$(KUSTOMIZE) build $(ADDONS_DIR)/calico-ipv6 > $(ADDONS_DIR)/calico-ipv6.yaml

## --------------------------------------
## Docker
Expand Down
6,473 changes: 3,354 additions & 3,119 deletions templates/addons/calico-ipv6.yaml

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions templates/addons/calico-ipv6/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../calico
patches:
- patches/calico-config.yaml
patches:
- target:
group: apps
version: v1
kind: DaemonSet
name: calico-node
namespace: kube-system
path: patches/calico-node.yaml
40 changes: 40 additions & 0 deletions templates/addons/calico-ipv6/patches/calico-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
cni_network_config: |-
{
"name": "k8s-pod-network",
"cniVersion": "0.3.1",
"plugins": [
{
"type": "calico",
"log_level": "info",
"log_file_path": "/var/log/calico/cni/cni.log",
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
"mtu": 1500,
"ipam": {
"type": "host-local",
"subnet": "usePodCidr"
},
"policy": {
"type": "k8s"
},
"kubernetes": {
"kubeconfig": "__KUBECONFIG_FILEPATH__"
}
},
{
"type": "portmap",
"snat": true,
"capabilities": {"portMappings": true}
},
{
"type": "bandwidth",
"capabilities": {"bandwidth": true}
}
]
}
18 changes: 18 additions & 0 deletions templates/addons/calico-ipv6/patches/calico-node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
# https://docs.projectcalico.org/reference/public-cloud/azure#azure-user-defined-routes
name: CALICO_IPv6POOL_CIDR
value: "2001:1234:5678:9a40::/58"
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: IP6
value: "autodetect"
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: FELIX_IPV6SUPPORT
value: "true"


Loading

0 comments on commit a5b8626

Please sign in to comment.