diff --git a/components/odh-notebook-controller/controllers/notebook_controller_test.go b/components/odh-notebook-controller/controllers/notebook_controller_test.go index 68e503d6d30..60c6483fe22 100644 --- a/components/odh-notebook-controller/controllers/notebook_controller_test.go +++ b/components/odh-notebook-controller/controllers/notebook_controller_test.go @@ -857,7 +857,7 @@ func createOAuthContainer(name, namespace string) corev1.Container { return corev1.Container{ Name: "oauth-proxy", Image: OAuthProxyImage, - ImagePullPolicy: corev1.PullAlways, + ImagePullPolicy: corev1.PullIfNotPresent, Env: []corev1.EnvVar{{ Name: "NAMESPACE", ValueFrom: &corev1.EnvVarSource{ diff --git a/components/odh-notebook-controller/controllers/notebook_oauth.go b/components/odh-notebook-controller/controllers/notebook_oauth.go index e67b7683dd3..886c838e159 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.10 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?tag=v4.10.0-202306170106.p0.g799d414.assembly.stream&push_date=1688610772000>i-tabs=get-the-source&container-tabs=gti + // and kept in sync with the manifests here and in ClusterServiceVersion metadata of opendatahub operator + OAuthProxyImage = "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33" ) type OAuthConfig struct { diff --git a/components/odh-notebook-controller/controllers/notebook_webhook.go b/components/odh-notebook-controller/controllers/notebook_webhook.go index 85342ee0e4b..13204f26a5e 100644 --- a/components/odh-notebook-controller/controllers/notebook_webhook.go +++ b/components/odh-notebook-controller/controllers/notebook_webhook.go @@ -75,7 +75,7 @@ func InjectOAuthProxy(notebook *nbv1.Notebook, oauth OAuthConfig) error { proxyContainer := corev1.Container{ Name: "oauth-proxy", Image: oauth.ProxyImage, - ImagePullPolicy: corev1.PullAlways, + ImagePullPolicy: corev1.PullIfNotPresent, Env: []corev1.EnvVar{{ Name: "NAMESPACE", ValueFrom: &corev1.EnvVarSource{