Skip to content

Conversation

BigGold1310
Copy link
Contributor

Fixes #569
Fixes #570

RELNOTE: Adding Deployment checks verifying if update strategy and replicas are correct

…be Rolling if targeted by Service

Fixes zegl#570

Signed-off-by: BigGold1310 <cyrill.naef@gmail.com>
Copy link
Owner

@zegl zegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

In general this looks fantastic, just two changes:

  1. We should not require the deployment strategy to be explicitly set. RollingUpdate is the default value, and that should be OK for us.
  2. Some changes to the copy to make the warnings more actionable.


func TestServiceNotTargetsDeploymentStrategyNotRelevant(t *testing.T) {
t.Parallel()
// Expecting score 0 as it didn't cot rated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed comment as it should be clear without it.

Comment on lines 31 to 33
func TestServiceTargetsDeploymentStrategyNotSet(t *testing.T) {
t.Parallel()
testExpectedScore(t, "service-target-deployment-strategy-not-set.yaml", "Deployment Strategy", scorecard.GradeWarning)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RollingUpdate is the default strategy, I don't think that we should require users to explicitly set the strategy to get rid of the warning.

If no strategy is set, the grade should be GradeAllOK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, updated to GradeAllOk

…if not HPA managed and targeted by Service

Fixes zegl#569

Signed-off-by: BigGold1310 <cyrill.naef@gmail.com>
@zegl zegl force-pushed the add-deployment-checks branch from c3959ae to 32ce7ab Compare January 5, 2024 08:15
@zegl
Copy link
Owner

zegl commented Jan 5, 2024

Thanks!

@zegl zegl merged commit 8e178b1 into zegl:master Jan 5, 2024
@BigGold1310 BigGold1310 deleted the add-deployment-checks branch January 5, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add check for update strategy Add check for replicas > 1
2 participants