Documentation ¶
Index ¶
- Variables
- func DefaultResourcesFor(platforms ...string) []string
- type Resources
- func (r *Resources) AddData(name, value string)
- func (r *Resources) AddDefaultResourcesFor(platforms ...string)
- func (r *Resources) AddResources(resources []string) error
- func (r *Resources) AppendData(data map[string]string)
- func (r *Resources) Apply(name string) (err error)
- func (r *Resources) ApplyAll() error
- func (r *Resources) Export(exportDir string) error
- func (r *Resources) KubernetesClient() *kube.Client
- func (r *Resources) KubernetesClientSet() (*kubernetes.Clientset, error)
- func (r *Resources) Names() []string
- func (r *Resources) Render(name string, filename string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
var DefaultResourcesPerPlatform = map[string][]string{ "default": []string{ "open-policy-agent", }, "aks": []string{ "azure-storage-classes", "pod-security-policies", "priority-classes", "resource-quotas", "kube-state-metrics", "aks-aad-pod-identity-nmi-mic", "aks-acr-docker-secret", }, "eks": []string{ "aws-auth", "eks-calico", "rook-cluster", "rook-common", "rook-operator", "rook-blockstore", "rook-filestore", "ebs-blockstore", "efs-filestore", "pod-security-policies", "priority-classes", "resource-quotas", "eks-heapster", "kube-state-metrics", "eks-network-policies", }, "aws": []string{ "ebs-blockstore", }, "vsphere": []string{ "vsphere-volumes", }, "raw": []string{}, "vra": []string{}, "stacki": []string{}, "openstack": []string{}, }
DefaultResourcesPerPlatform store the resources to create in a K8s cluster after it's up and running. Some resources are applied on any platform, those are under the name of "default", and some platforms require specific resources
var ResourceTemplates map[string]string
ResourceTemplates contain the code of the resources from the templates/resource directory. The value of ResourceTemplates is in the generated file 'code.go'
Functions ¶
func DefaultResourcesFor ¶
DefaultResourcesFor return the list of resources to create in a K8s cluster on the given platforms. The list includes the default resources that should be in every platform
Types ¶
type Resources ¶
type Resources struct {
// contains filtered or unexported fields
}
Resources is a list of resources with the kubernetes client used to access the cluster where these resources exists
func (*Resources) AddDefaultResourcesFor ¶
AddDefaultResourcesFor adds the default list of resources for the given platforms
func (*Resources) AddResources ¶
AddResources adds the given list of resources to the list of resources. Returns an error if it's a template resource that does not exists
func (*Resources) AppendData ¶
AppendData appends into the map of data the given map of values
func (*Resources) ApplyAll ¶
ApplyAll mimic the `kubectl apply` command to create or update all the resources in the list
func (*Resources) Export ¶
Export exports all the Kubernetes manifest templates to the given directory
func (*Resources) KubernetesClient ¶
KubernetesClient returns the Kubernetes Client
func (*Resources) KubernetesClientSet ¶
func (r *Resources) KubernetesClientSet() (*kubernetes.Clientset, error)
KubernetesClientSet returns the Kubernetes Clientset from the kubernetes client config