Skip to content

Commit a12222b

Browse files
authored
ci: parameterize cilium 1.14 templates (#2562)
* parameterize version cilium 1.14.x for pipelines * fix tag substitution * update dualstack step * update load test template
1 parent 8386efc commit a12222b

File tree

16 files changed

+138
-37
lines changed

16 files changed

+138
-37
lines changed

.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,14 @@ stages:
106106
pwd
107107
kubectl cluster-info
108108
kubectl get po -owide -A
109-
110-
echo "deploy Cilium ConfigMap"
111-
kubectl apply -f test/integration/manifests/cilium/v1.14.4/cilium-config/cilium-config-hubble.yaml
112109
113110
echo "install Cilium onto Overlay Cluster with hubble enabled"
114-
kubectl apply -f test/integration/manifests/cilium/v1.14.4/cilium-agent/files
115-
kubectl apply -f test/integration/manifests/cilium/v1.14.4/cilium-operator/files
116-
117-
echo "install Cilium v1.14.4 onto Overlay Cluster"
118-
# Passes Cilium image to daemonset and deployment
119-
envsubst '${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v1.14.4/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
120-
envsubst '${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v1.14.4/cilium-operator/templates/deployment.tpl | kubectl apply -f -
111+
export CILIUM_VERSION_TAG=${CILIUM_HUBBLE_VERSION_TAG}
112+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-config/cilium-config-hubble.yaml
113+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/files
114+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/files
115+
envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
116+
envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/templates/deployment.tpl | kubectl apply -f -
121117
kubectl get po -owide -A
122118
123119
echo "Deploy Azure-CNS"

.pipelines/networkobservability/pipeline.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ schedules:
1010

1111
variables:
1212
clustername: ciliumhubble-$(Build.SourceBranchName)-$(Build.BuildId)
13-
cilium_version: v1.14.4
1413

1514
stages:
1615
- stage: createCluster
@@ -78,11 +77,11 @@ stages:
7877
scriptType: "bash"
7978
addSpnToEnvironment: true
8079
inlineScript: |
81-
kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/cilium-config/cilium-config-hubble.yaml
82-
kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/cilium-agent/files
83-
kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/cilium-operator/files
84-
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/$(cilium_version)/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
85-
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/$(cilium_version)/cilium-operator/templates/deployment.tpl | kubectl apply -f -
80+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-config/cilium-config-hubble.yaml
81+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/files
82+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/files
83+
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
84+
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/templates/deployment.tpl | kubectl apply -f -
8685
# Use different file directories for nightly and current cilium version
8786
name: "installCilium"
8887
displayName: "Install Cilium on AKS Overlay"
@@ -122,7 +121,7 @@ stages:
122121
enabled: true
123122
124123
- script: |
125-
kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/hubble/hubble-peer-svc.yaml
124+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/hubble/hubble-peer-svc.yaml
126125
kubectl get pods -Aowide
127126
echo "verify Hubble metrics endpoint is usable"
128127
go test ./test/integration/networkobservability -tags=networkobservability

.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ steps:
3333
kubectl cluster-info
3434
kubectl get po -owide -A
3535
echo "deploy Cilium ConfigMap"
36-
kubectl apply -f test/integration/manifests/cilium/cilium-config-dualstack.yaml
37-
echo "install Cilium ${CILIUM_VERSION_TAG}"
36+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-config/cilium-config-dualstack.yaml
37+
echo "install Cilium ${CILIUM_DUALSTACK_VERSION}"
3838
# Passes Cilium image to daemonset and deployment
39-
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/daemonset.yaml | kubectl apply -f -
40-
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/deployment.yaml | kubectl apply -f -
41-
# Use different file directories for nightly and current cilium version
42-
kubectl apply -f test/integration/manifests/cilium/cilium-agent
43-
kubectl apply -f test/integration/manifests/cilium/cilium-operator
39+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/files
40+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/files
41+
42+
export CILIUM_VERSION_TAG=${CILIUM_DUALSTACK_VERSION}
43+
echo "install Cilium ${CILIUM_DUALSTACK_VERSION} onto Overlay Cluster"
44+
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
45+
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/templates/deployment.tpl | kubectl apply -f -
4446
kubectl get po -owide -A
4547
name: "installCilium"
4648
displayName: "Install Cilium on AKS Dualstack Overlay"

.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ steps:
3636
set -e
3737
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
3838
ls -lah
39-
kubectl apply -f test/integration/manifests/cilium/v1.14.4/cilium-config/cilium-config-hubble.yaml
40-
kubectl apply -f test/integration/manifests/cilium/v1.14.4/cilium-agent/files
41-
kubectl apply -f test/integration/manifests/cilium/v1.14.4/cilium-operator/files
42-
envsubst '${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v1.14.4/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
43-
envsubst '${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v1.14.4/cilium-operator/templates/deployment.tpl | kubectl apply -f -
39+
export CILIUM_VERSION_TAG=${CILIUM_HUBBLE_VERSION_TAG}
40+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-config/cilium-config-hubble.yaml
41+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/files
42+
kubectl apply -f test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/files
43+
envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-agent/templates/daemonset.tpl | kubectl apply -f -
44+
envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${CILIUM_TEMPLATE_DIR}/cilium-operator/templates/deployment.tpl | kubectl apply -f -
4445
# Use different file directories for nightly and current cilium version
4546
name: "installCilium"
4647
displayName: "Install Cilium on AKS Overlay"

test/integration/manifests/cilium/v1.14.4/cilium-agent/templates/daemonset.tpl renamed to test/integration/manifests/cilium/v1.14/cilium-agent/templates/daemonset.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
fieldPath: metadata.namespace
6767
- name: CILIUM_CLUSTERMESH_CONFIG
6868
value: /var/lib/cilium/clustermesh/
69-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
69+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
7070
imagePullPolicy: IfNotPresent
7171
livenessProbe:
7272
failureThreshold: 10
@@ -163,7 +163,7 @@ spec:
163163
hostNetwork: true
164164
initContainers:
165165
- name: install-cni-binaries
166-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
166+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
167167
imagePullPolicy: IfNotPresent
168168
command:
169169
- "/install-plugin.sh"
@@ -192,7 +192,7 @@ spec:
192192
value: /run/cilium/cgroupv2
193193
- name: BIN_PATH
194194
value: /opt/cni/bin
195-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
195+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
196196
imagePullPolicy: IfNotPresent
197197
name: mount-cgroup
198198
resources: {}
@@ -224,7 +224,7 @@ spec:
224224
env:
225225
- name: BIN_PATH
226226
value: /opt/cni/bin
227-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
227+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
228228
imagePullPolicy: IfNotPresent
229229
name: apply-sysctl-overwrites
230230
resources: {}
@@ -252,7 +252,7 @@ spec:
252252
- /bin/bash
253253
- -c
254254
- --
255-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
255+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
256256
imagePullPolicy: IfNotPresent
257257
name: mount-bpf-fs
258258
resources: {}
@@ -279,7 +279,7 @@ spec:
279279
key: clean-cilium-bpf-state
280280
name: cilium-config
281281
optional: true
282-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
282+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
283283
imagePullPolicy: IfNotPresent
284284
name: clean-cilium-state
285285
resources:
@@ -338,7 +338,7 @@ spec:
338338
name: host-usr-lib
339339
readOnly: true
340340
- name: block-wireserver
341-
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:1.14.4
341+
image: $CILIUM_IMAGE_REGISTRY/cilium/cilium:$CILIUM_VERSION_TAG
342342
imagePullPolicy: IfNotPresent
343343
command:
344344
- /bin/bash
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
apiVersion: v1
2+
data:
3+
agent-not-ready-taint-key: node.cilium.io/agent-not-ready
4+
arping-refresh-period: 30s
5+
auto-direct-node-routes: "false"
6+
bpf-lb-external-clusterip: "false"
7+
bpf-lb-map-max: "65536"
8+
bpf-lb-mode: snat
9+
bpf-map-dynamic-size-ratio: "0.0025"
10+
bpf-policy-map-max: "16384"
11+
bpf-root: /sys/fs/bpf
12+
cgroup-root: /run/cilium/cgroupv2
13+
cilium-endpoint-gc-interval: 5m0s
14+
cluster-id: "0"
15+
cluster-name: default
16+
debug: "false"
17+
disable-cnp-status-updates: "true"
18+
disable-endpoint-crd: "false"
19+
enable-auto-protect-node-port-range: "true"
20+
enable-bgp-control-plane: "false"
21+
enable-bpf-clock-probe: "true"
22+
enable-endpoint-health-checking: "false"
23+
enable-endpoint-routes: "true"
24+
enable-health-check-nodeport: "true"
25+
enable-health-checking: "true"
26+
enable-host-legacy-routing: "true"
27+
enable-hubble: "false"
28+
enable-ipv4: "true"
29+
enable-ipv4-masquerade: "false"
30+
enable-ipv6: "true"
31+
enable-ipv6-masquerade: "false"
32+
enable-k8s-terminating-endpoint: "true"
33+
enable-l2-neigh-discovery: "true"
34+
enable-l7-proxy: "false"
35+
enable-local-node-route: "false"
36+
enable-local-redirect-policy: "false"
37+
enable-metrics: "true"
38+
enable-policy: default
39+
enable-remote-node-identity: "true"
40+
enable-session-affinity: "true"
41+
enable-svc-source-range-check: "true"
42+
enable-vtep: "false"
43+
enable-well-known-identities: "false"
44+
enable-xt-socket-fallback: "true"
45+
identity-allocation-mode: crd
46+
install-iptables-rules: "true"
47+
install-no-conntrack-iptables-rules: "false"
48+
ipam: delegated-plugin
49+
kube-proxy-replacement: strict
50+
kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256"
51+
local-router-ipv4: 169.254.23.0
52+
local-router-ipv6: "fe80::"
53+
metrics: +cilium_bpf_map_pressure
54+
monitor-aggregation: medium
55+
monitor-aggregation-flags: all
56+
monitor-aggregation-interval: 5s
57+
node-port-bind-protection: "true"
58+
nodes-gc-interval: 5m0s
59+
operator-api-serve-addr: 127.0.0.1:9234
60+
operator-prometheus-serve-addr: :9963
61+
preallocate-bpf-maps: "false"
62+
procfs: /host/proc
63+
prometheus-serve-addr: :9962
64+
remove-cilium-node-taints: "true"
65+
set-cilium-is-up-condition: "true"
66+
sidecar-istio-proxy-image: cilium/istio_proxy
67+
synchronize-k8s-nodes: "true"
68+
tofqdns-dns-reject-response-code: refused
69+
tofqdns-enable-dns-compression: "true"
70+
tofqdns-endpoint-max-ip-per-hostname: "50"
71+
tofqdns-idle-connection-grace-period: 0s
72+
tofqdns-max-deferred-connection-deletes: "10000"
73+
tofqdns-min-ttl: "0"
74+
tofqdns-proxy-response-max-delay: 100ms
75+
routing-mode: native
76+
unmanaged-pod-watcher-interval: "15"
77+
vtep-cidr: ""
78+
vtep-endpoint: ""
79+
vtep-mac: ""
80+
vtep-mask: ""
81+
# new default values from Cilium v1.14.4
82+
enable-sctp: "false"
83+
external-envoy-proxy: "false"
84+
k8s-client-qps: "5"
85+
k8s-client-burst: "10"
86+
mesh-auth-enabled: "true"
87+
mesh-auth-queue-size: "1024"
88+
mesh-auth-rotated-identities-queue-size: "1024"
89+
mesh-auth-gc-interval: "5m0s"
90+
proxy-connect-timeout: "2"
91+
proxy-max-requests-per-connection: "0"
92+
proxy-max-connection-duration-seconds: "0"
93+
set-cilium-node-taints: "true"
94+
unmanaged-pod-watcher-interval: "15"
95+
kind: ConfigMap
96+
metadata:
97+
annotations:
98+
meta.helm.sh/release-name: cilium
99+
meta.helm.sh/release-namespace: kube-system
100+
labels:
101+
app.kubernetes.io/managed-by: Helm
102+
name: cilium-config
103+
namespace: kube-system

0 commit comments

Comments
 (0)