Skip to content

fix: set-labels handle slice, change log#892

Merged
yuwenma merged 57 commits intokptdev:masterfrom
zyy98:function_feature_change
Aug 4, 2022
Merged

fix: set-labels handle slice, change log#892
yuwenma merged 57 commits intokptdev:masterfrom
zyy98:function_feature_change

Conversation

@zyy98
Copy link
Copy Markdown
Contributor

@zyy98 zyy98 commented Jul 26, 2022

Add more paths that contain slice in SubObject after double checking the kubernetes source code, and refactor that part of slice processing after discussion with Yuwen.
The current code removes the common FieldSpec, and processes each transformation according to the KRM resource the object belong to.
change log to show general information to avoid being truncated.

zyy98 added 30 commits July 12, 2022 18:07
…ll slice type and denote slice type in common.go
…ffinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.labelSelector.matchLabels" & "spec.template.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[].labelSelector.matchLabels" & "spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.labelSelector.matchLabels" & "spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[].labelSelector.matchLabels" & "spec.template.spec.topologySpreadConstraints[].labelSelector.matchLabels" for ReplicationController & ReplicaSet & DaemonSet & Job & CronJob
Comment thread functions/go/set-labels/transformer/labels.go Outdated
Comment thread functions/go/set-labels/transformer/labels.go
@yuwenma
Copy link
Copy Markdown
Contributor

yuwenma commented Aug 1, 2022

The new format is much better! I think it's a good starting point to help us improving the SDK and make the set-labels code shorter and more readable.
I'd like to get another review from @natasha41575

Comment thread functions/go/set-labels/transformer/labels.go Outdated
Comment thread functions/go/set-labels/transformer/labels.go Outdated
Comment thread functions/go/set-labels/transformer/labels.go Outdated
Comment thread functions/go/set-labels/transformer/labels.go Outdated
Comment thread functions/go/set-labels/transformer/labels.go
Copy link
Copy Markdown
Contributor

@natasha41575 natasha41575 left a comment

Choose a reason for hiding this comment

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

Code structure LGTM, defer to @yuwenma for final approval

Comment thread functions/go/set-labels/transformer/labels.go Outdated
Comment thread functions/go/set-labels/transformer/labels.go Outdated
@yuwenma
Copy link
Copy Markdown
Contributor

yuwenma commented Aug 4, 2022

This PR looks great! This is a good starting point to let us continue improving the SDK and adding features. like the OpenApi schema as @natasha41575 suggested.

@yuwenma yuwenma merged commit e0096a7 into kptdev:master Aug 4, 2022
@zyy98 zyy98 changed the title set-labels feature change, handle slice, change log fix: set-labels handle slice, change log Sep 2, 2022
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.

3 participants