Skip to content

Commit be07438

Browse files
add comment
1 parent ff9c03a commit be07438

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

applylib/applyset/applyset.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ func New(options Options) (*ApplySet, error) {
9595
parent := options.Parent
9696
parentRef := &kubectlapply.ApplySetParentRef{Name: parent.Name(), Namespace: parent.Namespace(), RESTMapping: parent.RESTMapping()}
9797

98+
// The tooling string slash cutting is to support the ApplySetTooling struct that kubectlapply.NewApplySet() expects.
99+
// For instance, 'kpt/v1.0.0' will map to ApplySetTooling{Name: "kpt", Version: "v1.0.0"}.
98100
toolName, toolVersion, _ := strings.Cut(options.Tooling, "/")
99101
if toolName == "" {
100102
toolName = parent.GetSubject().GetObjectKind().GroupVersionKind().Kind

0 commit comments

Comments
 (0)