Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
19 changes: 13 additions & 6 deletions .github/workflows/components-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,20 @@ jobs:
|| oc exec -n ambient-code deploy/postgresql -- \
psql -U postgres -c "CREATE DATABASE mlflow"

- name: Verify mlflow-db-credentials secret exists
- name: Ensure mlflow-db-credentials secret exists
run: |
if ! oc get secret mlflow-db-credentials -n redhat-ods-applications &>/dev/null; then
echo "::error::Secret mlflow-db-credentials not found in redhat-ods-applications."
echo "::error::Create it before applying the MLflow resource."
echo "::error::See components/manifests/base/mlflow-db-credentials-secret.yaml.example"
exit 1
if oc get secret mlflow-db-credentials -n redhat-ods-applications &>/dev/null; then
echo "Secret already exists"
else
echo "Creating mlflow-db-credentials from postgresql-credentials..."
DB_USER=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.user}' | base64 -d)
DB_PASS=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.password}' | base64 -d)
DB_HOST=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.host}' | base64 -d)
DB_PORT=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.port}' | base64 -d)
oc create namespace redhat-ods-applications --dry-run=client -o yaml | oc apply -f -
oc create secret generic mlflow-db-credentials \
-n redhat-ods-applications \
--from-literal=uri="postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}.ambient-code.svc.cluster.local:${DB_PORT}/mlflow?sslmode=disable"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
fi

- name: Deploy MLflow instance
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/prod-release-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,20 @@ jobs:
|| oc exec -n ambient-code deploy/postgresql -- \
psql -U postgres -c "CREATE DATABASE mlflow"

- name: Verify mlflow-db-credentials secret exists
- name: Ensure mlflow-db-credentials secret exists
run: |
if ! oc get secret mlflow-db-credentials -n redhat-ods-applications &>/dev/null; then
echo "::error::Secret mlflow-db-credentials not found in redhat-ods-applications."
echo "::error::Create it before applying the MLflow resource."
echo "::error::See components/manifests/base/mlflow-db-credentials-secret.yaml.example"
exit 1
if oc get secret mlflow-db-credentials -n redhat-ods-applications &>/dev/null; then
echo "Secret already exists"
else
echo "Creating mlflow-db-credentials from postgresql-credentials..."
DB_USER=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.user}' | base64 -d)
DB_PASS=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.password}' | base64 -d)
DB_HOST=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.host}' | base64 -d)
DB_PORT=$(oc get secret postgresql-credentials -n ambient-code -o jsonpath='{.data.db\.port}' | base64 -d)
oc create namespace redhat-ods-applications --dry-run=client -o yaml | oc apply -f -
oc create secret generic mlflow-db-credentials \
-n redhat-ods-applications \
--from-literal=uri="postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}.ambient-code.svc.cluster.local:${DB_PORT}/mlflow?sslmode=disable"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
fi

- name: Deploy MLflow instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ metadata:
name: default-dsc
spec:
components:
dashboard:
managementState: Managed
mlflowoperator:
managementState: Managed
Loading