Skip to content
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

fix: Support kustomize v5 labels transformer. Fixes #3105 #3775

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

int128
Copy link
Contributor

@int128 int128 commented Aug 7, 2024

This resolves #3105.

It contains the following commits:

I have tested this change using below kustomization.yaml.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configurations:
# https://github.com/argoproj/argo-rollouts/issues/3105#issuecomment-1762856207
- https://raw.githubusercontent.com/int128/argo-rollouts/b7d5d5398629f7452415a90ac41940694652ceb4/docs/features/kustomize/rollout-transform-kustomize-v5.yaml
labels:
- includeTemplates: true
  pairs:
    tags.datadoghq.com/service: example

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

Copy link

sonarqubecloud bot commented Aug 7, 2024

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Diff to rollout-transform.yaml

--- docs/features/kustomize/rollout-transform.yaml	2024-08-07 18:33:37
+++ docs/features/kustomize/rollout-transform-kustomize-v5.yaml	2024-08-07 18:49:48
@@ -203,6 +203,11 @@
   create: false
   kind: Rollout

+templateLabels:
+- path: spec/template/metadata/labels
+  create: true
+  kind: Rollout
+
 # https://github.com/kubernetes-sigs/kustomize/blob/master/api/konfig/builtinpluginconsts/commonannotations.go
 commonAnnotations:
 - path: spec/template/metadata/annotations

@int128 int128 changed the title fix(kustomize): Support kustomize v5 labels transformer. Fixes #3105 fix: Support kustomize v5 labels transformer. Fixes #3105 Aug 7, 2024
Copy link
Contributor

@dlemfh dlemfh left a comment

Choose a reason for hiding this comment

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

Awesome!

Copy link
Contributor

github-actions bot commented Aug 7, 2024

Published E2E Test Results

  4 files    4 suites   3h 32m 29s ⏱️
111 tests  98 ✅  6 💤  7 ❌
462 runs  420 ✅ 24 💤 18 ❌

For more details on these failures, see this check.

Results for commit b7d5d53.

Copy link
Contributor

github-actions bot commented Aug 7, 2024

Published Unit Test Results

2 176 tests   2 176 ✅  2m 55s ⏱️
  119 suites      0 💤
    1 files        0 ❌

Results for commit b7d5d53.

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.26%. Comparing base (827ce59) to head (b7d5d53).
Report is 69 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3775      +/-   ##
==========================================
+ Coverage   84.24%   84.26%   +0.02%     
==========================================
  Files         154      154              
  Lines       18022    18022              
==========================================
+ Hits        15182    15187       +5     
+ Misses       1998     1995       -3     
+ Partials      842      840       -2     

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

@zachaller zachaller merged commit 48131eb into argoproj:master Aug 7, 2024
25 of 26 checks passed
@int128 int128 deleted the issue-3105 branch August 8, 2024 00:33
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.

Breaking changes when using kustomize v5 with rollout-transform.yaml
3 participants