Skip to content

Commit 3e82b3e

Browse files
default tooling value to parent kind if none is provided
1 parent 7c45063 commit 3e82b3e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

applylib/applyset/applyset.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ func New(options Options) (*ApplySet, error) {
9898
// The tooling string slash cutting is to support the ApplySetTooling struct that kubectlapply.NewApplySet() expects.
9999
// For instance, 'kpt/v1.0.0' will map to ApplySetTooling{Name: "kpt", Version: "v1.0.0"}.
100100
toolName, toolVersion, _ := strings.Cut(options.Tooling, "/")
101+
if toolName == "" {
102+
toolName = parent.GetSubject().GetObjectKind().GroupVersionKind().Kind
103+
}
101104
tooling := kubectlapply.ApplySetTooling{Name: toolName, Version: toolVersion}
102105

103106
kapplyset := kubectlapply.NewApplySet(parentRef, tooling, options.RESTMapper)

0 commit comments

Comments
 (0)