From 8223fbb63f45885b1f07e97305f289404a28ddf2 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Thu, 1 Aug 2024 12:39:51 +0200 Subject: [PATCH] RHOAIENG-9935: feat(nbcs): get ose-oauth-proxy image with PullIfNeeded policy and use digest to specify the image --- .../odh-notebook-controller/config/manager/manager.yaml | 2 +- .../odh-notebook-controller/controllers/notebook_oauth.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/odh-notebook-controller/config/manager/manager.yaml b/components/odh-notebook-controller/config/manager/manager.yaml index 5cbfc7303fb..991878bfbf3 100644 --- a/components/odh-notebook-controller/config/manager/manager.yaml +++ b/components/odh-notebook-controller/config/manager/manager.yaml @@ -25,7 +25,7 @@ spec: 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/controllers/notebook_oauth.go b/components/odh-notebook-controller/controllers/notebook_oauth.go index e67b7683dd3..f289dfc2a27 100644 --- a/components/odh-notebook-controller/controllers/notebook_oauth.go +++ b/components/odh-notebook-controller/controllers/notebook_oauth.go @@ -35,7 +35,10 @@ import ( const ( OAuthServicePort = 443 OAuthServicePortName = "oauth-proxy" - OAuthProxyImage = "registry.redhat.io/openshift4/ose-oauth-proxy:latest" + // OAuthProxyImage uses sha256 manifest list digest value of v4.8 image for AMD64 as default to be compatible with imagePullPolicy: IfNotPresent, overridable + // taken from https://catalog.redhat.com/software/containers/openshift4/ose-oauth-proxy/5cdb2133bed8bd5717d5ae64?image=6306f12280cc9b3291272668&architecture=amd64&container-tabs=overview + // and kept in sync with the manifests here and in ClusterServiceVersion metadata of opendatahub operator + OAuthProxyImage = "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4bef31eb993feb6f1096b51b4876c65a6fb1f4401fee97fa4f4542b6b7c9bc46" ) type OAuthConfig struct {