chore: housekeeping#598
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens CI workflows and the charts/pubcode Helm chart to better align with BC Gov GitHub Actions and OpenShift/Kubernetes operational standards (pinned actions, tighter workflow permissions, and more resilient/safe pod scheduling and filesystem settings).
Changes:
- Updated GitHub Actions workflows to use centralized
bcgov/actions, SHA-pin third-party actions, and add stricter shell execution (set -euo pipefail) in key script blocks. - Hardened Helm workloads with PodDisruptionBudgets, termination grace periods, read-only root filesystems, and writable
/tmpviaemptyDir. - Added pod anti-affinity defaults for API and frontend to improve replica spreading across nodes.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| charts/pubcode/values.yaml | Adds PDB config, termination grace periods, anti-affinity defaults, and /tmp volume settings (database) |
| charts/pubcode/templates/frontend/templates/pdb.yaml | Switches frontend PDB from minAvailable to maxUnavailable |
| charts/pubcode/templates/frontend/templates/deployment.yaml | Adds termination grace period and /tmp emptyDir mount; supports read-only root FS |
| charts/pubcode/templates/database/templates/sfs.yml | Adds termination grace period and read-only root FS (database + init); uses values-driven mounts/volumes |
| charts/pubcode/templates/api/templates/pdb.yml | Switches API PDB from minAvailable to maxUnavailable |
| charts/pubcode/templates/api/templates/deployment.yml | Adds termination grace period and /tmp emptyDir mount; enforces read-only root FS |
| .gitignore | Ignores additional local tooling artifacts |
| .github/workflows/scheduled.yml | Updates action versions/pinning and hardens shell execution |
| .github/workflows/pr-open.yml | Migrates to bcgov/actions, tightens permissions, and adds a results aggregator job |
| .github/workflows/merge.yml | Updates checkout action version |
| .github/workflows/analysis.yml | Updates checkout action and SHA-pins Trivy action |
| .github/workflows/.tests.yml | Updates checkout action and SHA-pins Cypress action |
| .github/workflows/.deploy.yml | Updates checkout action, hardens shell execution, and makes cleanup more resilient |
| .gitattributes | Enforces LF endings and treats binary assets appropriately |
DerekRoberts
approved these changes
Jul 12, 2026
DerekRoberts
left a comment
Member
There was a problem hiding this comment.
Incremental improvement. 😊
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens CI workflows and the Helm chart against BC Gov's GitHub Actions and OpenShift platform standards.
GitHub Actions
bcgov/actionsrepopr-open.yml: PR branch name sanitization (fixes a script-injection path), singleresultsaggregator as the required check, deny-allpermissions: {}with per-job step-ups, migrated tobcgov/actionsconsolidated actionscypress-io/github-action,aquasecurity/trivy-action,redhat-actions/openshift-tools-installer)set -euo pipefailadded to all non-trivialrun:/commands:blocks across.deploy.ymlandscheduled.ymlHelm chart (
charts/pubcode)PodDisruptionBudgetfor api and frontendpodAntiAffinityonkubernetes.io/hostname) for api and frontendterminationGracePeriodSeconds(api/frontend: 30s, database: 60s)readOnlyRootFilesystem: true+ writable/tmpemptyDir to all containers (api, frontend, database, database initContainer)Thanks for the PR!
Any successful deployments (not always required) will be available below.
API available
Frontend available
Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow