From f25d2c70e4599575e76272d1e971b3b7bcb8f45c Mon Sep 17 00:00:00 2001 From: Harshad Reddy Nalla Date: Mon, 23 Oct 2023 00:29:52 -0400 Subject: [PATCH] fix: patch images of notebook-controller in its components Signed-off-by: Harshad Reddy Nalla --- components/base/kustomization.yaml | 24 +------------------ .../overlays/openshift/kustomization.yaml | 14 ++++++++++- .../config/overlays/openshift}/params.env | 1 - .../config/base/kustomization.yaml | 15 ++++++++++++ .../config/base/params.env | 1 + 5 files changed, 30 insertions(+), 25 deletions(-) rename components/{base => notebook-controller/config/overlays/openshift}/params.env (52%) create mode 100644 components/odh-notebook-controller/config/base/params.env diff --git a/components/base/kustomization.yaml b/components/base/kustomization.yaml index b47e463be66..1ccc3509abf 100644 --- a/components/base/kustomization.yaml +++ b/components/base/kustomization.yaml @@ -3,26 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization bases: - ../notebook-controller/config/overlays/openshift - - ../odh-notebook-controller/config/base - -configMapGenerator: -- name: notebook-controller-image-parameters - env: params.env -generatorOptions: - disableNameSuffixHash: true - -vars: -- name: odh-kf-notebook-controller-image - objref: - kind: ConfigMap - name: notebook-controller-image-parameters - apiVersion: v1 - fieldref: - fieldpath: data.odh-kf-notebook-controller-image -- name: odh-notebook-controller-image - objref: - kind: ConfigMap - name: notebook-controller-image-parameters - apiVersion: v1 - fieldref: - fieldpath: data.odh-notebook-controller-image \ No newline at end of file + - ../odh-notebook-controller/config/base \ No newline at end of file diff --git a/components/notebook-controller/config/overlays/openshift/kustomization.yaml b/components/notebook-controller/config/overlays/openshift/kustomization.yaml index ddc1162ed69..11366213f06 100644 --- a/components/notebook-controller/config/overlays/openshift/kustomization.yaml +++ b/components/notebook-controller/config/overlays/openshift/kustomization.yaml @@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base -namespace: opendatahub commonLabels: app.kubernetes.io/part-of: odh-notebook-controller component.opendatahub.io/name: kf-notebook-controller @@ -13,12 +12,25 @@ configurations: - params.yaml configMapGenerator: + - name: kf-notebook-controller-image-parameters + env: params.env - name: config behavior: merge literals: - USE_ISTIO=false - ADD_FSGROUP=false +generatorOptions: + disableNameSuffixHash: true patchesStrategicMerge: - remove_namespace_patch.yaml - manager_openshift_patch.yaml - manager_service_openshift_patch.yaml + +vars: +- name: odh-kf-notebook-controller-image + objref: + kind: ConfigMap + name: kf-notebook-controller-image-parameters + apiVersion: v1 + fieldref: + fieldpath: data.odh-kf-notebook-controller-image diff --git a/components/base/params.env b/components/notebook-controller/config/overlays/openshift/params.env similarity index 52% rename from components/base/params.env rename to components/notebook-controller/config/overlays/openshift/params.env index 347dbe1f942..64be4972ebd 100644 --- a/components/base/params.env +++ b/components/notebook-controller/config/overlays/openshift/params.env @@ -1,2 +1 @@ odh-kf-notebook-controller-image=quay.io/opendatahub/kubeflow-notebook-controller:latest -odh-notebook-controller-image=quay.io/opendatahub/odh-notebook-controller:latest \ No newline at end of file diff --git a/components/odh-notebook-controller/config/base/kustomization.yaml b/components/odh-notebook-controller/config/base/kustomization.yaml index e45bd53c008..05d61412382 100644 --- a/components/odh-notebook-controller/config/base/kustomization.yaml +++ b/components/odh-notebook-controller/config/base/kustomization.yaml @@ -3,3 +3,18 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../default + +configMapGenerator: +- name: odh-notebook-controller-image-parameters + env: params.env +generatorOptions: + disableNameSuffixHash: true + +vars: +- name: odh-notebook-controller-image + objref: + kind: ConfigMap + name: odh-notebook-controller-image-parameters + apiVersion: v1 + fieldref: + fieldpath: data.odh-notebook-controller-image \ No newline at end of file diff --git a/components/odh-notebook-controller/config/base/params.env b/components/odh-notebook-controller/config/base/params.env new file mode 100644 index 00000000000..e02d6f25f65 --- /dev/null +++ b/components/odh-notebook-controller/config/base/params.env @@ -0,0 +1 @@ +odh-notebook-controller-image=quay.io/opendatahub/odh-notebook-controller:latest \ No newline at end of file