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

DBP-1084-rollout-to-namespaces-do-not-delete-dbs #47

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

aimee-889
Copy link
Contributor

@aimee-889 aimee-889 commented Nov 20, 2024

Description

  • Renamed reuseable GHA that extracts/creates the Kubernetes namesapce from github Granch name. This forces the name to always only have SPSH-0000 and not SPSH-0000-2hfweojr. This change would affect 4 Namespace in the Devcluster and needs to get communicated.
  • This changes enables us to decrease the complexity of the pipeline.
  • This fixes the issue, that if i ran the Deployment to a Namespace manuelly, from a branch in this repo, that the ingress will be named after the branches ticket name of the branch of spsh-app-deploy, and does not take the ones i set via the GHA Inputs.
  • This adds the feature, that the Databases on the Developer namespaces do not get deleted per default, but it has to get actively set.

Worked on DEV:
https://github.com/dBildungsplattform/spsh-app-deploy/actions/runs/12013212924/job/33486263190
Before (Alway delete)

pg_terminate_backend 
----------------------
t
t
(2 rows)

DROP DATABASE
Create owner of the DB
NOTICE:  role "dbadmin" is already a member of role "spshdeveloper" 

After (Deletion to false)

pg_terminate_backend 
----------------------
(0 rows)

DB_FORCE_DELETE is not true. Create Database and User if they do not already exist.
Create owner of the DB
GRANT ROLE
NOTICE:  role "dbadmin" is already a member of role "spshdeveloper"
Create database
Create and set privileges for user spshdeveloper

Links to Tickets or other PRs

Notes

Approval for review

  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

@aimee-889 aimee-889 self-assigned this Nov 20, 2024
@@ -61,7 +69,7 @@ jobs:
needs:
- check_namespace_input
- create_branch_identifier
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy.yml@5
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy.yml@DBP-1084-rollout-to-namespaces-do-not-delete-dbs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back to @5 or @6 before merge

@@ -136,7 +141,7 @@ jobs:
with:
repository: 'dBildungsplattform/spsh-app-deploy'
# comment this in to test changes of a branch in repo
# ref: "<branch_name>"
ref: "DBP-1084-rollout-to-namespaces-do-not-delete-dbs"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back to empty before merge

@aimee-889 aimee-889 requested a review from a team November 25, 2024 15:34
@aimee-889 aimee-889 marked this pull request as ready for review November 28, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant