pass projectID from env/configmap without user input (#3458)

This commit is contained in:
Renmin 2020-04-14 00:05:48 +08:00 committed by GitHub
parent 9953e45619
commit 75a92a740c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -52,5 +52,5 @@ MANAGEDSTORAGE=true # True means use CloudSQL + Minio-GCS; False means use in-cl
CLOUDSQL=<yours> # Format like project_id:zone:cloudsql_instance_name
PROJECTID=<yours> # This field will be removed after Marketplace can pass in the project ID
mpdev install --deployer=gcr.io/ml-pipeline-test/hosted/$(git rev-parse HEAD)/deployer:$MM_VER \
--parameters='{"name": "'$APP_INSTANCE_NAME'", "namespace": "'$NAMESPACE'", "managedstorage.enabled": '$MANAGEDSTORAGE', "managedstorage.cloudsqlInstanceConnectionName": "'$CLOUDSQL'", "managedstorage.gcsProjectId": "'$PROJECTID'"}'
--parameters='{"name": "'$APP_INSTANCE_NAME'", "namespace": "'$NAMESPACE'", "managedstorage.enabled": '$MANAGEDSTORAGE', "managedstorage.cloudsqlInstanceConnectionName": "'$CLOUDSQL'"}'
```

View File

@ -38,15 +38,20 @@ spec:
- args:
- gateway
- gcs
- {{ .Values.managedstorage.gcsProjectId }}
- $(PROJECT_ID)
env:
- name: PROJECT_ID
valueFrom:
configMapKeyRef:
name: {{ .Values.gcpDefaultConfigName}}
key: "project_id"
- name: MINIO_ACCESS_KEY
value: minio
- name: MINIO_SECRET_KEY
value: minio123
# Minio is KFP system workload and we use GCE's default service account
# or later Workload Identity's corresponding service account.
# So here no need to setup GOOGLE_APPLICATION_CREDENTIALS.
# So here no need to setup GOOGLE_APPLICATION_CREDENTIALS.
# - name: GOOGLE_APPLICATION_CREDENTIALS
# value: "/etc/credentials/application_default_credentials.json"
image: {{ .Values.images.minio }}

View File

@ -161,12 +161,6 @@ properties:
If the prefix specified is same as an old deployment in the past,
the deployment will recover from an old deployment.
If this not specified, the app instance name will be used.
managedstorage.gcsProjectId:
type: string
title: GCS Bucket's project ID (Managed storage only)
description: |-
Normally it's the same project which installs Kubeflow Pipelines.
It's required if enabled managed storage.
required:
- name