Skip to content
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

Removing the unnecessary trunk when generating the DB name #2151

Merged
merged 8 commits into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
{{ if .Values.managedstorage.databaseNamePrefix }}
'--mysql_config_database={{ .Values.managedstorage.databaseNamePrefix }}_metadata',
{{ else }}
'--mysql_config_database={{ .Release.Name | replace "-" "_" | replace "." "_" | trunc 50 }}_metadata',
'--mysql_config_database={{ .Release.Name | replace "-" "_" | replace "." "_"}}_metadata',
{{ end }}
"--mysql_config_port=3306",
"--mysql_config_user=$(DBCONFIG_USER)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,15 @@ spec:
{{ if .Values.managedstorage.enabled }}
- name: OBJECTSTORECONFIG_BUCKETNAME
{{ if .Values.managedstorage.databaseNamePrefix }}
value: '{{ printf "%s-%s" .Values.managedstorage.cloudsqlInstanceConnectionName .values.managedstore.databaseNamePrefix | replace ":" "-" | trunc 50 }}'
value: '{{ printf "%s-%s" .Values.managedstorage.cloudsqlInstanceConnectionName .values.managedstorage.databaseNamePrefix | replace ":" "-" | trunc 50 }}'
{{ else }}
value: '{{ printf "%s-%s" .Values.managedstorage.cloudsqlInstanceConnectionName .Release.Name | replace ":" "-" | trunc 50 }}'
{{ end }}
- name: DBCONFIG_DBNAME
{{ if .Values.managedstorage.databaseNamePrefix }}
value: '{{ .Values.managedstorage.databaseNamePrefix }}_pipeline'
{{ else }}
value: '{{ .Release.Name | replace "-" "_" | replace "." "_" | trunc 50 }}_pipeline'
value: '{{ .Release.Name | replace "-" "_" | replace "." "_" }}_pipeline'
{{ end }}
- name: DBCONFIG_USER
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ managedstorage:
cloudsqlInstanceConnectionName: null
databaseNamePrefix: null
dbUsername: 'root'
dbPassword: null
dbPassword: ''
14 changes: 7 additions & 7 deletions manifests/gcp_marketplace/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ properties:
This field is used to store the content of the service account
JSON file. It can be encoded using base64 instead of messing with JSON format.
To get the encoded credential, run
$ gcloud iam service-accounts keys create application_default_credentials.json --iam-account [your-service-account] && cat application_default_credentials.json | base64
<br><b> $ gcloud iam service-accounts keys create application_default_credentials.json --iam-account [your-service-account] && cat application_default_credentials.json | base64 </b><br>
type: string
default: ""
x-google-marketplace:
Expand All @@ -125,28 +125,28 @@ properties:
default: false
managedstorage.cloudsqlInstanceConnectionName:
type: string
title: CloudSQL instance connection name. Required if use managed storage.
title: CloudSQL instance connection name (Managed storage only)
description: |-
Provide a pre-created CloudSQL for MySQL instance.
The instance connection name can be found in the instance detail page.
For example myproject:us-central1:myinstance.
For more details on how to create a new instance, visit https://cloud.google.com/sql/docs/mysql/quickstart
managedstorage.dbUsername:
type: string
title: Database username. (Managed storage only)
title: Database username (Managed storage only)
description: |-
The database username to connect to the CloudSQL instance.
If leaveing this field empty, the deployment will use the default 'root' user account.
If leaving this field empty, the deployment will use the default 'root' user account.
For more details about mysql username, visit https://cloud.google.com/sql/docs/mysql/users
managedstorage.dbPassword:
type: string
title: Database password. (Managed storage only)
title: Database password (Managed storage only)
description: |-
The database password to connect to the CloudSQL instance.
If leaveing this field empty, the deployment will use no password.
If leaving this field empty, the deployment will use no password.
managedstorage.databaseNamePrefix:
type: string
title: Database name prefix. (Managed storage only)
title: Database name prefix (Managed storage only)
description: |-
The prefix of the database name. Kubeflow Pipelines will create two databases,
[prefix]_pipeline and [prefix]_metadata.
Expand Down