-
Notifications
You must be signed in to change notification settings - Fork 4k
fix(helm): spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy is 'Recreate' #40138
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: release
Are you sure you want to change the base?
Conversation
…n strategy is 'Recreate' Signed-off-by: Florian Buchmeier <[email protected]>
WalkthroughThe changes update the Helm deployment template by adding conditional logic to handle the "RollingUpdate" strategy. A new block checks if the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User/CI Pipeline
participant CT as Helm Template Renderer
participant D as Deployment Service
U->>CT: Provide deployment parameters (strategyType, updateStrategy)
alt strategyType is "RollingUpdate"
CT->>D: Deploy with rollingUpdate config (maxSurge, maxUnavailable)
else Other strategy
CT->>D: Deploy without rollingUpdate config
end
D-->>U: Return deployment status
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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
Documentation and Community
|
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
🧹 Nitpick comments (2)
deploy/helm/templates/deployment.yaml (2)
3-4
: Avoid Duplicate Variable Assignment
The variable$postgrespass
is assigned twice with the same value. Although this does not break the template, removing the redundancy can improve clarity and maintainability.
171-172
: Fix Volume Formatting forconfigMap
The adjustment in the indentation for theconfigMap
key improves the readability and consistency of the YAML structure. Make sure that the new formatting does not inadvertently change the intended configuration of the volume.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
deploy/helm/templates/deployment.yaml
(2 hunks)
🔇 Additional comments (1)
deploy/helm/templates/deployment.yaml (1)
21-26
: Conditionally RenderrollingUpdate
Configuration
The new conditional block correctly ensures that therollingUpdate
field is only included when.Values.strategyType
is set to"RollingUpdate"
. This change addresses the deployment failure when the strategy is"Recreate"
. Please verify that the indentation and Helm templating syntax continue to yield valid YAML output.
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
Description
When setting
.Values.strategyType: Recreate
during Helm install or upgrade, the installation fails with the following error message:This is because the Helm Chart still renders the
rollingUpdate
even though the strategy is not set toRollingUpdate
.See the Kubernetes API Reference Docs for Deployments for reference.
In case you have any suggestions or improvements, let me know.
Best regards,
Florian.
Summary by CodeRabbit