-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor Botkube stack into 9 stacks. One each for cluster - environment. #3305
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
base: main
Are you sure you want to change the base?
Conversation
feat: Refactor stack into 9 stacks. One each for cluster - environment. Mostly done by Claude Code aside from the Slack channel bit which I wrote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Botkube Pulumi project into nine separate stacks—one per cluster-environment—introduces a dynamic Slack channel name based on the active stack, and renames the Pulumi project for consistency.
- Derive
slack_channel
fromget_stack()
and wire it into the Helm chart instead of a hard-coded channel - Rename project from
ol-infrastructure-botkube-application
tool-infrastructure-botkube
- Add per-environment Pulumi config files under
operations
,infrastructure
, andapplications
, plus SOPS secrets files
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/ol_infrastructure/applications/botkube/main.py | Compute and log Slack channel from stack; inject into chart |
src/ol_infrastructure/applications/botkube/Pulumi.yaml | Rename Pulumi project |
src/ol_infrastructure/applications/botkube/Pulumi.operations.botkube.QA.yaml | New QA operations stack config |
src/ol_infrastructure/applications/botkube/Pulumi.operations.botkube.Production.yaml | New Production operations stack config |
src/ol_infrastructure/applications/botkube/Pulumi.operations.botkube.CI.yaml | New CI operations stack config |
src/ol_infrastructure/applications/botkube/Pulumi.infrastructure.botkube.QA.yaml | New QA infrastructure stack config |
src/ol_infrastructure/applications/botkube/Pulumi.infrastructure.botkube.Production.yaml | New Production infrastructure stack config |
src/ol_infrastructure/applications/botkube/Pulumi.infrastructure.botkube.CI.yaml | New CI infrastructure stack config |
src/ol_infrastructure/applications/botkube/Pulumi.applications.botkube.QA.yaml | New QA application stack config |
src/ol_infrastructure/applications/botkube/Pulumi.applications.botkube.Production.yaml | New Production application stack config |
src/ol_infrastructure/applications/botkube/Pulumi.applications.botkube.CI.yaml | New CI application stack config |
src/bridge/secrets/botkube/secrets.qa.yaml | Add encrypted QA Slack tokens |
src/bridge/secrets/botkube/secrets.production.yaml | Add encrypted Production Slack tokens |
Comments suppressed due to low confidence (2)
src/bridge/secrets/botkube/secrets.qa.yaml:1
- [nitpick] The environment suffix in this file name is lowercase (
qa
), but other Pulumi config files use uppercase (QA
). Consider using a consistent casing for environment identifiers across all filenames.
---
src/ol_infrastructure/applications/botkube/Pulumi.operations.botkube.QA.yaml:1
- [nitpick] There is a lot of duplication across the per-environment
operations
,infrastructure
, andapplications
YAML files. You might consider generating these configs via a script or templating engine to reduce repeated boilerplate.
---
Include # in slack channel. Co-authored-by: Copilot <[email protected]>
Lowercase channel name. Co-authored-by: Copilot <[email protected]>
@@ -139,6 +139,11 @@ | |||
lambda ns: check_cluster_namespace(botkube_namespace, ns) | |||
) | |||
|
|||
pulumi_stack = get_stack() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have an existing utility called "parse_stack" that we typically use to pull out stack name components. That being said, we probably want to just put the slack channel in the stack config.
feat: Refactor Botkube stack into 9 stacks. One each for cluster - environment.
Mostly done by Claude Code aside from the Slack channel bit which I wrote.
What are the relevant tickets?
mitodl/hq#7186
Description (What does it do?)
Refactor Botkube stack into 9 stacks, one per cluster X environment