From 07ef442e8911272376579ccbda25cfd72d552942 Mon Sep 17 00:00:00 2001 From: Harshad Reddy Nalla Date: Fri, 20 Oct 2023 13:40:33 -0400 Subject: [PATCH] Adjust the manifests based on the RHODS odh-manifests Signed-off-by: Harshad Reddy Nalla --- components/base/kustomization.yaml | 22 +++++++++++++++++++ components/base/params.env | 2 ++ .../overlays/openshift/kustomization.yaml | 8 +++---- .../openshift/manager_openshift_patch.yaml | 3 ++- .../config/overlays/openshift/params.yaml | 3 +++ .../config/base/kustomization.yaml | 4 ---- .../config/manager/kustomization.yaml | 2 ++ .../config/manager/manager.yaml | 4 ++-- .../config/manager/params.yaml | 3 +++ 9 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 components/base/params.env create mode 100644 components/notebook-controller/config/overlays/openshift/params.yaml create mode 100644 components/odh-notebook-controller/config/manager/params.yaml diff --git a/components/base/kustomization.yaml b/components/base/kustomization.yaml index dedaa10c264..b47e463be66 100644 --- a/components/base/kustomization.yaml +++ b/components/base/kustomization.yaml @@ -4,3 +4,25 @@ 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 diff --git a/components/base/params.env b/components/base/params.env new file mode 100644 index 00000000000..347dbe1f942 --- /dev/null +++ b/components/base/params.env @@ -0,0 +1,2 @@ +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/notebook-controller/config/overlays/openshift/kustomization.yaml b/components/notebook-controller/config/overlays/openshift/kustomization.yaml index 7673c7da6cb..ddc1162ed69 100644 --- a/components/notebook-controller/config/overlays/openshift/kustomization.yaml +++ b/components/notebook-controller/config/overlays/openshift/kustomization.yaml @@ -8,10 +8,10 @@ commonLabels: app.kubernetes.io/part-of: odh-notebook-controller component.opendatahub.io/name: kf-notebook-controller opendatahub.io/component: "true" -images: - - name: docker.io/kubeflownotebookswg/notebook-controller - newName: quay.io/opendatahub/kubeflow-notebook-controller - newTag: 1.7-9f0db5d + +configurations: + - params.yaml + configMapGenerator: - name: config behavior: merge diff --git a/components/notebook-controller/config/overlays/openshift/manager_openshift_patch.yaml b/components/notebook-controller/config/overlays/openshift/manager_openshift_patch.yaml index 61f021e1c96..58d412ce528 100644 --- a/components/notebook-controller/config/overlays/openshift/manager_openshift_patch.yaml +++ b/components/notebook-controller/config/overlays/openshift/manager_openshift_patch.yaml @@ -32,10 +32,11 @@ spec: name: notebook-controller-culler-config key: IDLENESS_CHECK_PERIOD optional: true + image: $(odh-kf-notebook-controller-image) resources: limits: cpu: 500m memory: 4Gi requests: cpu: 500m - memory: 256Mi + memory: 256Mi \ No newline at end of file diff --git a/components/notebook-controller/config/overlays/openshift/params.yaml b/components/notebook-controller/config/overlays/openshift/params.yaml new file mode 100644 index 00000000000..1b9660b4fab --- /dev/null +++ b/components/notebook-controller/config/overlays/openshift/params.yaml @@ -0,0 +1,3 @@ +varReference: +- path: spec/template/spec/containers/image + kind: Deployment \ 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 3b7f6c62f4a..e45bd53c008 100644 --- a/components/odh-notebook-controller/config/base/kustomization.yaml +++ b/components/odh-notebook-controller/config/base/kustomization.yaml @@ -3,7 +3,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../default -images: - - name: quay.io/opendatahub/odh-notebook-controller - newName: quay.io/opendatahub/odh-notebook-controller - newTag: 1.7-9f0db5d diff --git a/components/odh-notebook-controller/config/manager/kustomization.yaml b/components/odh-notebook-controller/config/manager/kustomization.yaml index 311972a9b13..c3418098e22 100644 --- a/components/odh-notebook-controller/config/manager/kustomization.yaml +++ b/components/odh-notebook-controller/config/manager/kustomization.yaml @@ -4,3 +4,5 @@ kind: Kustomization resources: - manager.yaml - service.yaml +configurations: +- params.yaml \ No newline at end of file diff --git a/components/odh-notebook-controller/config/manager/manager.yaml b/components/odh-notebook-controller/config/manager/manager.yaml index 7038db98a84..991878bfbf3 100644 --- a/components/odh-notebook-controller/config/manager/manager.yaml +++ b/components/odh-notebook-controller/config/manager/manager.yaml @@ -21,11 +21,11 @@ spec: runAsNonRoot: true containers: - name: manager - image: quay.io/opendatahub/odh-notebook-controller:latest + image: $(odh-notebook-controller-image) imagePullPolicy: Always command: - /manager - args: ["--oauth-proxy-image", "registry.redhat.io/openshift4/ose-oauth-proxy:v4.10"] + args: ["--oauth-proxy-image", "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4bef31eb993feb6f1096b51b4876c65a6fb1f4401fee97fa4f4542b6b7c9bc46"] securityContext: allowPrivilegeEscalation: false ports: diff --git a/components/odh-notebook-controller/config/manager/params.yaml b/components/odh-notebook-controller/config/manager/params.yaml new file mode 100644 index 00000000000..1b9660b4fab --- /dev/null +++ b/components/odh-notebook-controller/config/manager/params.yaml @@ -0,0 +1,3 @@ +varReference: +- path: spec/template/spec/containers/image + kind: Deployment \ No newline at end of file