Files
e4857e4c72 Support postgres as a katib db (#1921)
* implement postgres for katib db

* fix yaml lint

* apply go mod tidy

* Update manifests/v1beta1/components/postgres/postgres.yaml

Co-authored-by: Yuki Iwai <[email protected]>

* refactoring by reviews

- split openconnection to common packages
- add unit test for postgres db

* change to install only mysql by default

* remove useless import

* add postgres kustomization and e2e test for it

* change mysql installation files to be variable

* fix shell scripts

* fix lint

* fix image name

* set default value on github action workflow

* make postgres deployment to use pvc

* temporarily comments

* uncomment invalid experiments

* test with for loop

* sleep until controller created well

* add some comments

* Update pkg/db/v1beta1/postgres/postgres.go

Co-authored-by: Yuki Iwai <[email protected]>

* Update pkg/db/v1beta1/postgres/postgres_test.go

Co-authored-by: Yuki Iwai <[email protected]>

* refactor by reviews

Co-authored-by: Yuki Iwai <[email protected]>
2022-08-19 14:40:53 +00:00

35 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright 2022 The Kubeflow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o xtrace
set -o errexit
SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/../.."
cd "${SCRIPT_ROOT}"
WITH_DATABASE_TYPE=${1:-mysql}
# if mysql, use below kustomize, else use postgres
if [ "$WITH_DATABASE_TYPE" == "mysql" ]; then
kustomize build manifests/v1beta1/installs/katib-standalone | kubectl apply -f -
elif [ "$WITH_DATABASE_TYPE" == "postgres" ]; then
kustomize build manifests/v1beta1/installs/katib-standalone-postgres | kubectl apply -f -
else
echo "Unknown database type: $WITH_DATABASE_TYPE"
exit 1
fi