Skip to content
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
15 changes: 14 additions & 1 deletion .ibm/pipelines/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -749,12 +749,25 @@ rbac_deployment() {
configure_namespace "${NAME_SPACE_POSTGRES_DB}"
configure_namespace "${NAME_SPACE_RBAC}"
configure_external_postgres_db "${NAME_SPACE_RBAC}"

# Initiate rbac instance deployment.
local rbac_rhdh_base_url="https://${RELEASE_NAME_RBAC}-developer-hub-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC}" "${rbac_rhdh_base_url}"
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${RELEASE_NAME_RBAC}"
perform_helm_install "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${HELM_CHART_RBAC_VALUE_FILE_NAME}"

# NOTE: This is a workaround to allow the sonataflow platform to connect to the external postgres db using ssl.
until [[ $(oc get jobs -n "${NAME_SPACE_RBAC}" 2>/dev/null | grep "${RELEASE_NAME_RBAC}-create-sonataflow-database" | wc -l) -eq 1 ]]; do
echo "Waiting for sf db creation job to be created. Retrying in 5 seconds..."
sleep 5
done
oc wait --for=condition=complete job/"${RELEASE_NAME_RBAC}-create-sonataflow-database" -n "${NAME_SPACE_RBAC}" --timeout=3m
oc -n "${NAME_SPACE_RBAC}" patch sfp sonataflow-platform --type=merge \
-p '{"spec":{"services":{"jobService":{"podTemplate":{"container":{"env":[{"name":"QUARKUS_DATASOURCE_REACTIVE_URL","value":"postgresql://postgress-external-db-primary.postgress-external-db.svc.cluster.local:5432/sonataflow?search_path=jobs-service&sslmode=require&ssl=true&trustAll=true"},{"name":"QUARKUS_DATASOURCE_REACTIVE_SSL_MODE","value":"require"},{"name":"QUARKUS_DATASOURCE_REACTIVE_TRUST_ALL","value":"true"}]}}}}}}'
oc rollout restart deployment/sonataflow-platform-jobs-service -n "${NAME_SPACE_RBAC}"

# initiate orchestrator workflows deployment
deploy_orchestrator_workflows "${NAME_SPACE_RBAC}"
}

initiate_deployments() {
Expand Down
40 changes: 40 additions & 0 deletions .ibm/pipelines/value_files/values_showcase-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ upstream:
env:
- name: NPM_CONFIG_USERCONFIG
value: /opt/app-root/src/.npmrc.dynamic-plugins
- name: MAX_ENTRY_SIZE
value: "30000000"
imagePullPolicy: Always
volumeMounts:
- mountPath: /dynamic-plugins-root
Expand Down Expand Up @@ -337,3 +339,41 @@ upstream:
enabled: false
auth:
existingSecret: postgres-cred

orchestrator:
enabled: true
serverlessLogicOperator:
enabled: true
serverlessOperator:
enabled: true
sonataflowPlatform:
monitoring:
enabled: true
eventing:
broker:
name: ""
namespace: ""
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "1Gi"
cpu: "500m"
# -- Secret name for the user-created secret to connect an external DB
externalDBsecretRef: "postgres-cred"

# -- Name for the user-configured external Database
externalDBName: "postgres"

# -- Host for the user-configured external Database
externalDBHost: "postgress-external-db-primary.postgress-external-db.svc.cluster.local"

# -- Port for the user-configured external Database
externalDBPort: "5432"

# -- Image for the init container used by the create-db job
initContainerImage: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.3-1"

# -- Image for the container used by the create-db job
createDBJobImage: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.3-1"
Loading