Skip to content

Implement DetermineStrategy for the Kubernetes plugin #5362

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 5 commits into from
Nov 26, 2024

Conversation

Warashi
Copy link
Member

@Warashi Warashi commented Nov 25, 2024

What this PR does:

This PR adds the DetermineStrategy implementation for the k8s plugin.

Why we need it:

We have to support this method to deploy k8s resources.

Which issue(s) this PR fixes:

Part of #4980

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):

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 53.60825% with 45 lines in your changes missing coverage. Please review.

Project coverage is 25.49%. Comparing base (fda760d) to head (4abada7).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...app/pipedv1/plugin/kubernetes/deployment/server.go 0.00% 39 Missing ⚠️
.../pipedv1/plugin/kubernetes/deployment/determine.go 89.65% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5362      +/-   ##
==========================================
+ Coverage   25.43%   25.49%   +0.06%     
==========================================
  Files         446      446              
  Lines       47839    47939     +100     
==========================================
+ Hits        12166    12224      +58     
- Misses      34721    34762      +41     
- Partials      952      953       +1     

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


// First up, checks to see if the workload's `spec.template` has been changed,
// and then checks if the configmap/secret's data.
func determineStrategy(olds, news []provider.Manifest, workloadRefs []config.K8sResourceReference, logger *zap.Logger) (strategy model.SyncStrategy, summary string) {
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

@khanhtc1202 khanhtc1202 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 Warashi merged commit 24e91ca into master Nov 26, 2024
18 checks passed
@Warashi Warashi deleted the k8s-plugin-determine-strategies branch November 26, 2024 00:14
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.

4 participants