Skip to content

Commit 5a7cb0d

Browse files
committed
ci: finalize changes
1 parent 61c427e commit 5a7cb0d

File tree

6 files changed

+82
-74
lines changed

6 files changed

+82
-74
lines changed
Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,32 @@
1-
# Swiftv2 Cilium Upgrade Guide
1+
# Swiftv2 Cilium In-place Upgrade Guide
22

33
## Steps
44
### Clone repo + checkout branch for *.yamls
55
```
66
git clone https://github.com/Azure/azure-container-networking.git
7-
git checkout jpayne3506/conflist-generation < TODO Change before merge >
7+
git checkout master
88
```
99

1010
### Update Conflist
11-
Leverage a cni build from branch or use `acnpublic.azurecr.io/azure-cni:linux-amd64-v1.7.5-3-g93d32acd0` < TODO Change before merge >
12-
- This will install our chained conflist through the use of `test/integration/manifests/cni/conflist-installer.yaml`
1311

1412
```
1513
export CONFLIST=azure-chained-cilium.conflist
1614
export CONFLIST_PRIORITY=05
17-
export CNI_IMAGE=acnpublic.azurecr.io/azure-cni:linux-amd64-v1.7.5-3-g93d32acd0
15+
export CNI_IMAGE=acnpublic.azurecr.io/public/containernetworking/azure-cni:v1.7.5-3
1816
envsubst '${CONFLIST},${CONFLIST_PRIORITY},${CNI_IMAGE}' < test/integration/manifests/cni/conflist-installer.yaml | kubectl apply -f -
1917
```
2018

21-
> NOTE: if your current conflist file name starts with `05` then change our previous filename to one with higher priority to ensure that it is consumed. i.e. `03-azure-chained-cilium.conflist`
2219

23-
24-
### Apply cilium config
20+
### Apply Cilium config
2521
```
2622
export DIR=1.17
2723
export CILIUM_VERSION_TAG=v1.17.7-250927
2824
export CILIUM_IMAGE_REGISTRY=mcr.microsoft.com/containernetworking
2925
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-config/cilium-chained-config.yaml
3026
```
3127

32-
- Remove `kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256"` from configmap if kube-proxy is current on nodes
3328

34-
### Apply cilium Agent + Operator + RBAC
29+
### Apply Cilium Agent + Operator + RBAC
3530
```
3631
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-operator/files
3732
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-agent/files
@@ -41,30 +36,11 @@ envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/man
4136

4237

4338
### Quick Summary
44-
- Apply conflist installer to update conflist on BYON
45-
- Apply/Edit Cilium Config with
46-
- `cni-chaining-mode: generic-veth`
47-
- remove `kube-proxy-replacement-healthz-bind-address`
48-
- You do not need to remove if node does not have kube-proxy enabled
49-
- If applied before agent is in ready state then no need to restart agent
39+
- Apply conflist installer to update conflist on all nodes
40+
- Apply Cilium Config
5041
- Apply Agent + Operator + RBAC
5142

5243

5344
## Quick Vaildation testing
54-
- Create pods from deploy
55-
- test/integration/manifests/swiftv2/mt-deploy.yaml
56-
- Creates `container-*` pods on default namespace
57-
- Create Cilium Network Policies
58-
- test/integration/manifests/cilium/netpol/default-allow.yaml
59-
- Will only allow cilium managed endpoints to transmit traffic through default namespace
6045
- Check Cilium Management with
6146
- `kubectl get cep -A`
62-
- `kubectl get cnp -A`
63-
- Check connectivity
64-
- exec -it <container-*> -- sh
65-
- ip a
66-
- look for delegatedNIC IP
67-
- ping <IP>
68-
- confirm CNP working by attempting to ping coredns pods
69-
- should fail if both are being maintained by cilium
70-
- confirm with `kubectl get cep -A`
Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
1-
# Swiftv2 Cilium Setup Guide
1+
# Swiftv2 Managed Cilium Setup Guide
22

33
## Steps
44
### Clone repo + checkout branch for *.yamls
55
```
66
git clone https://github.com/Azure/azure-container-networking.git
7-
git checkout jpayne3506/conflist-generation < TODO Change before merge >
7+
git checkout master
88
```
99

1010
### Update Conflist
11-
Leverage a cni build from branch or use `acnpublic.azurecr.io/azure-cni:linux-amd64-v1.7.5-3-g93d32acd0` < TODO Change before merge >
12-
- This will install our chained conflist through the use of `test/integration/manifests/cni/conflist-installer.yaml`
1311

1412
```
1513
export CONFLIST=azure-chained-cilium.conflist
1614
export CONFLIST_PRIORITY=05
17-
export CNI_IMAGE=acnpublic.azurecr.io/azure-cni:linux-amd64-v1.7.5-3-g93d32acd0
18-
envsubst '${CONFLIST},${CONFLIST_PRIORITY},${CNI_IMAGE}' < test/integration/manifests/cni/conflist-installer.yaml | kubectl apply -f -
15+
export CNI_IMAGE=acnpublic.azurecr.io/public/containernetworking/azure-cni:v1.7.5-3
16+
envsubst '${CONFLIST},${CONFLIST_PRIORITY},${CNI_IMAGE}' < test/integration/manifests/cni/conflist-installer-byon.yaml | kubectl apply -f -
1917
```
2018

21-
> NOTE: if your current conflist file name starts with `05` then change our previous filename to one with higher priority to ensure that it is consumed. i.e. `03-azure-chained-cilium.conflist`
22-
2319

2420
### Apply Watcher
2521
```
2622
kubectl apply -f test/integration/manifests/cilium/watcher/deployment.yaml
2723
```
2824

29-
- Watcher obtains existing RBAC and DS from managed node
30-
- We overwrite CM values through the use of DS args on the `cilium-agent` container
31-
i.e. overwrites `--cni-chaining-mode`
32-
```
33-
yq eval '.spec.template.spec.containers[0].args += ["--cni-chaining-mode=generic-veth"]' -i "$temp_file"
34-
```
25+
- Watcher obtains existing Cilium RBAC and Daemonset from managed node
26+
- We overwrite Cilium Configmap values through the use of args on the `cilium-agent` container within the watcher deployment.
3527

3628

3729

@@ -40,20 +32,5 @@ yq eval '.spec.template.spec.containers[0].args += ["--cni-chaining-mode=generic
4032
- Apply Watcher and Overwrite existing CM values through `cilium-agent` container
4133

4234
## Quick Vaildation testing
43-
- Create pods from deploy
44-
- test/integration/manifests/swiftv2/mt-deploy.yaml
45-
- Creates `container-*` pods on default namespace
46-
- Create Cilium Network Policies
47-
- test/integration/manifests/cilium/netpol/default-allow.yaml
48-
- Will only allow cilium managed endpoints to transmit traffic through default namespace
49-
- Check Cilium Management with
50-
- `kubectl get cep -A`
51-
- `kubectl get cnp -A`
52-
- Check connectivity
53-
- exec -it <container-*> -- sh
54-
- ip a
55-
- look for delegatedNIC IP
56-
- ping <IP>
57-
- confirm CNP working by attempting to ping coredns pods
58-
- should fail if both are being maintained by cilium
59-
- confirm with `kubectl get cep -A`
35+
Check Cilium Management with
36+
- `kubectl get cep -A`

test/integration/manifests/cilium/v1.17/cilium-config/cilium-chained-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ data:
4747
install-no-conntrack-iptables-rules: "false"
4848
ipam: delegated-plugin
4949
kube-proxy-replacement: "true"
50-
kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256" ## Remove if kube-proxy is enabled
5150
local-router-ipv4: 169.254.23.0
5251
metrics: +cilium_bpf_map_pressure
5352
monitor-aggregation: medium

test/integration/manifests/cilium/watcher/deployment.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,6 @@ spec:
231231
yq eval '.spec.template.spec.containers[0].args += ["--cni-chaining-mode=generic-veth"]' -i "$temp_file"
232232
# yq eval '.spec.template.spec.containers[0].args += ["--enable-host-legacy-routing=false"]' -i "$temp_file"
233233
234-
### TODO / TESTING
235-
# Remove if present
236-
# yq eval 'del(.spec.template.spec.containers[0].args[] | select(. == "--kube-proxy-replacement=probe"))' -i "$temp_file"
237-
# kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256"
238-
#
239-
240-
241234
# Replace service account name
242235
yq eval '.spec.template.spec.serviceAccountName = strenv(MODIFIED_DAEMONSET)' -i "$temp_file"
243236
yq eval '.spec.template.spec.serviceAccount = strenv(MODIFIED_DAEMONSET)' -i "$temp_file"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: azure-cni-conflist-installer
5+
namespace: kube-system
6+
labels:
7+
app: azure-cni
8+
spec:
9+
selector:
10+
matchLabels:
11+
k8s-app: azure-cni
12+
template:
13+
metadata:
14+
labels:
15+
k8s-app: azure-cni
16+
spec:
17+
affinity:
18+
nodeAffinity:
19+
requiredDuringSchedulingIgnoredDuringExecution:
20+
nodeSelectorTerms:
21+
- matchExpressions:
22+
- key: type
23+
operator: NotIn
24+
values:
25+
- virtual-kubelet
26+
- key: kubernetes.io/os
27+
operator: In
28+
values:
29+
- linux
30+
- key: kubernetes.azure.com/managed
31+
operator: In
32+
values:
33+
- "false"
34+
priorityClassName: system-node-critical
35+
tolerations:
36+
- key: CriticalAddonsOnly
37+
operator: Exists
38+
- operator: "Exists"
39+
effect: NoExecute
40+
- operator: "Exists"
41+
effect: NoSchedule
42+
initContainers:
43+
- name: cni-installer
44+
image: ${CNI_IMAGE}
45+
imagePullPolicy: Always
46+
command: ["/dropgz"]
47+
args:
48+
- deploy
49+
- --skip-verify
50+
- ${CONFLIST}
51+
- -o
52+
- /etc/cni/net.d/${CONFLIST_PRIORITY}-${CONFLIST}
53+
volumeMounts:
54+
- name: cni-conflist
55+
mountPath: /etc/cni/net.d
56+
containers:
57+
- name: pause
58+
image: mcr.microsoft.com/oss/kubernetes/pause:3.6
59+
hostNetwork: true
60+
volumes:
61+
- name: cni-conflist
62+
hostPath:
63+
path: /etc/cni/net.d
64+
type: Directory
65+
66+
# acnpublic.azurecr.io/azure-cni:linux-amd64-v1.7.5-3-g93d32acd0
67+
# envsubst '${CONFLIST},${CONFLIST_PRIORITY},${CNI_IMAGE}' < test/integration/manifests/cni/conflist-installer.yaml | kubectl apply -f -

test/integration/manifests/cni/conflist-installer.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ spec:
2727
operator: In
2828
values:
2929
- linux
30-
- key: kubernetes.azure.com/managed
31-
operator: In
32-
values:
33-
- "false"
3430
priorityClassName: system-node-critical
3531
tolerations:
3632
- key: CriticalAddonsOnly

0 commit comments

Comments
 (0)