From cbfecd82a0ef2e63567ad750f0e0721a6385231d Mon Sep 17 00:00:00 2001 From: Sebastien Coquelin Date: Thu, 17 Oct 2024 15:09:11 -0700 Subject: [PATCH 1/2] chore: upgrade multus to v4.1.3-thick and migrate config --- gitops/components/multus/daemon-config.json | 12 ++++++++++++ gitops/components/multus/kustomization.yaml | 17 +++++++++-------- .../multus-daemonset-container-args.yaml | 15 --------------- 3 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 gitops/components/multus/daemon-config.json delete mode 100644 gitops/components/multus/overlays/multus-daemonset-container-args.yaml diff --git a/gitops/components/multus/daemon-config.json b/gitops/components/multus/daemon-config.json new file mode 100644 index 0000000..780769a --- /dev/null +++ b/gitops/components/multus/daemon-config.json @@ -0,0 +1,12 @@ +{ + "chrootDir": "/hostroot", + "cniVersion": "0.4.0", + "logFile": "/var/log/aws-routed-eni/multus.log", + "logLevel": "error", + "logToStderr": true, + "cniConfigDir": "/host/etc/cni/net.d", + "multusAutoconfigDir": "/host/etc/cni/net.d", + "multusMasterCNI": "10-aws.conflist", + "multusConfigFile": "auto", + "socketDir": "/host/run/multus/" +} diff --git a/gitops/components/multus/kustomization.yaml b/gitops/components/multus/kustomization.yaml index 1071114..d70bc8f 100644 --- a/gitops/components/multus/kustomization.yaml +++ b/gitops/components/multus/kustomization.yaml @@ -2,11 +2,18 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component resources: - - https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/v3.9.3/deployments/multus-daemonset.yml + - https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/v4.1.3/deployments/multus-daemonset-thick.yml images: - name: ghcr.io/k8snetworkplumbingwg/multus-cni - newTag: v3.9.3 + newTag: v4.1.3-thick + +configMapGenerator: + - name: multus-daemon-config + namespace: kube-system + behavior: replace + files: + - daemon-config.json patches: - target: @@ -21,12 +28,6 @@ patches: kind: DaemonSet name: kube-multus-ds path: ./overlays/multus-daemonset-readiness.yaml - - target: - group: apps - version: v1 - kind: DaemonSet - name: kube-multus-ds - path: ./overlays/multus-daemonset-container-args.yaml - target: group: argoproj.io version: v1alpha1 diff --git a/gitops/components/multus/overlays/multus-daemonset-container-args.yaml b/gitops/components/multus/overlays/multus-daemonset-container-args.yaml deleted file mode 100644 index 336a6f8..0000000 --- a/gitops/components/multus/overlays/multus-daemonset-container-args.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: kube-multus-ds -spec: - template: - spec: - containers: - - name: kube-multus - args: - - "--multus-conf-file=auto" - - "--cni-version=0.4.0" - - "--multus-master-cni-file-name=10-aws.conflist" - - "--multus-log-level=error" - - "--multus-log-file=/var/log/aws-routed-eni/multus.log" From 7659944b9ae74c096f412ad9cbc211bd97af6d73 Mon Sep 17 00:00:00 2001 From: Sebastien Coquelin Date: Fri, 18 Oct 2024 11:11:37 -0700 Subject: [PATCH 2/2] fix: applying configMap change through patch directly --- gitops/components/multus/daemon-config.json | 12 --------- gitops/components/multus/kustomization.yaml | 27 +++++++++++++++------ 2 files changed, 20 insertions(+), 19 deletions(-) delete mode 100644 gitops/components/multus/daemon-config.json diff --git a/gitops/components/multus/daemon-config.json b/gitops/components/multus/daemon-config.json deleted file mode 100644 index 780769a..0000000 --- a/gitops/components/multus/daemon-config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "chrootDir": "/hostroot", - "cniVersion": "0.4.0", - "logFile": "/var/log/aws-routed-eni/multus.log", - "logLevel": "error", - "logToStderr": true, - "cniConfigDir": "/host/etc/cni/net.d", - "multusAutoconfigDir": "/host/etc/cni/net.d", - "multusMasterCNI": "10-aws.conflist", - "multusConfigFile": "auto", - "socketDir": "/host/run/multus/" -} diff --git a/gitops/components/multus/kustomization.yaml b/gitops/components/multus/kustomization.yaml index d70bc8f..c9d0b48 100644 --- a/gitops/components/multus/kustomization.yaml +++ b/gitops/components/multus/kustomization.yaml @@ -8,13 +8,6 @@ images: - name: ghcr.io/k8snetworkplumbingwg/multus-cni newTag: v4.1.3-thick -configMapGenerator: - - name: multus-daemon-config - namespace: kube-system - behavior: replace - files: - - daemon-config.json - patches: - target: group: apps @@ -28,6 +21,26 @@ patches: kind: DaemonSet name: kube-multus-ds path: ./overlays/multus-daemonset-readiness.yaml + - patch: |- + apiVersion: v1 + kind: ConfigMap + metadata: + name: multus-daemon-config + namespace: kube-system + data: + daemon-config.json: | + { + "chrootDir": "/hostroot", + "cniVersion": "0.4.0", + "logFile": "/var/log/aws-routed-eni/multus.log", + "logLevel": "error", + "logToStderr": true, + "cniConfigDir": "/host/etc/cni/net.d", + "multusAutoconfigDir": "/host/etc/cni/net.d", + "multusMasterCNI": "10-aws.conflist", + "multusConfigFile": "auto", + "socketDir": "/host/run/multus/" + } - target: group: argoproj.io version: v1alpha1