Skip to content

[K8s Plugin] Implement generateVariantWorkloadManifests #5864

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

Merged
merged 4 commits into from
May 23, 2025

Conversation

Warashi
Copy link
Member

@Warashi Warashi commented May 22, 2025

What this PR does:

as title

Why we need it:

It is to be used in the canary/baseline rollout like the following codes:

generatedWorkloads, err := generateVariantWorkloadManifests(workloads, configMaps, secrets, variantLabel, variant, suffix, replicasCalculator)
if err != nil {
return nil, err
}
canaryManifests = append(canaryManifests, generatedWorkloads...)

generatedWorkloads, err := generateVariantWorkloadManifests(workloads, nil, nil, variantLabel, variant, suffix, replicasCalculator)
if err != nil {
return nil, err
}
baselineManifests = append(baselineManifests, generatedWorkloads...)

Which issue(s) this PR fixes:

Part of #5764

Does this PR introduce a user-facing change?: No

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Warashi added 2 commits May 22, 2025 11:00
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Copy link

codecov bot commented May 22, 2025

Codecov Report

Attention: Patch coverage is 85.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 28.05%. Comparing base (fa5b3b3) to head (7991db8).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...g/app/pipedv1/plugin/kubernetes/deployment/misc.go 85.33% 8 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5864      +/-   ##
==========================================
+ Coverage   27.97%   28.05%   +0.07%     
==========================================
  Files         510      510              
  Lines       54354    54429      +75     
==========================================
+ Hits        15204    15268      +64     
- Misses      37996    38004       +8     
- Partials     1154     1157       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Warashi Warashi marked this pull request as ready for review May 22, 2025 02:15
@Warashi Warashi marked this pull request as draft May 22, 2025 02:22
@Warashi
Copy link
Member Author

Warashi commented May 22, 2025

I'll resolve the conflicts after merging #5863

…-variant-workload-manifests

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
@Warashi Warashi marked this pull request as ready for review May 22, 2025 03:57
@Warashi
Copy link
Member Author

Warashi commented May 22, 2025

I resolved the conflicts.

t-kikuc
t-kikuc previously approved these changes May 22, 2025
@Warashi Warashi enabled auto-merge (squash) May 23, 2025 00:16
Comment on lines 304 to 306
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
manifests, err := provider.LoadManifestsFromYAMLFile(tc.manifestsFile)
Copy link
Member

Choose a reason for hiding this comment

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

Can we add t.Parallel()?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, added 7991db8.

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Copy link
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

LGTM

@Warashi
Copy link
Member Author

Warashi commented May 23, 2025

@t-kikuc sorry, please re-review.

@Warashi Warashi merged commit a6bf12e into master May 23, 2025
17 of 20 checks passed
@Warashi Warashi deleted the k8s-plugin-generate-variant-workload-manifests branch May 23, 2025 03:41
aryasoni98 pushed a commit to aryasoni98/pipecd that referenced this pull request May 24, 2025
* Implement generateVariantWorkloadManifests

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

* Add test for generateVariantWorkloadManifests

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

---------

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Arya Soni <[email protected]>
@github-actions github-actions bot mentioned this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants