installer: fully automate initial bootstrap and env creation
diff --git a/core/installer/kustomization.go b/core/installer/kustomization.go
index f5f42e5..93f806a 100644
--- a/core/installer/kustomization.go
+++ b/core/installer/kustomization.go
@@ -2,6 +2,7 @@
import (
"bytes"
+ "golang.org/x/exp/slices"
"io"
"io/ioutil"
@@ -46,5 +47,9 @@
}
func (k *Kustomization) AddResources(names ...string) {
- k.Resources = append(k.Resources, names...)
+ for _, name := range names {
+ if !slices.Contains(k.Resources, name) {
+ k.Resources = append(k.Resources, name)
+ }
+ }
}