update modules kustomize add helm

Signed-off-by: LiHui <andrewli@yunify.com>
This commit is contained in:
LiHui
2021-04-14 14:06:59 +08:00
parent e587887aac
commit ce4cfbee51
98 changed files with 108932 additions and 14 deletions

64
vendor/sigs.k8s.io/kustomize/kyaml/sets/string.go generated vendored Normal file
View File

@@ -0,0 +1,64 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package sets
type String map[string]interface{}
func (s String) Len() int {
return len(s)
}
func (s String) List() []string {
var val []string
for k := range s {
val = append(val, k)
}
return val
}
func (s String) Has(val string) bool {
_, found := s[val]
return found
}
func (s String) Insert(vals ...string) {
for _, val := range vals {
s[val] = nil
}
}
func (s String) Difference(s2 String) String {
s3 := String{}
for k := range s {
if _, found := s2[k]; !found {
s3.Insert(k)
}
}
return s3
}
func (s String) SymmetricDifference(s2 String) String {
s3 := String{}
for k := range s {
if _, found := s2[k]; !found {
s3.Insert(k)
}
}
for k := range s2 {
if _, found := s[k]; !found {
s3.Insert(k)
}
}
return s3
}
func (s String) Intersection(s2 String) String {
s3 := String{}
for k := range s {
if _, found := s2[k]; found {
s3.Insert(k)
}
}
return s3
}

44
vendor/sigs.k8s.io/kustomize/kyaml/sets/stringlist.go generated vendored Normal file
View File

@@ -0,0 +1,44 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package sets
// StringList is a set, where each element of
// the set is a string slice.
type StringList [][]string
func (s StringList) Len() int {
return len(s)
}
func (s StringList) Insert(val []string) StringList {
if !s.Has(val) {
return append(s, val)
}
return s
}
func (s StringList) Has(val []string) bool {
if len(s) == 0 {
return false
}
for i := range s {
if isStringSliceEqual(s[i], val) {
return true
}
}
return false
}
func isStringSliceEqual(s []string, t []string) bool {
if len(s) != len(t) {
return false
}
for i := range s {
if s[i] != t[i] {
return false
}
}
return true
}