...

Source file src/edge-infra.dev/third_party/k8s/certmanager/cert_manager.go

Documentation: edge-infra.dev/third_party/k8s/certmanager

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

View as plain text