Skip to content

Commit 4fa6b5d

Browse files
Merge pull request opendatahub-io#132 from gmfrasca/bugfix-reorder-oauth-containers
Reorder Multi-container Deployments to use main container first
2 parents b8901e0 + ae1bb29 commit 4fa6b5d

File tree

8 files changed

+376
-376
lines changed

8 files changed

+376
-376
lines changed

config/internal/apiserver/deployment.yaml.tmpl

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,6 @@ spec:
1818
component: data-science-pipelines
1919
spec:
2020
containers:
21-
{{ if .APIServer.EnableRoute }}
22-
- name: oauth-proxy
23-
args:
24-
- --https-address=:8443
25-
- --provider=openshift
26-
- --openshift-service-account=ds-pipeline-{{.Name}}
27-
- --upstream=http://localhost:8888
28-
- --tls-cert=/etc/tls/private/tls.crt
29-
- --tls-key=/etc/tls/private/tls.key
30-
- --cookie-secret=SECRET
31-
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-{{.Name}}","namespace":"{{.Namespace}}"}}'
32-
- '--openshift-sar={"namespace":"{{.Namespace}}","resource":"routes","resourceName":"ds-pipeline-{{.Name}}","verb":"get","resourceAPIGroup":"route.openshift.io"}'
33-
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
34-
image: {{.OAuthProxy}}
35-
ports:
36-
- containerPort: 8443
37-
name: oauth
38-
livenessProbe:
39-
httpGet:
40-
path: /oauth/healthz
41-
port: oauth
42-
scheme: HTTPS
43-
initialDelaySeconds: 30
44-
timeoutSeconds: 1
45-
periodSeconds: 5
46-
successThreshold: 1
47-
failureThreshold: 3
48-
readinessProbe:
49-
httpGet:
50-
path: /oauth/healthz
51-
port: oauth
52-
scheme: HTTPS
53-
initialDelaySeconds: 5
54-
timeoutSeconds: 1
55-
periodSeconds: 5
56-
successThreshold: 1
57-
failureThreshold: 3
58-
resources:
59-
limits:
60-
cpu: 100m
61-
memory: 256Mi
62-
requests:
63-
cpu: 100m
64-
memory: 256Mi
65-
volumeMounts:
66-
- mountPath: /etc/tls/private
67-
name: proxy-tls
68-
{{ end }}
6921
- env:
7022
- name: POD_NAMESPACE
7123
value: "{{.Namespace}}"
@@ -198,6 +150,54 @@ spec:
198150
- name: sample-pipeline
199151
mountPath: /samples/
200152
{{ end }}
153+
{{ if .APIServer.EnableRoute }}
154+
- name: oauth-proxy
155+
args:
156+
- --https-address=:8443
157+
- --provider=openshift
158+
- --openshift-service-account=ds-pipeline-{{.Name}}
159+
- --upstream=http://localhost:8888
160+
- --tls-cert=/etc/tls/private/tls.crt
161+
- --tls-key=/etc/tls/private/tls.key
162+
- --cookie-secret=SECRET
163+
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-{{.Name}}","namespace":"{{.Namespace}}"}}'
164+
- '--openshift-sar={"namespace":"{{.Namespace}}","resource":"routes","resourceName":"ds-pipeline-{{.Name}}","verb":"get","resourceAPIGroup":"route.openshift.io"}'
165+
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
166+
image: {{.OAuthProxy}}
167+
ports:
168+
- containerPort: 8443
169+
name: oauth
170+
livenessProbe:
171+
httpGet:
172+
path: /oauth/healthz
173+
port: oauth
174+
scheme: HTTPS
175+
initialDelaySeconds: 30
176+
timeoutSeconds: 1
177+
periodSeconds: 5
178+
successThreshold: 1
179+
failureThreshold: 3
180+
readinessProbe:
181+
httpGet:
182+
path: /oauth/healthz
183+
port: oauth
184+
scheme: HTTPS
185+
initialDelaySeconds: 5
186+
timeoutSeconds: 1
187+
periodSeconds: 5
188+
successThreshold: 1
189+
failureThreshold: 3
190+
resources:
191+
limits:
192+
cpu: 100m
193+
memory: 256Mi
194+
requests:
195+
cpu: 100m
196+
memory: 256Mi
197+
volumeMounts:
198+
- mountPath: /etc/tls/private
199+
name: proxy-tls
200+
{{ end }}
201201
serviceAccountName: ds-pipeline-{{.Name}}
202202
volumes:
203203
- name: proxy-tls

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

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,52 +20,6 @@ spec:
2020
component: data-science-pipelines
2121
spec:
2222
containers:
23-
- name: oauth-proxy
24-
args:
25-
- --https-address=:8443
26-
- --provider=openshift
27-
- --openshift-service-account=ds-pipeline-ui-{{.Name}}
28-
- --upstream=http://localhost:3000
29-
- --tls-cert=/etc/tls/private/tls.crt
30-
- --tls-key=/etc/tls/private/tls.key
31-
- --cookie-secret=SECRET
32-
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-ui-{{.Name}}","namespace":"{{.Namespace}}"}}'
33-
- '--openshift-sar={"namespace":"{{.Namespace}}","resource":"routes","resourceName":"ds-pipeline-ui-{{.Name}}","verb":"get","resourceAPIGroup":"route.openshift.io"}'
34-
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
35-
image: {{.OAuthProxy}}
36-
ports:
37-
- containerPort: 8443
38-
name: https
39-
livenessProbe:
40-
httpGet:
41-
path: /oauth/healthz
42-
port: 8443
43-
scheme: HTTPS
44-
initialDelaySeconds: 30
45-
timeoutSeconds: 1
46-
periodSeconds: 5
47-
successThreshold: 1
48-
failureThreshold: 3
49-
readinessProbe:
50-
httpGet:
51-
path: /oauth/healthz
52-
port: 8443
53-
scheme: HTTPS
54-
initialDelaySeconds: 5
55-
timeoutSeconds: 1
56-
periodSeconds: 5
57-
successThreshold: 1
58-
failureThreshold: 3
59-
resources:
60-
limits:
61-
cpu: 100m
62-
memory: 256Mi
63-
requests:
64-
cpu: 100m
65-
memory: 256Mi
66-
volumeMounts:
67-
- mountPath: /etc/tls/private
68-
name: proxy-tls
6923
- env:
7024
- name: VIEWER_TENSORBOARD_POD_TEMPLATE_SPEC_PATH
7125
value: /etc/config/viewer-pod-template.json
@@ -143,6 +97,52 @@ spec:
14397
- mountPath: /etc/config
14498
name: config-volume
14599
readOnly: true
100+
- name: oauth-proxy
101+
args:
102+
- --https-address=:8443
103+
- --provider=openshift
104+
- --openshift-service-account=ds-pipeline-ui-{{.Name}}
105+
- --upstream=http://localhost:3000
106+
- --tls-cert=/etc/tls/private/tls.crt
107+
- --tls-key=/etc/tls/private/tls.key
108+
- --cookie-secret=SECRET
109+
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-ui-{{.Name}}","namespace":"{{.Namespace}}"}}'
110+
- '--openshift-sar={"namespace":"{{.Namespace}}","resource":"routes","resourceName":"ds-pipeline-ui-{{.Name}}","verb":"get","resourceAPIGroup":"route.openshift.io"}'
111+
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
112+
image: {{.OAuthProxy}}
113+
ports:
114+
- containerPort: 8443
115+
name: https
116+
livenessProbe:
117+
httpGet:
118+
path: /oauth/healthz
119+
port: 8443
120+
scheme: HTTPS
121+
initialDelaySeconds: 30
122+
timeoutSeconds: 1
123+
periodSeconds: 5
124+
successThreshold: 1
125+
failureThreshold: 3
126+
readinessProbe:
127+
httpGet:
128+
path: /oauth/healthz
129+
port: 8443
130+
scheme: HTTPS
131+
initialDelaySeconds: 5
132+
timeoutSeconds: 1
133+
periodSeconds: 5
134+
successThreshold: 1
135+
failureThreshold: 3
136+
resources:
137+
limits:
138+
cpu: 100m
139+
memory: 256Mi
140+
requests:
141+
cpu: 100m
142+
memory: 256Mi
143+
volumeMounts:
144+
- mountPath: /etc/tls/private
145+
name: proxy-tls
146146
serviceAccountName: ds-pipeline-ui-{{.Name}}
147147
volumes:
148148
- configMap:

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

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,6 @@ spec:
1818
component: data-science-pipelines
1919
spec:
2020
containers:
21-
- name: oauth-proxy
22-
args:
23-
- --https-address=:8443
24-
- --provider=openshift
25-
- --openshift-service-account=ds-pipeline-testdsp0
26-
- --upstream=http://localhost:8888
27-
- --tls-cert=/etc/tls/private/tls.crt
28-
- --tls-key=/etc/tls/private/tls.key
29-
- --cookie-secret=SECRET
30-
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-testdsp0","namespace":"default"}}'
31-
- '--openshift-sar={"namespace":"default","resource":"routes","resourceName":"ds-pipeline-testdsp0","verb":"get","resourceAPIGroup":"route.openshift.io"}'
32-
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
33-
image: oauth-proxy:test0
34-
ports:
35-
- containerPort: 8443
36-
name: oauth
37-
protocol: TCP
38-
livenessProbe:
39-
httpGet:
40-
path: /oauth/healthz
41-
port: oauth
42-
scheme: HTTPS
43-
initialDelaySeconds: 30
44-
timeoutSeconds: 1
45-
periodSeconds: 5
46-
successThreshold: 1
47-
failureThreshold: 3
48-
readinessProbe:
49-
httpGet:
50-
path: /oauth/healthz
51-
port: oauth
52-
scheme: HTTPS
53-
initialDelaySeconds: 5
54-
timeoutSeconds: 1
55-
periodSeconds: 5
56-
successThreshold: 1
57-
failureThreshold: 3
58-
resources:
59-
limits:
60-
cpu: 100m
61-
memory: 256Mi
62-
requests:
63-
cpu: 100m
64-
memory: 256Mi
65-
volumeMounts:
66-
- mountPath: /etc/tls/private
67-
name: proxy-tls
6821
- env:
6922
- name: POD_NAMESPACE
7023
value: "default"
@@ -185,6 +138,53 @@ spec:
185138
subPath: sample_config.json
186139
- mountPath: /samples/
187140
name: sample-pipeline
141+
- name: oauth-proxy
142+
args:
143+
- --https-address=:8443
144+
- --provider=openshift
145+
- --openshift-service-account=ds-pipeline-testdsp0
146+
- --upstream=http://localhost:8888
147+
- --tls-cert=/etc/tls/private/tls.crt
148+
- --tls-key=/etc/tls/private/tls.key
149+
- --cookie-secret=SECRET
150+
- '--openshift-delegate-urls={"/": {"group":"route.openshift.io","resource":"routes","verb":"get","name":"ds-pipeline-testdsp0","namespace":"default"}}'
151+
- '--openshift-sar={"namespace":"default","resource":"routes","resourceName":"ds-pipeline-testdsp0","verb":"get","resourceAPIGroup":"route.openshift.io"}'
152+
- --skip-auth-regex='(^/metrics|^/apis/v1beta1/healthz)'
153+
image: oauth-proxy:test0
154+
ports:
155+
- containerPort: 8443
156+
name: oauth
157+
protocol: TCP
158+
livenessProbe:
159+
httpGet:
160+
path: /oauth/healthz
161+
port: oauth
162+
scheme: HTTPS
163+
initialDelaySeconds: 30
164+
timeoutSeconds: 1
165+
periodSeconds: 5
166+
successThreshold: 1
167+
failureThreshold: 3
168+
readinessProbe:
169+
httpGet:
170+
path: /oauth/healthz
171+
port: oauth
172+
scheme: HTTPS
173+
initialDelaySeconds: 5
174+
timeoutSeconds: 1
175+
periodSeconds: 5
176+
successThreshold: 1
177+
failureThreshold: 3
178+
resources:
179+
limits:
180+
cpu: 100m
181+
memory: 256Mi
182+
requests:
183+
cpu: 100m
184+
memory: 256Mi
185+
volumeMounts:
186+
- mountPath: /etc/tls/private
187+
name: proxy-tls
188188
volumes:
189189
- name: proxy-tls
190190
secret:

0 commit comments

Comments
 (0)