Convert inventory transformer to plugin, reduce k8sdeps.

This commit is contained in:
Jeffrey Regan
2019-05-31 13:46:35 -07:00
committed by jregan
parent 115a0bc560
commit 81c98c855f
14 changed files with 491 additions and 328 deletions

View File

@@ -0,0 +1,25 @@
// Code generated by "stringer -type=GarbagePolicy"; DO NOT EDIT.
package types
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[GarbageIgnore-1]
_ = x[GarbageCollect-2]
}
const _GarbagePolicy_name = "GarbageIgnoreGarbageCollect"
var _GarbagePolicy_index = [...]uint8{0, 13, 27}
func (i GarbagePolicy) String() string {
i -= 1
if i < 0 || i >= GarbagePolicy(len(_GarbagePolicy_index)-1) {
return "GarbagePolicy(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _GarbagePolicy_name[_GarbagePolicy_index[i]:_GarbagePolicy_index[i+1]]
}

View File

@@ -146,11 +146,11 @@ type Kustomization struct {
Inventory *Inventory `json:"inventory,omitempty" yaml:"inventory:omitempty"`
}
//go:generate stringer -type=GarbagePolicy
type GarbagePolicy int
const (
GarbageUnknown GarbagePolicy = iota
GarbageIgnore
GarbageIgnore GarbagePolicy = iota + 1
GarbageCollect
)