Skip to content

Commit

Permalink
Fix ml-pipeline-ui doesn't have gcp permission bug (kubeflow#594)
Browse files Browse the repository at this point in the history
* Fix ml-pipeline-ui doesn't have gcp permission bug

* Moved patch to gcp overlay

* Regenerated tests
  • Loading branch information
Bobgy authored and k8s-ci-robot committed Nov 2, 2019
1 parent 22d6b35 commit eb328ec
Show file tree
Hide file tree
Showing 19 changed files with 313 additions and 54 deletions.
1 change: 1 addition & 0 deletions kfdef/kfctl_gcp_basic_auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ spec:
name: pipelines-runner
- kustomizeConfig:
overlays:
- gcp
- istio
- application
repoRef:
Expand Down
1 change: 1 addition & 0 deletions kfdef/kfctl_gcp_iap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ spec:
name: pipelines-runner
- kustomizeConfig:
overlays:
- gcp
- istio
- application
repoRef:
Expand Down
20 changes: 20 additions & 0 deletions pipeline/pipelines-ui/overlays/gcp/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-ui
spec:
template:
spec:
volumes:
- name: gcp-sa-token
secret:
secretName: user-gcp-sa
containers:
- name: ml-pipeline-ui
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/credentials/user-gcp-sa.json
volumeMounts:
- name: gcp-sa-token
mountPath: "/etc/credentials"
readOnly: true
6 changes: 6 additions & 0 deletions pipeline/pipelines-ui/overlays/gcp/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
patchesStrategicMerge:
- deployment.yaml
6 changes: 2 additions & 4 deletions tests/iap-ingress-base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ varReference:
- path: data/healthcheck_route.yaml
kind: ConfigMap
- path: spec/domains
kind: ManagedCertificate
`)
kind: ManagedCertificate`)
th.writeF("/manifests/gcp/iap-ingress/base/params.env", `
namespace=kubeflow
appName=kubeflow
Expand All @@ -553,8 +552,7 @@ oauthSecretName=kubeflow-oauth
project=
adminSaSecretName=admin-gcp-sa
tlsSecretName=envoy-ingress-tls
istioNamespace=istio-system
`)
istioNamespace=istio-system`)
th.writeK("/manifests/gcp/iap-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
6 changes: 2 additions & 4 deletions tests/iap-ingress-overlays-application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,7 @@ varReference:
- path: data/healthcheck_route.yaml
kind: ConfigMap
- path: spec/domains
kind: ManagedCertificate
`)
kind: ManagedCertificate`)
th.writeF("/manifests/gcp/iap-ingress/base/params.env", `
namespace=kubeflow
appName=kubeflow
Expand All @@ -601,8 +600,7 @@ oauthSecretName=kubeflow-oauth
project=
adminSaSecretName=admin-gcp-sa
tlsSecretName=envoy-ingress-tls
istioNamespace=istio-system
`)
istioNamespace=istio-system`)
th.writeK("/manifests/gcp/iap-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
6 changes: 2 additions & 4 deletions tests/iap-ingress-overlays-certmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,7 @@ varReference:
- path: data/healthcheck_route.yaml
kind: ConfigMap
- path: spec/domains
kind: ManagedCertificate
`)
kind: ManagedCertificate`)
th.writeF("/manifests/gcp/iap-ingress/base/params.env", `
namespace=kubeflow
appName=kubeflow
Expand All @@ -634,8 +633,7 @@ oauthSecretName=kubeflow-oauth
project=
adminSaSecretName=admin-gcp-sa
tlsSecretName=envoy-ingress-tls
istioNamespace=istio-system
`)
istioNamespace=istio-system`)
th.writeK("/manifests/gcp/iap-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
6 changes: 2 additions & 4 deletions tests/iap-ingress-overlays-gcp-credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,7 @@ varReference:
- path: data/healthcheck_route.yaml
kind: ConfigMap
- path: spec/domains
kind: ManagedCertificate
`)
kind: ManagedCertificate`)
th.writeF("/manifests/gcp/iap-ingress/base/params.env", `
namespace=kubeflow
appName=kubeflow
Expand All @@ -608,8 +607,7 @@ oauthSecretName=kubeflow-oauth
project=
adminSaSecretName=admin-gcp-sa
tlsSecretName=envoy-ingress-tls
istioNamespace=istio-system
`)
istioNamespace=istio-system`)
th.writeK("/manifests/gcp/iap-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
6 changes: 2 additions & 4 deletions tests/iap-ingress-overlays-managed-cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,7 @@ varReference:
- path: data/healthcheck_route.yaml
kind: ConfigMap
- path: spec/domains
kind: ManagedCertificate
`)
kind: ManagedCertificate`)
th.writeF("/manifests/gcp/iap-ingress/base/params.env", `
namespace=kubeflow
appName=kubeflow
Expand All @@ -573,8 +572,7 @@ oauthSecretName=kubeflow-oauth
project=
adminSaSecretName=admin-gcp-sa
tlsSecretName=envoy-ingress-tls
istioNamespace=istio-system
`)
istioNamespace=istio-system`)
th.writeK("/manifests/gcp/iap-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
6 changes: 2 additions & 4 deletions tests/istio-ingress-overlays-cognito_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ metadata:
th.writeF("/manifests/aws/istio-ingress/overlays/cognito/params.yaml", `
varReference:
- path: metadata/annotations
kind: Ingress
`)
kind: Ingress`)
th.writeF("/manifests/aws/istio-ingress/overlays/cognito/params.env", `
CognitoUserPoolArn=
CognitoAppClientId=
CognitoUserPoolDomain=
certArn=
`)
certArn=`)
th.writeK("/manifests/aws/istio-ingress/overlays/cognito", `
bases:
- ../../base
Expand Down
3 changes: 1 addition & 2 deletions tests/istio-ingress-overlays-oidc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ oidcAuthorizationEndpoint=
oidcTokenEndpoint=
oidcUserInfoEndpoint=
oidcSecretName=istio-oidc-secret
certArn=
`)
certArn=`)
th.writeF("/manifests/aws/istio-ingress/overlays/oidc/secrets.env", `
clientId=
clientSecret=
Expand Down
6 changes: 2 additions & 4 deletions tests/istio-overlays-https-gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,10 @@ varReference:
- path: spec/mode
kind: ClusterRbacConfig
- path: spec/selector
kind: Gateway
`)
kind: Gateway`)
th.writeF("/manifests/istio/istio/base/params.env", `
clusterRbacConfig=ON
gatewaySelector=ingressgateway
`)
gatewaySelector=ingressgateway`)
th.writeK("/manifests/istio/istio/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
Loading

0 comments on commit eb328ec

Please sign in to comment.