Skip to main content

prapps

Kubernetes prapps

Review apps on GKE platform will be called prapps because they are created based on pull request on github's interface.

Review-app URL

${pr_number}.powr-staging.io

Github Action Workflow for deploying Review-app

The Github Action workflow file is located in [PROJECT_ROOT[/.github/workflows/pr.ghcr.yml. The review workflow will run ONLY if pull request (PR):

- opened on `main` branch
- is not closed
- assignee field is set

RAILS_ENV for Review app is staging, and it uses all staging env variables

K8s deployment

  1. A pr.ghcr.yml Github Action will build and push docker image to GHCR (GitHub Container Registry). After successful push process, image will have a pr-{pr_number} tag and will be uploaded to https://ghcr.io/orgs/powrful/staging/web

  2. For each prapp on kubernetes a new namespace will be created. The naming scheme is : pr-{pr_number} You can check it later via kubectl get namespace

The review-app uses web helm chart (<PROJECT_ROOT/.helm/charts/web>) overriding neccessary fields (see pr.ghcr.yml)

Deleting image from GHCR and remove k8s review-app namespace

When your pull request state changes to CLOSED, then remove_old_images_ghcr.yml is triggered

It does 2 jobs: 1) Deletes image from GHCR (purge-image job) 2) Deleting prapp's namespace in kubernetes (thus deleting all prapp workloads)

search tags

  • k8s review-apps, kubernetes review-apps, kubernetes review-app, kubernetes review, prapps, pr-apps, pull-request, pull request