Documentation ¶
Index ¶
- Variables
- func GetConfigMap(ns, name string, cl client.Client) (*corev1.ConfigMap, bool, error)
- func GetConfigMapYaml(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetConfigMapYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetCronJob(ns, name string, cl client.Client, versionLessThan121 bool) (*batchv1.CronJob, *batchv1beta1.CronJob, bool, error)
- func GetCronJobByNameWithCache(cronJobName, namespace string, lister informers.SharedInformerFactory, ...) (*batchv1.CronJob, *batchv1beta1.CronJob, error)
- func GetCronJobYaml(ns, name string, cl client.Client, versionLessThan121 bool) ([]byte, bool, error)
- func GetCronJobYamlFormat(ns, name string, cl client.Client, versionLessThan121 bool) ([]byte, bool, error)
- func GetDaemonSet(ns, name string, cl client.Client) (*appsv1.DaemonSet, bool, error)
- func GetDaemonSetYaml(ns, name string, cl client.Client) ([]byte, bool, error)
- func GetDeployment(ns, name string, cl client.Client) (*appsv1.Deployment, bool, error)
- func GetDeploymentByNameWithCache(name, namespace string, lister informers.SharedInformerFactory) (*appsv1.Deployment, error)
- func GetDeploymentYaml(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetDeploymentYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetExtensionsV1Beta1Ingress(namespace, name string, lister informers.SharedInformerFactory) (*extensionsv1beta1.Ingress, bool, error)
- func GetIngressYaml(ns string, name string, cl client.Client, lessThan122 bool) ([]byte, bool, error)
- func GetIngressYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetJob(ns, name string, cl client.Client) (*batchv1.Job, bool, error)
- func GetJobYaml(ns, name string, cl client.Client) ([]byte, bool, error)
- func GetNamespace(ns string, cl client.Client) (*corev1.Namespace, bool, error)
- func GetNetworkingV1Ingress(namespace, name string, lister informers.SharedInformerFactory) (*v1.Ingress, error)
- func GetPVCYaml(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetPVCYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetPod(ns, name string, cl client.Client) (*corev1.Pod, bool, error)
- func GetPvc(ns, name string, cl client.Client) (*corev1.PersistentVolumeClaim, bool, error)
- func GetResourceInCache(ns, name string, obj client.Object, cl client.Reader) (bool, error)
- func GetResourceJSONInCache(ns, name string, gvk schema.GroupVersionKind, cl client.Reader) ([]byte, bool, error)
- func GetResourceJSONInCacheFormat(ns, name string, gvk schema.GroupVersionKind, cl client.Reader) ([]byte, bool, error)
- func GetResourceYamlInCache(ns, name string, gvk schema.GroupVersionKind, cl client.Reader) ([]byte, bool, error)
- func GetResourceYamlInCacheFormat(ns, name string, gvk schema.GroupVersionKind, cl client.Reader) ([]byte, bool, error)
- func GetSecret(ns, name string, cl client.Client) (*corev1.Secret, bool, error)
- func GetSecretYaml(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetSecretYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetService(ns, name string, cl client.Client) (*corev1.Service, bool, error)
- func GetServiceByNameFromCache(name, namespace string, lister informers.SharedInformerFactory) (*corev1.Service, error)
- func GetServiceYaml(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetServiceYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetStatefulSet(ns, name string, cl client.Client) (*appsv1.StatefulSet, bool, error)
- func GetStatefulSetByNameWWithCache(name, namespace string, lister informers.SharedInformerFactory) (*appsv1.StatefulSet, error)
- func GetStatefulSetYaml(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetStatefulSetYamlFormat(ns string, name string, cl client.Client) ([]byte, bool, error)
- func GetUnstructuredIngress(namespace, name string, cl client.Client, clientset *kubernetes.Clientset) (*unstructured.Unstructured, bool, error)
- func ListConfigMaps(ns string, selector labels.Selector, cl client.Client) ([]*corev1.ConfigMap, error)
- func ListConfigMapsYaml(ns string, selector labels.Selector, cl client.Client) ([][]byte, error)
- func ListCronJobs(ns string, selector labels.Selector, cl client.Client, versionLessThan121 bool) ([]*batchv1.CronJob, []*batchv1beta1.CronJob, error)
- func ListCronJobsV1(ns string, selector labels.Selector, cl client.Client) ([]*batchv1.CronJob, error)
- func ListCronJobsV1Beta(ns string, selector labels.Selector, cl client.Client) ([]*batchv1beta1.CronJob, error)
- func ListCronJobsWithCache(selector labels.Selector, lister informers.SharedInformerFactory, ...) ([]*batchv1.CronJob, []*batchv1beta1.CronJob, error)
- func ListCronJobsYaml(ns string, selector labels.Selector, cl client.Client, versionLessThan121 bool) ([][]byte, error)
- func ListDaemonsets(ns string, selector labels.Selector, cl client.Client) ([]*appsv1.DaemonSet, error)
- func ListDeployments(ns string, selector labels.Selector, cl client.Client) ([]*appsv1.Deployment, error)
- func ListDeploymentsWithCache(selector labels.Selector, lister informers.SharedInformerFactory) ([]*appsv1.Deployment, error)
- func ListDeploymentsYaml(ns string, selector labels.Selector, cl client.Client) ([][]byte, error)
- func ListEvents(ns string, selector fields.Selector, cl client.Reader) ([]*corev1.Event, error)
- func ListExtensionsV1Beta1Ingresses(selector labels.Selector, lister informers.SharedInformerFactory) ([]*extensionsv1beta1.Ingress, error)
- func ListIngresses(namespace string, cl client.Client, lessThan122 bool) (*unstructured.UnstructuredList, error)
- func ListIngressesYaml(ns string, selector labels.Selector, cl client.Client) ([][]byte, error)
- func ListJobs(ns string, selector labels.Selector, cl client.Client) ([]*batchv1.Job, error)
- func ListNamespaces(cl client.Reader) ([]*corev1.Namespace, error)
- func ListNetworkingV1Ingress(selector labels.Selector, lister informers.SharedInformerFactory) ([]*v1.Ingress, error)
- func ListNodes(cl client.Client) ([]*corev1.Node, error)
- func ListPods(ns string, selector labels.Selector, cl client.Client) ([]*corev1.Pod, error)
- func ListPodsWithCache(selector labels.Selector, informer informers.SharedInformerFactory) ([]*corev1.Pod, error)
- func ListPvcs(ns string, selector fields.Selector, cl client.Reader) ([]*corev1.PersistentVolumeClaim, error)
- func ListReplicaSets(ns string, selector labels.Selector, cl client.Client) ([]*appsv1.ReplicaSet, error)
- func ListResourceInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, ...) error
- func ListResourceJSONInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, ...) ([][]byte, error)
- func ListResourceYamlInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, ...) ([][]byte, error)
- func ListSecrets(ns string, selector labels.Selector, cl client.Client) ([]*corev1.Secret, error)
- func ListServices(ns string, selector labels.Selector, cl client.Client) ([]*corev1.Service, error)
- func ListServicesWithCache(selector labels.Selector, lister informers.SharedInformerFactory) ([]*corev1.Service, error)
- func ListServicesYaml(ns string, selector labels.Selector, cl client.Client) ([][]byte, error)
- func ListStatefulSets(ns string, selector labels.Selector, cl client.Client) ([]*appsv1.StatefulSet, error)
- func ListStatefulSetsWithCache(selector labels.Selector, lister informers.SharedInformerFactory) ([]*appsv1.StatefulSet, error)
- func ListStatefulSetsYaml(ns string, selector labels.Selector, cl client.Client) ([][]byte, error)
- func ListUnstructuredResourceInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, ...) ([]*unstructured.Unstructured, error)
Constants ¶
This section is empty.
Variables ¶
var ClusterRoleGVK = schema.GroupVersionKind{
Group: "batch",
Kind: "ClusterRole",
Version: "v1",
}
var ConfigMapGVK = schema.GroupVersionKind{
Group: "",
Kind: "ConfigMap",
Version: "v1",
}
var CronJobGVK = schema.GroupVersionKind{
Group: "batch",
Kind: "CronJob",
Version: "v1",
}
var CronJobV1BetaGVK = schema.GroupVersionKind{
Group: "batch",
Kind: "CronJob",
Version: "v1beta1",
}
var DeploymentGVK = schema.GroupVersionKind{
Group: "apps",
Kind: "Deployment",
Version: "v1",
}
var IngressBetaGVK = schema.GroupVersionKind{
Group: "extensions",
Kind: "Ingress",
Version: "v1beta1",
}
var IngressGVK = schema.GroupVersionKind{
Group: "networking.k8s.io",
Kind: "Ingress",
Version: "v1",
}
var JobGVK = schema.GroupVersionKind{
Group: "batch",
Kind: "Job",
Version: "v1",
}
var ReplicaSetGVK = schema.GroupVersionKind{
Group: "apps",
Kind: "ReplicaSet",
Version: "v1",
}
var RoleGVK = schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "Role",
Version: "v1",
}
var ServiceGVK = schema.GroupVersionKind{
Group: "",
Kind: "Service",
Version: "v1",
}
var StatefulSetGVK = schema.GroupVersionKind{
Group: "apps",
Kind: "StatefulSet",
Version: "v1",
}
Functions ¶
func GetConfigMap ¶
func GetConfigMapYaml ¶ added in v1.9.9
func GetConfigMapYamlFormat ¶ added in v1.9.9
func GetCronJob ¶ added in v1.9.9
func GetCronJobByNameWithCache ¶ added in v1.9.9
func GetCronJobByNameWithCache(cronJobName, namespace string, lister informers.SharedInformerFactory, versionLessThan121 bool) (*batchv1.CronJob, *batchv1beta1.CronJob, error)
func GetCronJobYaml ¶ added in v1.9.9
func GetCronJobYaml(ns, name string, cl client.Client, versionLessThan121 bool) ([]byte, bool, error)
GetCronJobYaml if k8s version higher than 1.21, only batch/v1 is supported, or we will fetch batch/v1beta1
func GetCronJobYamlFormat ¶ added in v1.9.9
func GetDaemonSet ¶ added in v1.9.9
func GetDaemonSetYaml ¶ added in v1.9.9
func GetDeployment ¶
func GetDeploymentByNameWithCache ¶ added in v1.9.9
func GetDeploymentByNameWithCache(name, namespace string, lister informers.SharedInformerFactory) (*appsv1.Deployment, error)
func GetDeploymentYaml ¶ added in v1.5.0
func GetDeploymentYamlFormat ¶ added in v1.9.9
func GetExtensionsV1Beta1Ingress ¶ added in v1.9.9
func GetExtensionsV1Beta1Ingress(namespace, name string, lister informers.SharedInformerFactory) (*extensionsv1beta1.Ingress, bool, error)
func GetIngressYaml ¶ added in v1.9.9
func GetIngressYamlFormat ¶ added in v1.9.9
func GetJobYaml ¶ added in v1.9.9
func GetNetworkingV1Ingress ¶ added in v1.9.9
func GetPVCYaml ¶ added in v1.9.9
func GetPVCYamlFormat ¶ added in v1.9.9
func GetResourceInCache ¶
GetResourceInCache gets a specific Kubernetes object in local cache, object can be any types which are registered by "scheme.AddToScheme()". Return true if object is found, false if not, or an error if something bad happened.
func GetResourceJSONInCache ¶
func GetResourceJSONInCache(ns, name string, gvk schema.GroupVersionKind, cl client.Reader) ([]byte, bool, error)
GetResourceJSONInCache gets a specific Kubernetes object in local cache, and return a representation in json format. Return true if object is found, false if not, or an error if something bad happened.
func GetResourceJSONInCacheFormat ¶ added in v1.9.9
func GetResourceYamlInCache ¶
func GetResourceYamlInCache(ns, name string, gvk schema.GroupVersionKind, cl client.Reader) ([]byte, bool, error)
GetResourceYamlInCache gets a specific Kubernetes object in local cache, and return a representation in yaml format. Return true if object is found, false if not, or an error if something bad happened.
func GetResourceYamlInCacheFormat ¶ added in v1.9.9
func GetSecretYaml ¶ added in v1.9.9
func GetSecretYamlFormat ¶ added in v1.9.9
func GetServiceByNameFromCache ¶ added in v1.9.9
func GetServiceYaml ¶ added in v1.9.9
func GetServiceYamlFormat ¶ added in v1.9.9
func GetStatefulSet ¶
func GetStatefulSetByNameWWithCache ¶ added in v1.9.9
func GetStatefulSetByNameWWithCache(name, namespace string, lister informers.SharedInformerFactory) (*appsv1.StatefulSet, error)
func GetStatefulSetYaml ¶ added in v1.5.0
func GetStatefulSetYamlFormat ¶ added in v1.9.9
func GetUnstructuredIngress ¶ added in v1.9.9
func GetUnstructuredIngress(namespace, name string, cl client.Client, clientset *kubernetes.Clientset) (*unstructured.Unstructured, bool, error)
func ListConfigMaps ¶
func ListConfigMapsYaml ¶
func ListCronJobs ¶ added in v1.9.9
func ListCronJobsV1 ¶ added in v1.9.9
func ListCronJobsV1Beta ¶ added in v1.9.9
func ListCronJobsWithCache ¶ added in v1.9.9
func ListCronJobsWithCache(selector labels.Selector, lister informers.SharedInformerFactory, versionLessThan121 bool) ([]*batchv1.CronJob, []*batchv1beta1.CronJob, error)
func ListCronJobsYaml ¶ added in v1.9.9
func ListDaemonsets ¶ added in v1.9.9
func ListDeployments ¶
func ListDeploymentsWithCache ¶ added in v1.9.9
func ListDeploymentsWithCache(selector labels.Selector, lister informers.SharedInformerFactory) ([]*appsv1.Deployment, error)
func ListDeploymentsYaml ¶
func ListEvents ¶
func ListExtensionsV1Beta1Ingresses ¶ added in v1.9.9
func ListExtensionsV1Beta1Ingresses(selector labels.Selector, lister informers.SharedInformerFactory) ([]*extensionsv1beta1.Ingress, error)
ListExtensionsV1Beta1Ingresses gets the ingress (extensions/v1beta1) from the informer
func ListIngresses ¶
func ListIngresses(namespace string, cl client.Client, lessThan122 bool) (*unstructured.UnstructuredList, error)
func ListIngressesYaml ¶
func ListNetworkingV1Ingress ¶ added in v1.9.9
func ListPodsWithCache ¶ added in v1.9.9
func ListReplicaSets ¶ added in v1.9.9
func ListResourceInCache ¶
func ListResourceInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, obj client.ObjectList, cl client.Reader) error
ListResourceInCache gets a set of specific Kubernetes object in local cache, object can be any types which are registered by "scheme.AddToScheme()". Important: fieldSelector must be nil or contain just one kv pair, otherwise, controller-runtime will return error.
func ListResourceJSONInCache ¶
func ListResourceJSONInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, gvk schema.GroupVersionKind, cl client.Reader) ([][]byte, error)
ListResourceJSONInCache gets a set of specific Kubernetes object in local cache, and return a representation in json format.
func ListResourceYamlInCache ¶
func ListResourceYamlInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, gvk schema.GroupVersionKind, cl client.Reader) ([][]byte, error)
ListResourceYamlInCache gets a set of specific Kubernetes object in local cache, and return a representation in yaml format.
func ListSecrets ¶ added in v1.9.9
func ListServices ¶
func ListServicesWithCache ¶ added in v1.9.9
func ListServicesYaml ¶
func ListStatefulSets ¶
func ListStatefulSetsWithCache ¶ added in v1.9.9
func ListStatefulSetsWithCache(selector labels.Selector, lister informers.SharedInformerFactory) ([]*appsv1.StatefulSet, error)
func ListStatefulSetsYaml ¶
func ListUnstructuredResourceInCache ¶
func ListUnstructuredResourceInCache(ns string, selector labels.Selector, fieldSelector fields.Selector, gvk schema.GroupVersionKind, cl client.Reader) ([]*unstructured.Unstructured, error)
ListUnstructuredResourceInCache gets a set of specific Kubernetes object in local cache, and return a representation in yaml format.
Types ¶
This section is empty.