Documentation ¶
Index ¶
- func Apply(ctx context.Context, rcg genericclioptions.RESTClientGetter, ...) (string, error)
- func FilterUnstructured(objs []*unstructured.Unstructured, ...) []*unstructured.Unstructured
- func KubeClient(rcg genericclioptions.RESTClientGetter) (client.WithWatch, error)
- func KubeConfig(rcg genericclioptions.RESTClientGetter) (*rest.Config, error)
- func MustInstallKustomization(ctx context.Context, kubeClient client.Client, name, namespace string) bool
- func MustInstallNS(ctx context.Context, kubeClient client.Client, namespace string) bool
- func NSFilter(ns string) func(*unstructured.Unstructured) bool
- func NewScheme() (scheme *apiruntime.Scheme, err error)
- func ReconcileGitrepository(ctx context.Context, kubeClient client.Client, name, namespace string) error
- func ReconcileKustomization(ctx context.Context, kubeClient client.Client, name, namespace string) error
- func ReportComponentsHealth(ctx context.Context, rcg genericclioptions.RESTClientGetter, ...) error
- func ReportGitrepositoryHealth(ctx context.Context, kubeClient client.Client, ...) error
- func ReportKustomizationHealth(ctx context.Context, kubeClient client.Client, ...) error
- func UnstructuredToYaml(objs []*unstructured.Unstructured) ([]byte, error)
- func YamlToUnstructructured(data []byte) ([]*unstructured.Unstructured, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(ctx context.Context, rcg genericclioptions.RESTClientGetter, root, manifestPath string) (string, error)
Apply is the equivalent of 'kubectl apply --server-side -f'. If the given manifest is a kustomization.yaml, then apply performs the equivalent of 'kubectl apply --server-side -k'.
func FilterUnstructured ¶
func FilterUnstructured(objs []*unstructured.Unstructured, filter func(*unstructured.Unstructured) bool) []*unstructured.Unstructured
FilterUnstructured returns a slice of unstructured objects that match the given filter.
func KubeClient ¶
func KubeClient(rcg genericclioptions.RESTClientGetter) (client.WithWatch, error)
KubeClient returns a new Kubernetes client.
func KubeConfig ¶
func KubeConfig(rcg genericclioptions.RESTClientGetter) (*rest.Config, error)
KubeConfig returns a new Kubernetes rest config.
func MustInstallKustomization ¶
func MustInstallKustomization(ctx context.Context, kubeClient client.Client, name, namespace string) bool
MustInstallKustomization returns true if the given kustomization is not installed.
func MustInstallNS ¶
MustInstallNS returns true if the given namespace is not installed.
func NSFilter ¶
func NSFilter(ns string) func(*unstructured.Unstructured) bool
NSFilter returns a filter that filters out the given namespace.
func NewScheme ¶
func NewScheme() (scheme *apiruntime.Scheme, err error)
NewScheme creates the Scheme methods for serializing and deserializing API objects
func ReconcileGitrepository ¶
func ReconcileGitrepository(ctx context.Context, kubeClient client.Client, name, namespace string) error
ReconcileGitrepository reconciles the given git repository.
func ReconcileKustomization ¶
func ReconcileKustomization(ctx context.Context, kubeClient client.Client, name, namespace string) error
ReconcileKustomization reconciles the given kustomization.
func ReportComponentsHealth ¶
func ReportComponentsHealth(ctx context.Context, rcg genericclioptions.RESTClientGetter, timeout time.Duration, components []string, ns string) error
ReportComponentsHealth reconciles the health of the given components.
func ReportGitrepositoryHealth ¶
func ReportGitrepositoryHealth(ctx context.Context, kubeClient client.Client, name, namespace, expectedRevision string, pollInterval, timeout time.Duration) error
ReportGitrepositoryHealth reconciles the health of the given git repository.
func ReportKustomizationHealth ¶
func ReportKustomizationHealth(ctx context.Context, kubeClient client.Client, name, namespace, expectedRevision string, pollInterval, timeout time.Duration) error
ReportKustomizationHealth reconciles the health of the given kustomization.
func UnstructuredToYaml ¶
func UnstructuredToYaml(objs []*unstructured.Unstructured) ([]byte, error)
func YamlToUnstructructured ¶
func YamlToUnstructructured(data []byte) ([]*unstructured.Unstructured, error)
YamlToUnstructructured converts the given yaml to a slice of unstructured objects.
Types ¶
This section is empty.