1 // Package configconnector provides access to the embedded vendored manifests for 2 // installing K8s Config Connector to K8s clusters. This package only provides a 3 // single function for loading the embedded manifests, and all other functionality 4 // should be implemented in the appropriate `pkg/` directory. 5 // 6 // https://cloud.google.com/config-connector/docs 7 package configconnector 8 9 import ( 10 _ "embed" 11 12 "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 13 14 "edge-infra.dev/pkg/k8s/decoder" 15 ) 16 17 //go:embed manifests.yaml 18 var manifests []byte 19 20 // LoadManifests reads the manifests from the embedded byte mapping containing 21 // vendored KCC installation manifests, and decodes the data into unstructured.Unstructured 22 // objects that can be applied to the K8s API using controller-runtime's client 23 // 24 func LoadManifests() ([]*unstructured.Unstructured, error) { 25 return decoder.DecodeYAML(manifests) 26 } 27