-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(helm): libchart for universal affinity rules, enabled for basemap-dev #1333
base: main
Are you sure you want to change the base?
feat(helm): libchart for universal affinity rules, enabled for basemap-dev #1333
Conversation
WalkthroughThe changes involve updates to several Helm chart files and a Kustomization configuration. Key modifications include the introduction of a new library chart for "tiering," enhancements to deployment configurations with affinity rules, and the addition of toggle options for tiering functionality in both development and production values files. These alterations collectively aim to improve the modularity, configurability, and resource management within the Kubernetes environment. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Helm
participant K8s
User->>Helm: Deploy basemap with tiering enabled
Helm->>K8s: Apply deployment with affinity rules
K8s-->>Helm: Confirm deployment
Helm->>User: Deployment successful
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
helm/basemap/Chart.lock
is excluded by!**/*.lock
,!**/*.lock
Files selected for processing (11)
- flux/clusters/k8s-01/basemap/dev/kustomization.yaml (1 hunks)
- helm/basemap/Chart.yaml (1 hunks)
- helm/basemap/templates/cronjobs.yaml (1 hunks)
- helm/basemap/templates/deployment.yaml (2 hunks)
- helm/basemap/values.yaml (1 hunks)
- helm/basemap/values/values-dev.yaml (1 hunks)
- helm/basemap/values/values-prod.yaml (1 hunks)
- helm/lib/tiering/Chart.yaml (1 hunks)
- helm/lib/tiering/templates/_affinity_hpc.yaml (1 hunks)
- helm/lib/tiering/templates/_affinity_interactive.yaml (1 hunks)
- helm/lib/tiering/templates/_labels.yaml (1 hunks)
Files skipped from review due to trivial changes (2)
- helm/basemap/values/values-prod.yaml
- helm/lib/tiering/Chart.yaml
Additional context used
yamllint
helm/lib/tiering/templates/_labels.yaml
[warning] 1-1: too many blank lines
(1 > 0) (empty-lines)
[error] 2-2: syntax error: expected the node content, but found '-'
(syntax)
helm/lib/tiering/templates/_affinity_hpc.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
helm/lib/tiering/templates/_affinity_interactive.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
[warning] 11-11: wrong indentation: expected 2 but found 4
(indentation)
[error] 15-15: trailing spaces
(trailing-spaces)
[warning] 16-16: wrong indentation: expected 12 but found 10
(indentation)
[error] 38-38: trailing spaces
(trailing-spaces)
helm/basemap/templates/cronjobs.yaml
[warning] 21-21: wrong indentation: expected 6 but found 8
(indentation)
Additional comments not posted (25)
flux/clusters/k8s-01/basemap/dev/kustomization.yaml (1)
19-19
: Verify the impact of the removal of the patch directive.The removal of the patch directive alters the way configurations are applied. Ensure that this change does not break the deployment behavior of the basemap component in the Kubernetes cluster.
Run the following script to verify the impact of the removal of the patch directive:
helm/basemap/values/values-dev.yaml (1)
25-26
: Verify the impact of the addition of thetiering_enabled
configuration option.The addition of the
tiering_enabled
configuration option changes the functionality of the application. Ensure that this change does not break the functionality of the application.Run the following script to verify the impact of the addition of the
tiering_enabled
configuration option:Verification successful
Verify the impact of the
tiering_enabled
configuration option in templates.The
tiering_enabled
option affects labels and affinities in the Helm templates, potentially altering resource management. Ensure that components relying on these configurations are tested to confirm correct behavior with the new setting.
_labels.yaml
: Controls the addition of environment-related labels._affinity_interactive.yaml
and_affinity_hpc.yaml
: Sets variables for stages and tiers.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the addition of the `tiering_enabled` configuration option. # Test: Search for the usage of the `tiering_enabled` configuration option. Expect: Only occurrences of the new configuration option. rg --type yaml 'tiering_enabled'Length of output: 602
Script:
#!/bin/bash # Description: Examine the content of template files using `tiering_enabled` to determine the impact. # Display the content of the relevant lines in the template files. rg --type yaml -A 5 'tiering_enabled' helm/lib/tiering/templates/Length of output: 2604
helm/lib/tiering/templates/_labels.yaml (4)
2-7
: LGTM!The template definition for
tiering.labels.interactive
is correctly implemented.The code changes are approved.
Tools
yamllint
[error] 2-2: syntax error: expected the node content, but found '-'
(syntax)
9-14
: LGTM!The template definition for
tiering.labels.hpc
is correctly implemented.The code changes are approved.
16-22
: LGTM!The template definition for
tiering.metadata.interactive
is correctly implemented.The code changes are approved.
24-30
: LGTM!The template definition for
tiering.metadata.hpc
is correctly implemented.The code changes are approved.
helm/basemap/Chart.yaml (5)
18-18
: LGTM!The version number increment is appropriate.
The code changes are approved.
23-23
: LGTM!The addition of the
dependencies
section is appropriate.The code changes are approved.
24-24
: LGTM!The addition of the
tiering
dependency is appropriate.The code changes are approved.
25-25
: LGTM!Specifying the version of the
tiering
dependency is appropriate.The code changes are approved.
26-26
: LGTM!Specifying the repository path for the
tiering
dependency is appropriate.The code changes are approved.
helm/basemap/values.yaml (1)
80-80
: LGTM!The addition of the
tiering_enabled
option is appropriate.The code changes are approved.
helm/lib/tiering/templates/_affinity_hpc.yaml (7)
1-10
: LGTM!The template is correctly defined and checks if
tiering_enabled
is true.The code changes are approved.
Tools
yamllint
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
11-21
: LGTM!The node affinity rules are correctly defined.
The code changes are approved.
Tools
yamllint
[error] 20-20: trailing spaces
(trailing-spaces)
22-31
: LGTM!The preferred node affinity rules for the production environment are correctly defined.
The code changes are approved.
Tools
yamllint
[error] 29-29: trailing spaces
(trailing-spaces)
32-51
: LGTM!The pod affinity rules are correctly defined.
The code changes are approved.
52-69
: LGTM!The pod anti-affinity rules are correctly defined.
The code changes are approved.
70-82
: LGTM!The preferred pod anti-affinity rules for the production environment are correctly defined.
The code changes are approved.
83-84
: LGTM!The template definition is correctly ended.
The code changes are approved.
helm/lib/tiering/templates/_affinity_interactive.yaml (3)
41-60
: LGTM!The pod affinity section is correctly implemented.
The code changes are approved.
61-93
: LGTM!The pod anti-affinity section is correctly implemented.
The code changes are approved.
94-95
: LGTM!The closing section of the file is correctly implemented.
The code changes are approved.
helm/basemap/templates/deployment.yaml (2)
37-37
: LGTM!The inclusion of the new template for interactive labels is correctly implemented.
The code changes are approved.
42-42
: LGTM!The inclusion of the new template for interactive affinity rules is correctly implemented.
The code changes are approved.
helm/basemap/templates/cronjobs.yaml (1)
20-20
: Fix indentation issues.There are indentation issues in the metadata section. Ensure proper YAML formatting.
- {{- include "tiering.metadata.hpc" . | indent 8 }} + {{- include "tiering.metadata.hpc" . | indent 8 }}Likely invalid or redundant comment.
helm/basemap/Chart.lock
Outdated
repository: file://../lib/tiering | ||
version: 0.0.1 | ||
digest: sha256:f04af6def652253c391fdfbf1481064c15a366f723ef0f455a2313204dcc1238 | ||
generated: "2024-08-23T16:39:24.254478926+04:00" |
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.
need some notes on how this is generated
…make a comment in Chart.yaml about untested libchart dependency definition
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- helm/basemap/Chart.yaml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- helm/basemap/Chart.yaml
Please, do not merge without review.
Also, manual operation is required before deployment -- nodes must be manually labeled in accordance with the rules.