From 844d49c0f3a58c3c852d0586a3b97e39df087852 Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Wed, 5 Jul 2023 18:37:30 +0200 Subject: [PATCH] yaml: Add kind/multinet and use 3.26.0 as default version Signed-off-by: Nathan Skrzypczak --- yaml/Makefile | 6 +- yaml/components/multinet/multinet.yaml | 2 + yaml/generated/calico-vpp-dpdk.yaml | 4 +- yaml/generated/calico-vpp-eks-dpdk.yaml | 4 +- yaml/generated/calico-vpp-eks.yaml | 4 +- yaml/generated/calico-vpp-kind-multinet.yaml | 386 ++++++++++++++++++ yaml/generated/calico-vpp-kind.yaml | 4 +- yaml/generated/calico-vpp-multinet.yaml | 10 +- yaml/generated/calico-vpp-nohuge.yaml | 4 +- yaml/generated/calico-vpp.yaml | 4 +- .../overlays/kind-multinet/kustomization.yaml | 4 + 11 files changed, 413 insertions(+), 19 deletions(-) create mode 100644 yaml/generated/calico-vpp-kind-multinet.yaml create mode 100644 yaml/overlays/kind-multinet/kustomization.yaml diff --git a/yaml/Makefile b/yaml/Makefile index 531f3a27..789f2803 100644 --- a/yaml/Makefile +++ b/yaml/Makefile @@ -1,6 +1,6 @@ -TAG ?= prerelease -CALICO_TAG ?= master +TAG ?= v3.26.0 +CALICO_TAG ?= v3.26.0 .PHONY: build build: clean @@ -11,7 +11,7 @@ build: clean kubectl kustomize overlays/eks > generated/calico-vpp-eks.yaml kubectl kustomize overlays/eks-dpdk > generated/calico-vpp-eks-dpdk.yaml kubectl kustomize overlays/kind > generated/calico-vpp-kind.yaml - kubectl kustomize overlays/kind > generated/calico-vpp-kind.yaml + kubectl kustomize overlays/kind-multinet > generated/calico-vpp-kind-multinet.yaml # Do not export the test-* overlays, but still check they compile kubectl kustomize overlays/test-vagrant > /dev/null kubectl kustomize overlays/test-vagrant-mounts > /dev/null diff --git a/yaml/components/multinet/multinet.yaml b/yaml/components/multinet/multinet.yaml index 4354edc6..290af1be 100644 --- a/yaml/components/multinet/multinet.yaml +++ b/yaml/components/multinet/multinet.yaml @@ -6,6 +6,8 @@ metadata: data: CALICOVPP_FEATURE_GATES: |- { + "memifEnabled": true, + "vclEnabled": true, "multinetEnabled": true } --- diff --git a/yaml/generated/calico-vpp-dpdk.yaml b/yaml/generated/calico-vpp-dpdk.yaml index c5cc3250..4bf7f0b4 100644 --- a/yaml/generated/calico-vpp-dpdk.yaml +++ b/yaml/generated/calico-vpp-dpdk.yaml @@ -219,7 +219,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: @@ -264,7 +264,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: diff --git a/yaml/generated/calico-vpp-eks-dpdk.yaml b/yaml/generated/calico-vpp-eks-dpdk.yaml index 55f9f67c..2fedf1c8 100644 --- a/yaml/generated/calico-vpp-eks-dpdk.yaml +++ b/yaml/generated/calico-vpp-eks-dpdk.yaml @@ -230,7 +230,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: @@ -275,7 +275,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: diff --git a/yaml/generated/calico-vpp-eks.yaml b/yaml/generated/calico-vpp-eks.yaml index 47fc386a..3f4d20a2 100644 --- a/yaml/generated/calico-vpp-eks.yaml +++ b/yaml/generated/calico-vpp-eks.yaml @@ -230,7 +230,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: @@ -273,7 +273,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: diff --git a/yaml/generated/calico-vpp-kind-multinet.yaml b/yaml/generated/calico-vpp-kind-multinet.yaml new file mode 100644 index 00000000..dc8d1580 --- /dev/null +++ b/yaml/generated/calico-vpp-kind-multinet.yaml @@ -0,0 +1,386 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: calico-vpp-dataplane +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: calico-vpp-node-sa + namespace: calico-vpp-dataplane +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: calico-vpp-node-role +rules: +- apiGroups: + - "" + resources: + - pods + - nodes + - namespaces + verbs: + - get +- apiGroups: + - "" + resources: + - endpoints + - services + verbs: + - watch + - list + - get + - create + - update +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - watch + - get + - list +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get +- apiGroups: + - "" + resources: + - nodes/status + verbs: + - patch + - update +- apiGroups: + - networking.k8s.io + resources: + - networkpolicies + verbs: + - watch + - list +- apiGroups: + - "" + resources: + - pods + - namespaces + - serviceaccounts + verbs: + - list + - watch +- apiGroups: + - "" + resources: + - pods/status + verbs: + - patch +- apiGroups: + - projectcalico.org + resources: + - networks + verbs: + - list + - get + - watch +- apiGroups: + - crd.projectcalico.org + resources: + - globalfelixconfigs + - felixconfigurations + - bgppeers + - bgpfilters + - globalbgpconfigs + - bgpconfigurations + - ippools + - ipamblocks + - globalnetworkpolicies + - globalnetworksets + - networkpolicies + - networksets + - clusterinformations + - hostendpoints + - blockaffinities + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch +- apiGroups: + - crd.projectcalico.org + resources: + - blockaffinities + - ipamblocks + - ipamhandles + verbs: + - get + - list + - create + - update + - delete +- apiGroups: + - crd.projectcalico.org + resources: + - ipamconfigs + verbs: + - get +- apiGroups: + - crd.projectcalico.org + resources: + - blockaffinities + verbs: + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: calico-vpp-node +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: calico-vpp-node-role +subjects: +- kind: ServiceAccount + name: calico-vpp-node-sa + namespace: calico-vpp-dataplane +--- +apiVersion: v1 +data: + CALICOVPP_CONFIG_TEMPLATE: |- + unix { + nodaemon + full-coredump + cli-listen /var/run/vpp/cli.sock + pidfile /run/vpp/vpp.pid + exec /etc/vpp/startup.exec + } + api-trace { on } + cpu { + workers 0 + } + socksvr { + socket-name /var/run/vpp/vpp-api.sock + } + plugins { + plugin default { enable } + plugin dpdk_plugin.so { disable } + plugin calico_plugin.so { enable } + plugin ping_plugin.so { disable } + plugin dispatch_trace_plugin.so { enable } + } + buffers { + buffers-per-numa 131072 + } + CALICOVPP_FEATURE_GATES: |- + { + "memifEnabled": true, + "vclEnabled": true, + "multinetEnabled": true + } + CALICOVPP_INITIAL_CONFIG: |- + { + "vppStartupSleepSeconds": 1, + "corePattern": "/var/lib/vpp/vppcore.%e.%p" + } + CALICOVPP_INTERFACES: |- + { + "uplinkInterfaces": [ + { + "interfaceName": "eth0", + "vppDriver": "af_packet" + } + ] + } + SERVICE_PREFIX: 10.96.0.0/16 +kind: ConfigMap +metadata: + name: calico-vpp-config + namespace: calico-vpp-dataplane +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + k8s-app: calico-vpp-node + name: multinet-monitor-deployment + namespace: calico-vpp-dataplane +spec: + replicas: 1 + selector: + matchLabels: + k8s-app: calico-vpp-node + template: + metadata: + labels: + k8s-app: calico-vpp-node + spec: + containers: + - image: docker.io/calicovpp/multinet-monitor:v3.26.0 + imagePullPolicy: IfNotPresent + name: multinet-monitor + resources: + requests: + cpu: 250m + serviceAccountName: calico-vpp-node-sa +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + labels: + k8s-app: calico-vpp-node + name: calico-vpp-node + namespace: calico-vpp-dataplane +spec: + selector: + matchLabels: + k8s-app: calico-vpp-node + template: + metadata: + labels: + k8s-app: calico-vpp-node + spec: + containers: + - env: + - name: DATASTORE_TYPE + value: kubernetes + - name: WAIT_FOR_DATASTORE + value: "true" + - name: NODENAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: calico-vpp-config + image: docker.io/calicovpp/agent:v3.26.0 + imagePullPolicy: IfNotPresent + name: agent + resources: + requests: + cpu: 250m + securityContext: + privileged: true + volumeMounts: + - mountPath: /var/run/calico + name: var-run-calico + readOnly: false + - mountPath: /var/lib/calico/felix-plugins + name: felix-plugins + readOnly: false + - mountPath: /var/run/vpp + name: vpp-rundir + - mountPath: /run/netns/ + mountPropagation: Bidirectional + name: netns + - env: + - name: DATASTORE_TYPE + value: kubernetes + - name: WAIT_FOR_DATASTORE + value: "true" + - name: NODENAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + envFrom: + - configMapRef: + name: calico-vpp-config + image: docker.io/calicovpp/vpp:v3.26.0 + imagePullPolicy: IfNotPresent + name: vpp + resources: + requests: + cpu: 500m + memory: 512Mi + securityContext: + privileged: true + volumeMounts: + - mountPath: /lib/firmware + name: lib-firmware + - mountPath: /var/run/vpp + name: vpp-rundir + - mountPath: /var/lib/vpp + name: vpp-data + - mountPath: /etc/vpp + name: vpp-config + - mountPath: /dev + name: devices + - mountPath: /sys + name: hostsys + - mountPath: /run/netns/ + mountPropagation: Bidirectional + name: netns + - mountPath: /host + name: host-root + hostNetwork: true + hostPID: true + initContainers: + - command: + - /entrypoint + image: docker.io/calicovpp/install-whereabouts:v3.26.0 + name: install-whereabouts + volumeMounts: + - mountPath: /host/opt/cni/bin + name: cni-bin-dir + nodeSelector: + kubernetes.io/os: linux + priorityClassName: system-node-critical + serviceAccountName: calico-vpp-node-sa + terminationGracePeriodSeconds: 10 + tolerations: + - effect: NoSchedule + operator: Exists + - key: CriticalAddonsOnly + operator: Exists + - effect: NoExecute + operator: Exists + volumes: + - hostPath: + path: /opt/cni/bin + name: cni-bin-dir + - hostPath: + path: /lib/firmware + name: lib-firmware + - hostPath: + path: /var/run/vpp + name: vpp-rundir + - hostPath: + path: /var/lib/vpp + type: DirectoryOrCreate + name: vpp-data + - hostPath: + path: /etc/vpp + name: vpp-config + - hostPath: + path: /dev + name: devices + - hostPath: + path: /sys + name: hostsys + - hostPath: + path: /var/run/calico + name: var-run-calico + - hostPath: + path: /run/netns + name: netns + - hostPath: + path: /var/lib/calico/felix-plugins + name: felix-plugins + - hostPath: + path: / + name: host-root + updateStrategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate diff --git a/yaml/generated/calico-vpp-kind.yaml b/yaml/generated/calico-vpp-kind.yaml index 05b97b5b..fc558e16 100644 --- a/yaml/generated/calico-vpp-kind.yaml +++ b/yaml/generated/calico-vpp-kind.yaml @@ -214,7 +214,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: @@ -246,7 +246,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: diff --git a/yaml/generated/calico-vpp-multinet.yaml b/yaml/generated/calico-vpp-multinet.yaml index e5a2eee9..6916ff46 100644 --- a/yaml/generated/calico-vpp-multinet.yaml +++ b/yaml/generated/calico-vpp-multinet.yaml @@ -181,6 +181,8 @@ data: } CALICOVPP_FEATURE_GATES: |- { + "memifEnabled": true, + "vclEnabled": true, "multinetEnabled": true } CALICOVPP_INITIAL_CONFIG: |- @@ -230,7 +232,7 @@ spec: k8s-app: calico-vpp-node spec: containers: - - image: docker.io/calicovpp/multinet-monitor:prerelease + - image: docker.io/calicovpp/multinet-monitor:v3.26.0 imagePullPolicy: IfNotPresent name: multinet-monitor resources: @@ -271,7 +273,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: @@ -303,7 +305,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: @@ -335,7 +337,7 @@ spec: initContainers: - command: - /entrypoint - image: docker.io/calicovpp/install-whereabouts:prerelease + image: docker.io/calicovpp/install-whereabouts:v3.26.0 name: install-whereabouts volumeMounts: - mountPath: /host/opt/cni/bin diff --git a/yaml/generated/calico-vpp-nohuge.yaml b/yaml/generated/calico-vpp-nohuge.yaml index 69e14031..c5395840 100644 --- a/yaml/generated/calico-vpp-nohuge.yaml +++ b/yaml/generated/calico-vpp-nohuge.yaml @@ -223,7 +223,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: @@ -255,7 +255,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: diff --git a/yaml/generated/calico-vpp.yaml b/yaml/generated/calico-vpp.yaml index 38631574..443ad413 100644 --- a/yaml/generated/calico-vpp.yaml +++ b/yaml/generated/calico-vpp.yaml @@ -219,7 +219,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/vpp:prerelease + image: docker.io/calicovpp/vpp:v3.26.0 imagePullPolicy: IfNotPresent name: vpp resources: @@ -264,7 +264,7 @@ spec: envFrom: - configMapRef: name: calico-vpp-config - image: docker.io/calicovpp/agent:prerelease + image: docker.io/calicovpp/agent:v3.26.0 imagePullPolicy: IfNotPresent name: agent resources: diff --git a/yaml/overlays/kind-multinet/kustomization.yaml b/yaml/overlays/kind-multinet/kustomization.yaml new file mode 100644 index 00000000..2e5d4230 --- /dev/null +++ b/yaml/overlays/kind-multinet/kustomization.yaml @@ -0,0 +1,4 @@ +bases: +- ../kind +components: +- ../../components/multinet