Skip to content

Commit 6861356

Browse files
authored
Merge pull request #2021 from CecileRobertMichon/calico-from-source
Generate calico manifests from source
2 parents 3ead440 + 2a705e9 commit 6861356

22 files changed

+53007
-36244
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
387387
rbac:roleName=manager-role
388388

389389
.PHONY: generate-flavors ## Generate template flavors
390-
generate-flavors: $(KUSTOMIZE)
390+
generate-flavors: $(KUSTOMIZE) generate-addons
391391
./hack/gen-flavors.sh
392392

393393
.PHONY: generate-e2e-templates ## Generate Azure infrastructure templates for the v1alpha4 CAPI test suite.
@@ -406,6 +406,8 @@ generate-e2e-templates: $(KUSTOMIZE)
406406
.PHONY: generate-addons
407407
generate-addons:
408408
$(KUSTOMIZE) build $(ADDONS_DIR)/metrics-server > $(ADDONS_DIR)/metrics-server/metrics-server.yaml
409+
$(KUSTOMIZE) build $(ADDONS_DIR)/calico > $(ADDONS_DIR)/calico.yaml
410+
$(KUSTOMIZE) build $(ADDONS_DIR)/calico-ipv6 > $(ADDONS_DIR)/calico-ipv6.yaml
409411

410412
## --------------------------------------
411413
## Docker

templates/addons/calico-ipv6.yaml

Lines changed: 3050 additions & 3125 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- https://docs.projectcalico.org/v3.20/manifests/calico-policy-only.yaml
5+
patchesStrategicMerge:
6+
- patches/azure-mtu.yaml
7+
patches:
8+
- target:
9+
group: apps
10+
version: v1
11+
kind: DaemonSet
12+
name: calico-node
13+
namespace: kube-system
14+
path: patches/calico-node.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: calico-config
5+
namespace: kube-system
6+
data:
7+
# On Azure, the underlying network has an MTU of 1400, even though the network interface will have an MTU of 1500.
8+
# We set this value to 1350 for “physical network MTU size minus 50” since we use VXLAN, which uses a 50-byte header.
9+
# If enabling Wireguard, this value should be changed to 1340 (Wireguard uses a 60-byte header).
10+
# https://docs.projectcalico.org/networking/mtu#determine-mtu-size
11+
veth_mtu: "1350"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
kind: DaemonSet
2+
apiVersion: apps/v1
3+
metadata:
4+
name: calico-node
5+
namespace: kube-system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: calico-node
11+
env:
12+
# https://docs.projectcalico.org/reference/public-cloud/azure#azure-user-defined-routes
13+
- name: CALICO_IPv6POOL_CIDR
14+
value: "2001:1234:5678:9a40::/58"
15+
- name: IP6
16+
value: "autodetect"
17+
- name: FELIX_IPV6SUPPORT
18+
value: "true"

0 commit comments

Comments
 (0)