Skip to content

Commit 9300c4e

Browse files
Merge pull request opendatahub-io#120 from harshad16/params-aouth-proxy
Parameterize the oauth-proxy image as config var
2 parents c4742f4 + d85c297 commit 9300c4e

File tree

17 files changed

+27
-6
lines changed

17 files changed

+27
-6
lines changed

config/base/kustomization.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ vars:
2929
apiVersion: v1
3030
fieldref:
3131
fieldpath: data.IMAGES_ARTIFACT
32+
- name: IMAGES_OAUTHPROXY
33+
objref:
34+
kind: ConfigMap
35+
name: dspo-parameters
36+
apiVersion: v1
37+
fieldref:
38+
fieldpath: data.IMAGES_OAUTHPROXY
3239
- name: IMAGES_PERSISTENTAGENT
3340
objref:
3441
kind: ConfigMap

config/base/params.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ IMAGES_CACHE=registry.access.redhat.com/ubi8/ubi-minimal
66
IMAGES_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro
77
IMAGES_MARIADB=registry.redhat.io/rhel8/mariadb-103:1-188
88
IMAGES_DSPO=quay.io/opendatahub/data-science-pipelines-operator:main-d9ee12b
9+
IMAGES_OAUTHPROXY=registry.redhat.io/openshift4/ose-oauth-proxy:v4.12.0

config/configmaps/files/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Images:
22
ApiServer: $(IMAGES_APISERVER)
33
Artifact: $(IMAGES_ARTIFACT)
4+
OAuthProxy: $(IMAGES_OAUTHPROXY)
45
PersistentAgent: $(IMAGES_PERSISTENTAGENT)
56
ScheduledWorkflow: $(IMAGES_SCHEDULEDWORKFLOW)
67
Cache: $(IMAGES_CACHE)

config/internal/apiserver/deployment.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-{{.Name}}","namespace":"{{.Namespace}}"}}'
3232
- '--openshift-sar={"namespace":"{{.Namespace}}","resource":"routes","resourceName":"ds-pipeline-{{.Name}}","verb":"get","resourceAPIGroup":"route.openshift.io"}'
3333
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
34-
image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.12.0
34+
image: {{.OAuthProxy}}
3535
ports:
3636
- containerPort: 8443
3737
name: oauth

config/internal/mlpipelines-ui/deployment.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-ui-{{.Name}}","namespace":"{{.Namespace}}"}}'
3333
- '--openshift-sar={"namespace":"{{.Namespace}}","resource":"routes","resourceName":"ds-pipeline-ui-{{.Name}}","verb":"get","resourceAPIGroup":"route.openshift.io"}'
3434
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
35-
image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.12.0
35+
image: {{.OAuthProxy}}
3636
ports:
3737
- containerPort: 8443
3838
name: https

config/manager/manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ spec:
3838
value: $(IMAGES_APISERVER)
3939
- name: IMAGES_ARTIFACT
4040
value: $(IMAGES_ARTIFACT)
41+
- name: IMAGES_OAUTHPROXY
42+
value: $(IMAGES_OAUTHPROXY)
4143
- name: IMAGES_PERSISTENTAGENT
4244
value: $(IMAGES_PERSISTENTAGENT)
4345
- name: IMAGES_SCHEDULEDWORKFLOW

controllers/config/defaults.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const (
5959
APIServerCacheImagePath = "Images.Cache"
6060
APIServerMoveResultsImagePath = "Images.MoveResultsImage"
6161
MariaDBImagePath = "Images.MariaDB"
62+
OAuthProxyImagePath = "Images.OAuthProxy"
6263
)
6364

6465
const (
@@ -80,6 +81,7 @@ var requiredFields = []string{
8081
APIServerCacheImagePath,
8182
APIServerMoveResultsImagePath,
8283
MariaDBImagePath,
84+
OAuthProxyImagePath,
8385
}
8486

8587
func GetConfigRequiredFields() []string {

controllers/dspipeline_params.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type DSPAParams struct {
4040
Owner mf.Owner
4141
APIServer *dspa.APIServer
4242
APIServerServiceName string
43+
OAuthProxy string
4344
ScheduledWorkflow *dspa.ScheduledWorkflow
4445
PersistenceAgent *dspa.PersistenceAgent
4546
MlPipelineUI *dspa.MlPipelineUI
@@ -359,6 +360,7 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
359360
p.MlPipelineUI = dsp.Spec.MlPipelineUI.DeepCopy()
360361
p.MariaDB = dsp.Spec.MariaDB.DeepCopy()
361362
p.Minio = dsp.Spec.Minio.DeepCopy()
363+
p.OAuthProxy = config.GetStringConfigWithDefault(config.OAuthProxyImagePath, config.DefaultImageValue)
362364

363365
// TODO: If p.<component> is nil we should create defaults
364366

controllers/testdata/declarative/case_0/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Images:
99
MlPipelineUI: frontend:test0
1010
MariaDB: mariadb:test0
1111
Minio: minio:test0
12+
OAuthProxy: oauth-proxy:test0

controllers/testdata/declarative/case_0/expected/created/apiserver_deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-testdsp0","namespace":"default"}}'
3131
- '--openshift-sar={"namespace":"default","resource":"routes","resourceName":"ds-pipeline-testdsp0","verb":"get","resourceAPIGroup":"route.openshift.io"}'
3232
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
33-
image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.12.0
33+
image: oauth-proxy:test0
3434
ports:
3535
- containerPort: 8443
3636
name: oauth

0 commit comments

Comments
 (0)