-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Injected oauth imagepullpolicy change and sha256 digest #119
base: v1.6-branch
Are you sure you want to change the base?
Changes from 3 commits
042ad6b
9e50be6
990a1b1
4363e29
434756d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,8 @@ spec: | |
imagePullPolicy: Always | ||
command: | ||
- /manager | ||
args: ["--oauth-proxy-image", "registry.redhat.io/openshift4/ose-oauth-proxy:v4.10"] | ||
# latest v4.10 manifest list digest for architecture AMD64. Used instead of tag format to be compatible with imagePullPolicy: IfNotPresent | ||
args: ["--oauth-proxy-image", "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. discussion on manifest list digest vs image digest at opendatahub-io/odh-manifests#868 (comment) @LaVLaS suggested leaving the notebook controller main management pod oauth proxy image topic (changes in line 28 and 29) out of the PR for now. That makes sense in that this PR here is about the injection of ose-oauth-proxy into Notebook pods under /controllers. @harshad16 @atheo89 Also, @LaVLaS suggested for odh notebook controller manager itself here:
opendatahub-io/odh-manifests#868 (comment) I suggest to handle that in a separate PR. Created an issue #132 |
||
securityContext: | ||
allowPrivilegeEscalation: false | ||
ports: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -740,7 +740,7 @@ func createOAuthContainer(name, namespace string) corev1.Container { | |
return corev1.Container{ | ||
Name: "oauth-proxy", | ||
Image: OAuthProxyImage, | ||
ImagePullPolicy: corev1.PullAlways, | ||
ImagePullPolicy: corev1.PullIfNotPresent, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. previously, test did not run thru because it was still assuming imagePullPolicy Always in IS vs MUST BE comparision during testing |
||
Env: []corev1.EnvVar{{ | ||
Name: "NAMESPACE", | ||
ValueFrom: &corev1.EnvVarSource{ | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -35,7 +35,9 @@ import ( | |||
const ( | ||||
OAuthServicePort = 443 | ||||
OAuthServicePortName = "oauth-proxy" | ||||
OAuthProxyImage = "registry.redhat.io/openshift4/ose-oauth-proxy:latest" | ||||
// use sha256 manifest link 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?architecture=amd64&tag=v4.10.0-202306170106.p0.g799d414.assembly.stream&push_date=1688610772000&container-tabs=gti | ||||
OAuthProxyImage = "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. discussion on manifest list digest vs image digest at opendatahub-io/odh-manifests#868 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VaishnaviHire @cfchase @harshad16 @atheo89 question: is the value of OAuthProxyImage set or overridden by the argument of odh notebook controller manager? I am asking because I've never seen ose-oauth-proxy:latest in injected notebook oauth sidecars.
instead, what seems to be used is the version of ose-oauth defined here: |
||||
) | ||||
|
||||
type OAuthConfig struct { | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kept Always here because this seems to be used internally, not in releases, for testing with the :latest image-tag of odh-notebook-controller, which necessitates imagePullPolicy: Always