From a3032a781fe837602d017aea5e54721ececa57c1 Mon Sep 17 00:00:00 2001 From: Em Sharnoff Date: Tue, 25 Jun 2024 06:37:49 -0700 Subject: [PATCH] neonvm: Fix double prefix in image loader (#993) Basically, we were applying the 'neonvm-' prefix twice when we added neonvm-runner-image-loader into neonvm.yaml (see #988 for more). The diff in neonvm.yaml from the #988 to now: ```diff 4007c4007 < name: neonvm-neonvm-runner-image-loader --- > name: neonvm-runner-image-loader ``` (i.e., the name of the daemonset is corrected, as it should be) And, there is no diff in neonvm-runner-image-loader. --- Makefile | 8 ++++---- neonvm/config/kustomization.yaml | 3 ++- neonvm/runner-image-loader/{ => bases}/daemonset.yaml | 0 neonvm/runner-image-loader/bases/kustomization.yaml | 10 ++++++++++ neonvm/runner-image-loader/kustomization.yaml | 3 +-- 5 files changed, 17 insertions(+), 7 deletions(-) rename neonvm/runner-image-loader/{ => bases}/daemonset.yaml (100%) create mode 100644 neonvm/runner-image-loader/bases/kustomization.yaml diff --git a/Makefile b/Makefile index f4ce5cd38..3bf87ae5a 100644 --- a/Makefile +++ b/Makefile @@ -251,7 +251,7 @@ render-manifests: $(RENDERED) kustomize # Prepare: cd neonvm/config/controller && $(KUSTOMIZE) edit set image controller=$(IMG_CONTROLLER) && $(KUSTOMIZE) edit add annotation buildtime:$(BUILDTS) --force cd neonvm/config/vxlan-controller && $(KUSTOMIZE) edit set image vxlan-controller=$(IMG_VXLAN_CONTROLLER) && $(KUSTOMIZE) edit add annotation buildtime:$(BUILDTS) --force - cd neonvm/runner-image-loader && $(KUSTOMIZE) edit set image runner=$(IMG_RUNNER) && $(KUSTOMIZE) edit add annotation buildtime:$(BUILDTS) --force + cd neonvm/runner-image-loader/bases && $(KUSTOMIZE) edit set image runner=$(IMG_RUNNER) && $(KUSTOMIZE) edit add annotation buildtime:$(BUILDTS) --force cd deploy/scheduler && $(KUSTOMIZE) edit set image autoscale-scheduler=$(IMG_SCHEDULER) && $(KUSTOMIZE) edit add annotation buildtime:$(BUILDTS) --force cd deploy/agent && $(KUSTOMIZE) edit set image autoscaler-agent=$(IMG_AUTOSCALER_AGENT) && $(KUSTOMIZE) edit add annotation buildtime:$(BUILDTS) --force # Build: @@ -265,7 +265,7 @@ render-manifests: $(RENDERED) kustomize # Cleanup: cd neonvm/config/controller && $(KUSTOMIZE) edit set image controller=controller:dev && $(KUSTOMIZE) edit remove annotation buildtime --ignore-non-existence cd neonvm/config/vxlan-controller && $(KUSTOMIZE) edit set image vxlan-controller=vxlan-controller:dev && $(KUSTOMIZE) edit remove annotation buildtime --ignore-non-existence - cd neonvm/runner-image-loader && $(KUSTOMIZE) edit set image runner=runner:dev && $(KUSTOMIZE) edit remove annotation buildtime --ignore-non-existence + cd neonvm/runner-image-loader/bases && $(KUSTOMIZE) edit set image runner=runner:dev && $(KUSTOMIZE) edit remove annotation buildtime --ignore-non-existence cd deploy/scheduler && $(KUSTOMIZE) edit set image autoscale-scheduler=autoscale-scheduler:dev && $(KUSTOMIZE) edit remove annotation buildtime --ignore-non-existence cd deploy/agent && $(KUSTOMIZE) edit set image autoscaler-agent=autoscaler-agent:dev && $(KUSTOMIZE) edit remove annotation buildtime --ignore-non-existence @@ -273,7 +273,7 @@ render-release: $(RENDERED) kustomize # Prepare: cd neonvm/config/controller && $(KUSTOMIZE) edit set image controller=$(IMG_CONTROLLER) cd neonvm/config/vxlan-controller && $(KUSTOMIZE) edit set image vxlan-controller=$(IMG_VXLAN_CONTROLLER) - cd neonvm/runner-image-loader && $(KUSTOMIZE) edit set image runner=$(IMG_RUNNER) + cd neonvm/runner-image-loader/bases && $(KUSTOMIZE) edit set image runner=$(IMG_RUNNER) cd deploy/scheduler && $(KUSTOMIZE) edit set image autoscale-scheduler=$(IMG_SCHEDULER) cd deploy/agent && $(KUSTOMIZE) edit set image autoscaler-agent=$(IMG_AUTOSCALER_AGENT) # Build: @@ -287,7 +287,7 @@ render-release: $(RENDERED) kustomize # Cleanup: cd neonvm/config/controller && $(KUSTOMIZE) edit set image controller=controller:dev cd neonvm/config/vxlan-controller && $(KUSTOMIZE) edit set image vxlan-controller=vxlan-controller:dev - cd neonvm/runner-image-loader && $(KUSTOMIZE) edit set image runner=runner:dev + cd neonvm/runner-image-loader/bases && $(KUSTOMIZE) edit set image runner=runner:dev cd deploy/scheduler && $(KUSTOMIZE) edit set image autoscale-scheduler=autoscale-scheduler:dev cd deploy/agent && $(KUSTOMIZE) edit set image autoscaler-agent=autoscaler-agent:dev diff --git a/neonvm/config/kustomization.yaml b/neonvm/config/kustomization.yaml index ad38e3c11..c549b2815 100644 --- a/neonvm/config/kustomization.yaml +++ b/neonvm/config/kustomization.yaml @@ -13,6 +13,7 @@ namePrefix: neonvm- # someName: someValue bases: +- namespace - crd - rbac - controller @@ -23,7 +24,7 @@ bases: - vxlan-controller - network - device-plugin -- ../runner-image-loader +- ../runner-image-loader/bases patchesStrategicMerge: - webhookcainjection_patch.yaml diff --git a/neonvm/runner-image-loader/daemonset.yaml b/neonvm/runner-image-loader/bases/daemonset.yaml similarity index 100% rename from neonvm/runner-image-loader/daemonset.yaml rename to neonvm/runner-image-loader/bases/daemonset.yaml diff --git a/neonvm/runner-image-loader/bases/kustomization.yaml b/neonvm/runner-image-loader/bases/kustomization.yaml new file mode 100644 index 000000000..8cb5cd6f2 --- /dev/null +++ b/neonvm/runner-image-loader/bases/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- daemonset.yaml + +images: +- name: runner + newName: runner + newTag: dev diff --git a/neonvm/runner-image-loader/kustomization.yaml b/neonvm/runner-image-loader/kustomization.yaml index 36d1320d6..c2a84289c 100644 --- a/neonvm/runner-image-loader/kustomization.yaml +++ b/neonvm/runner-image-loader/kustomization.yaml @@ -7,9 +7,8 @@ namespace: neonvm-system namePrefix: neonvm- resources: -- daemonset.yaml +- bases - ../config/namespace - images: - name: runner newName: runner