Skip to content

Commit

Permalink
Add crunchydb postgres cluster to cleanup job (#3383)
Browse files Browse the repository at this point in the history
  • Loading branch information
conbrad authored Feb 7, 2024
1 parent 9e793b4 commit 1c5d48c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions openshift/scripts/oc_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ else
DELETE_OR_GET="get"
fi
OC_CLEAN_DEPLOY="oc -n ${PROJ_TARGET} ${DELETE_OR_GET} all,cm,pvc -o name -l app=${APP_LABEL}"
OC_CLEAN_TILESERV="oc -n ${PROJ_TARGET} ${DELETE_OR_GET} all,cm,pvc,PostgresCluster -o name -l app=wps-tileserv-${SUFFIX}"

# Execute commands
#
echo -e "\n${PROJ_TARGET}:"
eval "${OC_CLEAN_DEPLOY}"
eval "${OC_CLEAN_TILESERV}"

# Provide oc command instruction
#
Expand Down
9 changes: 7 additions & 2 deletions openshift/scripts/oc_cleanup_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ OC_CLEAN_DEPLOY="oc -n ${PROJ_TARGET} ${DELETE_OR_GET} \
all,cm,secret,endpoints,serviceaccounts,rolebinding.rbac.authorization.k8s.io,roles.rbac.authorization.k8s.io,pvc \
-o name -l app=${APPLICATION_NAME} -l cluster-name=${APPLICATION_NAME}"

OC_CLEAN_CRUNCHY="oc -n ${PROJ_TARGET} ${DELETE_OR_GET} \
PostgresCluster \
-o name -l app=wps-crunchydb-${SUFFIX}"

OC_CLEAN_CONFIGMAPS="oc -n ${PROJ_TARGET} ${DELETE_OR_GET} \
configmaps \
-o name -l cluster-name=${APPLICATION_NAME}"
Expand All @@ -47,11 +51,12 @@ OC_CLEAN_PATRONI_NETWORK_POLICY="oc -n ${PROJ_TARGET} ${DELETE_OR_GET} networkpo

# Execute commands
#
echo -e "\n${PROJ_TARGET}:"
echo -e "\n${PROJ_TARGET}:"
eval "${OC_CLEAN_DEPLOY}"
eval "${OC_CLEAN_CRUNCHY}"
eval "${OC_CLEAN_CONFIGMAPS}"
eval "${OC_CLEAN_PATRONI_NETWORK_POLICY}"

# Provide oc command instruction
#
display_helper "${OC_CLEAN_DEPLOY}" "${OC_CLEAN_CONFIGMAPS}" "${OC_CLEAN_PATRONI_NETWORK_POLICY}"
display_helper "${OC_CLEAN_DEPLOY}" "${OC_CLEAN_CRUNCHY}" "${OC_CLEAN_CONFIGMAPS}" "${OC_CLEAN_PATRONI_NETWORK_POLICY}"

0 comments on commit 1c5d48c

Please sign in to comment.