Documentation ¶
Index ¶
- Variables
- func AsClusterRoleBinding(obj *unstructured.Unstructured) (*rbac.ClusterRoleBinding, error)
- func AsCustomResourceDefinition(obj *unstructured.Unstructured) (*apiextensions.CustomResourceDefinition, error)
- func AsCustomResourceDefinitionV1Beta1(obj *unstructured.Unstructured) (*apiextensionsv1beta1.CustomResourceDefinition, error)
- func AsDaemonSet(obj *unstructured.Unstructured) (*appsv1.DaemonSet, error)
- func AsDeployment(obj *unstructured.Unstructured) (*appsv1.Deployment, error)
- func AsIngress(obj *unstructured.Unstructured) (*networking.Ingress, error)
- func AsPodTemplate(obj *unstructured.Unstructured) (*v1.PodTemplateSpec, error)
- func AsRoleBinding(obj *unstructured.Unstructured) (*rbac.RoleBinding, error)
- func AsSecret(obj *unstructured.Unstructured) (*v1.Secret, error)
- func AsService(obj *unstructured.Unstructured) (*v1.Service, error)
- func AsStatefulSet(obj *unstructured.Unstructured) (*appsv1.StatefulSet, error)
- func CreateKubeConfig(clusterName string, ca certs.CertificateAuthority, endpoint string, ...) ([]byte, error)
- func CreateMultiKubeConfig(ca certs.CertificateAuthority, clusters map[string]string, group string, ...) ([]byte, error)
- func CreateOIDCKubeConfig(clusterName string, ca certs.CertificateAuthority, ...) ([]byte, error)
- func DefaultSubjects(subjects []rbac.Subject) []rbac.Subject
- func Defaults(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func DefaultsClusterRoleBinding(rb *rbac.ClusterRoleBinding) *rbac.ClusterRoleBinding
- func DefaultsContainer(container v1.Container) v1.Container
- func DefaultsContainers(containers []v1.Container) []v1.Container
- func DefaultsCustomResourceDefinition(crd *apiextensions.CustomResourceDefinition) *apiextensions.CustomResourceDefinition
- func DefaultsCustomResourceDefinitionV1Beta1(crd *apiextensionsv1beta1.CustomResourceDefinition) *apiextensionsv1beta1.CustomResourceDefinition
- func DefaultsDaemonSet(daemeonset *appsv1.DaemonSet) *appsv1.DaemonSet
- func DefaultsDeployment(deploy *appsv1.Deployment) *appsv1.Deployment
- func DefaultsPod(pod v1.PodTemplateSpec) v1.PodTemplateSpec
- func DefaultsProbe(probe *v1.Probe) *v1.Probe
- func DefaultsRoleBinding(rb *rbac.RoleBinding) *rbac.RoleBinding
- func DefaultsService(svc *v1.Service) *v1.Service
- func DefaultsStatefulSet(sts *appsv1.StatefulSet) *appsv1.StatefulSet
- func Diff(from, to *unstructured.Unstructured) string
- func GetContainerStatus(pod v1.Pod) string
- func GetCurrentClusterNameFrom(kubeConfigPath string) string
- func GetDNS1192Name(s string) string
- func GetLastRestartTime(pod v1.Pod) *time.Time
- func GetNodeStatus(node v1.Node) string
- func GetOwner(pod v1.Pod) string
- func GetPodStatus(pod v1.Pod) string
- func GetUnstructuredObjects(data []byte) ([]*unstructured.Unstructured, error)
- func GetUnstructuredObjectsFromJson(data []byte) ([]*unstructured.Unstructured, error)
- func GetValidName(name string) string
- func HasTaint(node v1.Node, name string) bool
- func IsAPIResourceMissing(err error) bool
- func IsAnyRoleBinding(obj *unstructured.Unstructured) bool
- func IsApp(obj *unstructured.Unstructured) bool
- func IsAppReady(item *unstructured.Unstructured) (bool, string)
- func IsBuilder(obj *unstructured.Unstructured) bool
- func IsBuilderReady(item *unstructured.Unstructured) (bool, string)
- func IsCanary(obj *unstructured.Unstructured) bool
- func IsClusterRole(obj *unstructured.Unstructured) bool
- func IsClusterRoleBinding(obj *unstructured.Unstructured) bool
- func IsConfigMap(obj *unstructured.Unstructured) bool
- func IsConstraintTemplate(obj *unstructured.Unstructured) bool
- func IsCronJob(obj *unstructured.Unstructured) bool
- func IsCustomResourceDefinition(obj *unstructured.Unstructured) bool
- func IsCustomResourceDefinitionV1Beta1(obj *unstructured.Unstructured) bool
- func IsDaemonSet(obj *unstructured.Unstructured) bool
- func IsDataContainerReady(item *unstructured.Unstructured) (bool, string)
- func IsDeleted(object metav1.Object) bool
- func IsDeployment(obj *unstructured.Unstructured) bool
- func IsDeploymentReady(d *appsv1.Deployment) (bool, string)
- func IsDiffable(obj *unstructured.Unstructured) bool
- func IsElasticReady(item *unstructured.Unstructured) (bool, string)
- func IsElasticsearch(obj *unstructured.Unstructured) bool
- func IsImage(obj *unstructured.Unstructured) bool
- func IsImageReady(item *unstructured.Unstructured) (bool, string)
- func IsIngress(obj *unstructured.Unstructured) bool
- func IsKafka(obj *unstructured.Unstructured) bool
- func IsKibana(obj *unstructured.Unstructured) bool
- func IsKustomized(to *unstructured.Unstructured) bool
- func IsMasterNode(node v1.Node) bool
- func IsMongoDB(obj *unstructured.Unstructured) bool
- func IsNil(object runtime.Object) bool
- func IsNode(obj *unstructured.Unstructured) bool
- func IsNodeReady(item *unstructured.Unstructured) (bool, string)
- func IsPVC(obj *unstructured.Unstructured) bool
- func IsPod(obj *unstructured.Unstructured) bool
- func IsPodCrashLoopBackoff(pod v1.Pod) bool
- func IsPodDaemonSet(pod v1.Pod) bool
- func IsPodFinished(pod v1.Pod) bool
- func IsPodHealthy(pod v1.Pod) bool
- func IsPodPending(pod v1.Pod) bool
- func IsPodReady(pod v1.Pod) bool
- func IsPodReadyAndRunning(item *unstructured.Unstructured) (bool, string)
- func IsPostgresql(obj *unstructured.Unstructured) bool
- func IsPostgresqlDB(obj *unstructured.Unstructured) bool
- func IsRedisFailover(obj *unstructured.Unstructured) bool
- func IsRole(obj *unstructured.Unstructured) bool
- func IsRoleBinding(obj *unstructured.Unstructured) bool
- func IsSecret(obj *unstructured.Unstructured) bool
- func IsService(obj *unstructured.Unstructured) bool
- func IsServiceAccount(obj *unstructured.Unstructured) bool
- func IsServiceReady(item *unstructured.Unstructured, client *Client) (bool, string)
- func IsStatefulSet(obj *unstructured.Unstructured) bool
- func IsStatefulSetReady(sts *appsv1.StatefulSet) (bool, string)
- func IsStaticPod(pod v1.Pod) bool
- func LowResourceRequirements() v1.ResourceRequirements
- func NewCommandJob(node, command string) v1.PodSpec
- func NewDeployment(ns, name, image string, labels map[string]string, port int32, args ...string) *apps.Deployment
- func NewObjectMeta(ns, name string) metav1.ObjectMeta
- func RemoveTaint(taints []v1.Taint, name string) []v1.Taint
- func RequiresReplacement(obj *unstructured.Unstructured, err error) bool
- func Sanitize(objects ...*unstructured.Unstructured)
- func SetAnnotation(obj *unstructured.Unstructured, key string, value string)
- func StripIdentifiers(object *unstructured.Unstructured) *unstructured.Unstructured
- func TestDaemonSet(client kubernetes.Interface, ns string, name string, t *console.TestResults)
- func TestDeploy(client kubernetes.Interface, ns string, deploymentName string, ...)
- func TestNamespace(client kubernetes.Interface, ns string, t *console.TestResults)
- func TestPod(testName string, client kubernetes.Interface, events typedv1.EventInterface, ...) error
- func TestPodsByLabels(client kubernetes.Interface, testName string, ns string, ...)
- func TestStatefulSet(client kubernetes.Interface, ns string, name string, t *console.TestResults)
- func ToJson(to *unstructured.Unstructured) string
- func ToUnstructured(unstructuredObj *unstructured.Unstructured, obj interface{}) (*unstructured.Unstructured, error)
- func ToYaml(to *unstructured.Unstructured) string
- func Unwrap(list []*unstructured.Unstructured) ([]*unstructured.Unstructured, error)
- func UnwrapError(err error) string
- func Validate(object runtime.Object) error
- type ApplyHook
- type Builder
- func (b *Builder) AddAnnotations(annotations map[string]string) *Builder
- func (b *Builder) AddLabels(labels map[string]string) *Builder
- func (b *Builder) Append(objects ...runtime.Object) *Builder
- func (b *Builder) ConfigMap(name string, data map[string]string) *Builder
- func (b *Builder) Deployment(name, image string) *DeploymentBuilder
- func (b *Builder) ObjectMeta(name string) metav1.ObjectMeta
- func (b *Builder) Secret(name string, data map[string][]byte) *Builder
- func (b *Builder) ServiceAccount(name string) *ServiceAccountBuilder
- func (b *Builder) SetNamespace(namespace string) *Builder
- type CRD
- type Client
- func (c *Client) Annotate(obj runtime.Object, annotations map[string]string) error
- func (c *Client) Apply(namespace string, objects ...runtime.Object) error
- func (c *Client) ApplyText(namespace string, specs ...string) error
- func (c *Client) ApplyUnstructured(namespace string, objects ...*unstructured.Unstructured) error
- func (c *Client) Cordon(nodeName string) error
- func (c *Client) CreateOrUpdateConfigMap(name, ns string, data map[string]string) error
- func (c *Client) CreateOrUpdateNamespace(name string, labels, annotations map[string]string) error
- func (c *Client) CreateOrUpdateSecret(name, ns string, data map[string][]byte) error
- func (c *Client) DeleteByKind(kind, namespace, name string) error
- func (c *Client) DeleteUnstructured(namespace string, objects ...*unstructured.Unstructured) error
- func (c *Client) Drain(nodeName string, timeout time.Duration) error
- func (c *Client) EvictNode(nodeName string) error
- func (c *Client) EvictPod(pod v1.Pod) error
- func (c *Client) ExecutePodf(namespace, pod, container string, command ...string) (string, string, error)
- func (c *Client) Executef(node string, timeout time.Duration, command string, args ...interface{}) (string, error)
- func (c *Client) ExposeIngress(namespace, service string, domain string, port int, ...) error
- func (c *Client) ForceDeleteNamespace(ns string, timeout time.Duration) error
- func (c *Client) Get(namespace string, name string, obj runtime.Object) error
- func (c *Client) GetAPIResource(name string) (*metav1.APIResource, error)
- func (c *Client) GetByKind(kind, namespace, name string) (*unstructured.Unstructured, error)
- func (c *Client) GetClientByKind(kind string) (dynamic.NamespaceableResourceInterface, error)
- func (c *Client) GetClientset() (*kubernetes.Clientset, error)
- func (c *Client) GetConditions(item *unstructured.Unstructured) (kommonsv1.ConditionList, error)
- func (c *Client) GetConditionsForNode(name string) (map[v1.NodeConditionType]v1.ConditionStatus, error)
- func (c *Client) GetConfigMap(namespace, name string) *map[string]string
- func (c *Client) GetConfigMapV2(ctx context.Context, namespace, name string) (*map[string]string, error)
- func (c *Client) GetDynamicClient() (dynamic.Interface, error)
- func (c *Client) GetDynamicClientFor(namespace string, obj runtime.Object) (dynamic.ResourceInterface, *schema.GroupVersionResource, ...)
- func (c *Client) GetDynamicClientForUser(namespace string, obj runtime.Object, user string) (dynamic.ResourceInterface, *schema.GroupVersionResource, ...)
- func (c *Client) GetEnvValue(input EnvVar, namespace string) (string, string, error)
- func (c *Client) GetEnvValueFromCache(input EnvVar, namespace string, expiry time.Duration) (string, string, error)
- func (c *Client) GetEventsFor(kind string, object metav1.Object) ([]v1.Event, error)
- func (c *Client) GetFirstPodByLabelSelector(namespace string, labelSelector string) (*v1.Pod, error)
- func (c *Client) GetHealth() Health
- func (c *Client) GetJobPod(namespace, jobName string) (string, error)
- func (c *Client) GetKustomize() (*kustomize.Manager, error)
- func (c *Client) GetMasterNode() (string, error)
- func (c *Client) GetMasterNodes() ([]string, error)
- func (c *Client) GetOrCreatePVC(namespace, name, size, class string) error
- func (c *Client) GetOrCreateSecret(name, ns string, data map[string][]byte) error
- func (c *Client) GetPodLogs(namespace, podName, container string) (string, error)
- func (c *Client) GetPodReplicas(pod v1.Pod) (int, error)
- func (c *Client) GetProxyDialer(p proxy.Proxy) (*proxy.Dialer, error)
- func (c *Client) GetRESTConfigFromKubeconfig() (*rest.Config, error)
- func (c *Client) GetRESTConfigInCluster() (*rest.Config, error)
- func (c *Client) GetRestClient(obj unstructured.Unstructured) (*cliresource.Helper, error)
- func (c *Client) GetRestMapper() (meta.RESTMapper, error)
- func (c *Client) GetSecret(namespace, name string) *map[string][]byte
- func (c *Client) GetSecretV2(ctx context.Context, namespace, name string) (*map[string][]byte, error)
- func (c *Client) HasChanges(from, to *unstructured.Unstructured) bool
- func (c *Client) HasConfigMap(ns, name string) bool
- func (c *Client) HasSecret(ns, name string) bool
- func (c *Client) IsCRDReady(group, name string) (bool, string)
- func (c *Client) IsConditionReadyTrue(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsConstraintTemplateReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsCoreType(object *unstructured.Unstructured) bool
- func (c *Client) IsElasticsearchReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsKibanaReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsMongoDBReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsNamespaceReady(ns string) (bool, string)
- func (c *Client) IsPostgresqlDBReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsPostgresqlReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsReadyWithConditions(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsRedisFailoverReady(item *unstructured.Unstructured) (bool, string)
- func (c *Client) IsTrivialType(item *unstructured.Unstructured) bool
- func (c *Client) Label(obj runtime.Object, labels map[string]string) error
- func (c *Client) PingMaster() bool
- func (c *Client) Refresh(item *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (c *Client) RemoveVolumeAttachment(va storagev1.VolumeAttachment) error
- func (c *Client) ResetConnection()
- func (c *Client) ResetRestMapper() error
- func (c *Client) ScalePod(pod v1.Pod, replicas int32) error
- func (c *Client) SetCondition(item *unstructured.Unstructured, kind, status string) error
- func (c *Client) StreamLogs(namespace, name string) error
- func (c *Client) StreamLogsV2(namespace, name string, timeout time.Duration, containerNames ...string) error
- func (c *Client) TriggerCronJobManually(namespace, cronJobName string) (string, error)
- func (c *Client) Uncordon(nodeName string) error
- func (c *Client) Update(namespace string, item runtime.Object) error
- func (c *Client) WaitFor(obj runtime.Object, timeout time.Duration) (*unstructured.Unstructured, error)
- func (c *Client) WaitForAPIResource(group, name string, timeout time.Duration) error
- func (c *Client) WaitForCRD(kind, namespace, name string, timeout time.Duration, waitFN WaitFN) (*unstructured.Unstructured, error)
- func (c *Client) WaitForContainerStart(ns, name string, timeout time.Duration, containerNames ...string) error
- func (c *Client) WaitForDaemonSet(ns, name string, timeout time.Duration) error
- func (c *Client) WaitForDeployment(ns, name string, timeout time.Duration) error
- func (c *Client) WaitForJob(ns, name string, timeout time.Duration) error
- func (c *Client) WaitForNamespace(ns string, timeout time.Duration) error
- func (c *Client) WaitForNode(name string, timeout time.Duration, condition v1.NodeConditionType, ...) (map[v1.NodeConditionType]v1.ConditionStatus, error)
- func (c *Client) WaitForPod(ns, name string, timeout time.Duration, phases ...v1.PodPhase) error
- func (c *Client) WaitForPodByLabel(ns, label string, timeout time.Duration, phases ...v1.PodPhase) (*v1.Pod, error)
- func (c *Client) WaitForPodCommand(ns, name string, container string, timeout time.Duration, command ...string) error
- func (c *Client) WaitForResource(kind, namespace, name string, timeout time.Duration) (*unstructured.Unstructured, error)
- func (c *Client) WaitForRestMapping(obj runtime.Object, timeout time.Duration) (*meta.RESTMapping, error)
- func (c *Client) WaitForStatefulSet(ns, name string, timeout time.Duration) error
- func (c *Client) WaitForTaintRemoval(name string, timeout time.Duration, taintKey string) error
- type ConfigMapKeySelector
- type DeploymentBuilder
- func (d *DeploymentBuilder) Annotations(annotations map[string]string) *DeploymentBuilder
- func (d *DeploymentBuilder) Args(args ...string) *DeploymentBuilder
- func (d *DeploymentBuilder) AsCronJob(schedule string) *batchv1beta1.CronJob
- func (d *DeploymentBuilder) AsOneShotJob() *batchv1.Job
- func (d *DeploymentBuilder) AsOneShotPod() *v1.Pod
- func (d *DeploymentBuilder) Build() *Builder
- func (d *DeploymentBuilder) Command(cmd ...string) *DeploymentBuilder
- func (d *DeploymentBuilder) EnvFromConfigMap(name string) *DeploymentBuilder
- func (d *DeploymentBuilder) EnvFromSecret(name string) *DeploymentBuilder
- func (d *DeploymentBuilder) EnvVarFromConfigMap(env, configmap, key string) *DeploymentBuilder
- func (d *DeploymentBuilder) EnvVarFromField(env, field string) *DeploymentBuilder
- func (d *DeploymentBuilder) EnvVarFromSecret(env, secret, key string) *DeploymentBuilder
- func (d *DeploymentBuilder) EnvVars(env map[string]string) *DeploymentBuilder
- func (d *DeploymentBuilder) Expose(ports ...int32) *DeploymentBuilder
- func (d *DeploymentBuilder) GetLabels() map[string]string
- func (d *DeploymentBuilder) Labels(labels map[string]string) *DeploymentBuilder
- func (d *DeploymentBuilder) MountConfigMap(cm, path string) *DeploymentBuilder
- func (d *DeploymentBuilder) MountSecret(secret, path string, mode int32) *DeploymentBuilder
- func (d *DeploymentBuilder) NodeAffinity(nodeReadinessLabel map[string]string) *DeploymentBuilder
- func (d *DeploymentBuilder) ObjectMeta() metav1.ObjectMeta
- func (d *DeploymentBuilder) PodAffinity(labels map[string]string, topologyKey string) *DeploymentBuilder
- func (d *DeploymentBuilder) PodSpec() v1.PodSpec
- func (d *DeploymentBuilder) PodTemplate() v1.PodTemplateSpec
- func (d *DeploymentBuilder) Ports(ports ...int32) *DeploymentBuilder
- func (d *DeploymentBuilder) Replicas(replicas int) *DeploymentBuilder
- func (d *DeploymentBuilder) Resources(resources v1.ResourceRequirements) *DeploymentBuilder
- func (d *DeploymentBuilder) ServiceAccount(name string) *DeploymentBuilder
- type DynamicKind
- type EnvVar
- type EnvVarSource
- type Health
- type IsType
- type Kindable
- type LocalObjectReference
- type Metadata
- type Name
- type Nameable
- type RuntimeObjectWithMetadata
- type SecretKeySelector
- type ServiceAccountBuilder
- type Spec
- type Specs
- type WaitFN
- type WebhookBuilder
- func (b WebhookBuilder) Add() *WebhookConfigBuilder
- func (b WebhookBuilder) Fail() WebhookBuilder
- func (b WebhookBuilder) Match(groups, versions, resources []string) WebhookBuilder
- func (b WebhookBuilder) MatchAny() WebhookBuilder
- func (b WebhookBuilder) MatchKinds(resources ...string) WebhookBuilder
- func (b WebhookBuilder) TimeoutSeconds(timeout int32) WebhookBuilder
- func (b WebhookBuilder) WithNamespaceLabel(label string, values ...string) WebhookBuilder
- func (b WebhookBuilder) WithoutNamespaceLabel(label string, values ...string) WebhookBuilder
- type WebhookConfigBuilder
Constants ¶
This section is empty.
Variables ¶
var CoreAPIGroups = []string{
"admissionregistration.k8s.io",
"apiextensions.k8s.io",
"apiregistration.k8s.io",
"apps",
"authentication.k8s.io",
"authorization.k8s.io",
"autoscaling",
"batch",
"certificates.k8s.io",
"coordination.k8s.io",
"discovery.k8s.io",
"events.k8s.io",
"extensions",
"flowcontrol.apiserver.k8s.io",
"networking.k8s.io",
"node.k8s.io",
"policy",
"rbac.authorization.k8s.io",
"scheduling.k8s.io",
"storage.k8s.io",
}
var KustomizedLabel = "kustomize/patched"
var ( TrivialTypes = map[string]IsType{ "Canary": IsCanary, "ClusterRole": IsClusterRole, "ClusterRoleBinding": IsClusterRoleBinding, "ConfigMap": IsConfigMap, "CronJob": IsCronJob, "Ingress": IsIngress, "PersistentVolumeClaim": IsPVC, "Role": IsRole, "RoleBinding": IsRoleBinding, "Secret": IsSecret, } )
Functions ¶
func AsClusterRoleBinding ¶
func AsClusterRoleBinding(obj *unstructured.Unstructured) (*rbac.ClusterRoleBinding, error)
func AsCustomResourceDefinition ¶
func AsCustomResourceDefinition(obj *unstructured.Unstructured) (*apiextensions.CustomResourceDefinition, error)
func AsCustomResourceDefinitionV1Beta1 ¶
func AsCustomResourceDefinitionV1Beta1(obj *unstructured.Unstructured) (*apiextensionsv1beta1.CustomResourceDefinition, error)
func AsDaemonSet ¶
func AsDaemonSet(obj *unstructured.Unstructured) (*appsv1.DaemonSet, error)
func AsDeployment ¶
func AsDeployment(obj *unstructured.Unstructured) (*appsv1.Deployment, error)
func AsIngress ¶
func AsIngress(obj *unstructured.Unstructured) (*networking.Ingress, error)
func AsPodTemplate ¶
func AsPodTemplate(obj *unstructured.Unstructured) (*v1.PodTemplateSpec, error)
func AsRoleBinding ¶
func AsRoleBinding(obj *unstructured.Unstructured) (*rbac.RoleBinding, error)
func AsSecret ¶
func AsSecret(obj *unstructured.Unstructured) (*v1.Secret, error)
func AsService ¶
func AsService(obj *unstructured.Unstructured) (*v1.Service, error)
func AsStatefulSet ¶
func AsStatefulSet(obj *unstructured.Unstructured) (*appsv1.StatefulSet, error)
func CreateKubeConfig ¶
func CreateMultiKubeConfig ¶
func CreateMultiKubeConfig(ca certs.CertificateAuthority, clusters map[string]string, group string, user string, expiry time.Duration) ([]byte, error)
CreateMultiKubeConfig creates a kubeconfig file contents for a map of cluster name -> cluster API endpoint hosts, all with a shared user name, group and cert expiry. NOTE: these clusters all need to share the same plaform CA
func CreateOIDCKubeConfig ¶
func Defaults ¶
func Defaults(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
func DefaultsClusterRoleBinding ¶
func DefaultsClusterRoleBinding(rb *rbac.ClusterRoleBinding) *rbac.ClusterRoleBinding
func DefaultsCustomResourceDefinition ¶
func DefaultsCustomResourceDefinition(crd *apiextensions.CustomResourceDefinition) *apiextensions.CustomResourceDefinition
func DefaultsCustomResourceDefinitionV1Beta1 ¶
func DefaultsCustomResourceDefinitionV1Beta1(crd *apiextensionsv1beta1.CustomResourceDefinition) *apiextensionsv1beta1.CustomResourceDefinition
func DefaultsDeployment ¶
func DefaultsDeployment(deploy *appsv1.Deployment) *appsv1.Deployment
func DefaultsPod ¶
func DefaultsPod(pod v1.PodTemplateSpec) v1.PodTemplateSpec
func DefaultsRoleBinding ¶
func DefaultsRoleBinding(rb *rbac.RoleBinding) *rbac.RoleBinding
func DefaultsStatefulSet ¶
func DefaultsStatefulSet(sts *appsv1.StatefulSet) *appsv1.StatefulSet
func Diff ¶
func Diff(from, to *unstructured.Unstructured) string
func GetContainerStatus ¶
func GetCurrentClusterNameFrom ¶
GetCurrentClusterNameFrom returns the name of the cluster associated with the currentContext of the specified kubeconfig file
func GetDNS1192Name ¶ added in v0.21.0
GetDNS1192Name trasforms a name into a DNS-1192 compliant name
func GetNodeStatus ¶
func GetPodStatus ¶
func GetUnstructuredObjects ¶
func GetUnstructuredObjects(data []byte) ([]*unstructured.Unstructured, error)
func GetUnstructuredObjectsFromJson ¶ added in v0.20.1
func GetUnstructuredObjectsFromJson(data []byte) ([]*unstructured.Unstructured, error)
func GetValidName ¶
func IsAPIResourceMissing ¶ added in v0.4.9
func IsAnyRoleBinding ¶
func IsAnyRoleBinding(obj *unstructured.Unstructured) bool
func IsApp ¶
func IsApp(obj *unstructured.Unstructured) bool
IsApp returns true if the obj is a Deployment, Statetefulset or DaemonSet
func IsAppReady ¶
func IsAppReady(item *unstructured.Unstructured) (bool, string)
func IsBuilder ¶ added in v0.12.0
func IsBuilder(obj *unstructured.Unstructured) bool
func IsBuilderReady ¶ added in v0.12.0
func IsBuilderReady(item *unstructured.Unstructured) (bool, string)
func IsCanary ¶ added in v0.7.2
func IsCanary(obj *unstructured.Unstructured) bool
func IsClusterRole ¶
func IsClusterRole(obj *unstructured.Unstructured) bool
func IsClusterRoleBinding ¶
func IsClusterRoleBinding(obj *unstructured.Unstructured) bool
func IsConfigMap ¶
func IsConfigMap(obj *unstructured.Unstructured) bool
func IsConstraintTemplate ¶
func IsConstraintTemplate(obj *unstructured.Unstructured) bool
func IsCronJob ¶ added in v0.7.2
func IsCronJob(obj *unstructured.Unstructured) bool
func IsCustomResourceDefinition ¶
func IsCustomResourceDefinition(obj *unstructured.Unstructured) bool
func IsCustomResourceDefinitionV1Beta1 ¶
func IsCustomResourceDefinitionV1Beta1(obj *unstructured.Unstructured) bool
func IsDaemonSet ¶
func IsDaemonSet(obj *unstructured.Unstructured) bool
func IsDataContainerReady ¶ added in v0.14.0
func IsDataContainerReady(item *unstructured.Unstructured) (bool, string)
func IsDeployment ¶
func IsDeployment(obj *unstructured.Unstructured) bool
func IsDeploymentReady ¶ added in v0.7.2
func IsDeploymentReady(d *appsv1.Deployment) (bool, string)
func IsDiffable ¶
func IsDiffable(obj *unstructured.Unstructured) bool
func IsElasticReady ¶
func IsElasticReady(item *unstructured.Unstructured) (bool, string)
func IsElasticsearch ¶ added in v0.7.2
func IsElasticsearch(obj *unstructured.Unstructured) bool
func IsImage ¶ added in v0.12.0
func IsImage(obj *unstructured.Unstructured) bool
func IsImageReady ¶ added in v0.12.0
func IsImageReady(item *unstructured.Unstructured) (bool, string)
func IsIngress ¶
func IsIngress(obj *unstructured.Unstructured) bool
func IsKafka ¶ added in v0.14.0
func IsKafka(obj *unstructured.Unstructured) bool
func IsKibana ¶ added in v0.7.2
func IsKibana(obj *unstructured.Unstructured) bool
func IsKustomized ¶
func IsKustomized(to *unstructured.Unstructured) bool
func IsMasterNode ¶
func IsMongoDB ¶ added in v0.8.0
func IsMongoDB(obj *unstructured.Unstructured) bool
func IsNode ¶ added in v0.27.0
func IsNode(obj *unstructured.Unstructured) bool
func IsNodeReady ¶ added in v0.27.0
func IsNodeReady(item *unstructured.Unstructured) (bool, string)
func IsPVC ¶
func IsPVC(obj *unstructured.Unstructured) bool
func IsPod ¶ added in v0.30.2
func IsPod(obj *unstructured.Unstructured) bool
func IsPodCrashLoopBackoff ¶
func IsPodDaemonSet ¶
func IsPodFinished ¶
func IsPodHealthy ¶
func IsPodPending ¶
func IsPodReady ¶
func IsPodReadyAndRunning ¶ added in v0.30.2
func IsPodReadyAndRunning(item *unstructured.Unstructured) (bool, string)
func IsPostgresql ¶ added in v0.7.2
func IsPostgresql(obj *unstructured.Unstructured) bool
func IsPostgresqlDB ¶ added in v0.11.2
func IsPostgresqlDB(obj *unstructured.Unstructured) bool
func IsRedisFailover ¶ added in v0.7.2
func IsRedisFailover(obj *unstructured.Unstructured) bool
func IsRole ¶
func IsRole(obj *unstructured.Unstructured) bool
func IsRoleBinding ¶
func IsRoleBinding(obj *unstructured.Unstructured) bool
func IsSecret ¶
func IsSecret(obj *unstructured.Unstructured) bool
func IsService ¶
func IsService(obj *unstructured.Unstructured) bool
func IsServiceAccount ¶
func IsServiceAccount(obj *unstructured.Unstructured) bool
func IsServiceReady ¶ added in v0.14.0
func IsServiceReady(item *unstructured.Unstructured, client *Client) (bool, string)
func IsStatefulSet ¶
func IsStatefulSet(obj *unstructured.Unstructured) bool
func IsStatefulSetReady ¶ added in v0.7.2
func IsStatefulSetReady(sts *appsv1.StatefulSet) (bool, string)
func IsStaticPod ¶
IsStaticPod returns true if the pod is static i.e. declared in /etc/kubernetes/manifests and read directly by the kubelet
func LowResourceRequirements ¶
func LowResourceRequirements() v1.ResourceRequirements
func NewCommandJob ¶
func NewDeployment ¶
func NewObjectMeta ¶
func NewObjectMeta(ns, name string) metav1.ObjectMeta
func RequiresReplacement ¶
func RequiresReplacement(obj *unstructured.Unstructured, err error) bool
func Sanitize ¶
func Sanitize(objects ...*unstructured.Unstructured)
Sanitize will remove "runtime" fields from objects that woulds otherwise increase the verbosity of diffs
func SetAnnotation ¶
func SetAnnotation(obj *unstructured.Unstructured, key string, value string)
func StripIdentifiers ¶
func StripIdentifiers(object *unstructured.Unstructured) *unstructured.Unstructured
func TestDaemonSet ¶
func TestDaemonSet(client kubernetes.Interface, ns string, name string, t *console.TestResults)
func TestDeploy ¶
func TestDeploy(client kubernetes.Interface, ns string, deploymentName string, t *console.TestResults)
func TestNamespace ¶
func TestNamespace(client kubernetes.Interface, ns string, t *console.TestResults)
func TestPod ¶
func TestPod(testName string, client kubernetes.Interface, events typedv1.EventInterface, pod v1.Pod) error
func TestPodsByLabels ¶
func TestPodsByLabels(client kubernetes.Interface, testName string, ns string, labelMap map[string]string, t *console.TestResults)
func TestStatefulSet ¶ added in v0.30.0
func TestStatefulSet(client kubernetes.Interface, ns string, name string, t *console.TestResults)
func ToJson ¶
func ToJson(to *unstructured.Unstructured) string
func ToUnstructured ¶
func ToUnstructured(unstructuredObj *unstructured.Unstructured, obj interface{}) (*unstructured.Unstructured, error)
func ToYaml ¶
func ToYaml(to *unstructured.Unstructured) string
func Unwrap ¶
func Unwrap(list []*unstructured.Unstructured) ([]*unstructured.Unstructured, error)
func UnwrapError ¶ added in v0.4.9
Types ¶
type ApplyHook ¶
type ApplyHook func(namespace string, obj unstructured.Unstructured)
type Builder ¶
type Builder struct { Objects []runtime.Object Namespace string Labels map[string]string Annotations map[string]string }
func (*Builder) AddAnnotations ¶
func (*Builder) Deployment ¶
func (b *Builder) Deployment(name, image string) *DeploymentBuilder
func (*Builder) ObjectMeta ¶
func (b *Builder) ObjectMeta(name string) metav1.ObjectMeta
func (*Builder) ServiceAccount ¶
func (b *Builder) ServiceAccount(name string) *ServiceAccountBuilder
func (*Builder) SetNamespace ¶
type Client ¶
type Client struct { logger.Logger GetKubeConfigBytes func() ([]byte, error) GetRESTConfig func() (*rest.Config, error) GetKustomizePatches func() ([]string, error) ApplyDryRun bool ApplyHook ApplyHook ImmutableAnnotations []string Trace bool // contains filtered or unexported fields }
func NewClientFromBytes ¶
func (*Client) ApplyUnstructured ¶
func (c *Client) ApplyUnstructured(namespace string, objects ...*unstructured.Unstructured) error
func (*Client) CreateOrUpdateConfigMap ¶
func (*Client) CreateOrUpdateNamespace ¶
func (*Client) CreateOrUpdateSecret ¶
func (*Client) DeleteByKind ¶
func (*Client) DeleteUnstructured ¶
func (c *Client) DeleteUnstructured(namespace string, objects ...*unstructured.Unstructured) error
func (*Client) ExecutePodf ¶
func (c *Client) ExecutePodf(namespace, pod, container string, command ...string) (string, string, error)
ExecutePodf runs the specified shell command inside a container of the specified pod
func (*Client) Executef ¶
func (c *Client) Executef(node string, timeout time.Duration, command string, args ...interface{}) (string, error)
Executef runs the specified shell command on a node by creating a pre-scheduled pod that runs in the host namespace
func (*Client) ExposeIngress ¶
func (*Client) ForceDeleteNamespace ¶
ForceDeleteNamespace deletes a namespace forcibly by overriding it's finalizers first
func (*Client) GetAPIResource ¶
func (c *Client) GetAPIResource(name string) (*metav1.APIResource, error)
func (*Client) GetByKind ¶
func (c *Client) GetByKind(kind, namespace, name string) (*unstructured.Unstructured, error)
func (*Client) GetClientByKind ¶
func (c *Client) GetClientByKind(kind string) (dynamic.NamespaceableResourceInterface, error)
func (*Client) GetClientset ¶
func (c *Client) GetClientset() (*kubernetes.Clientset, error)
GetClientset creates a new k8s client
func (*Client) GetConditions ¶
func (c *Client) GetConditions(item *unstructured.Unstructured) (kommonsv1.ConditionList, error)
func (*Client) GetConditionsForNode ¶
func (c *Client) GetConditionsForNode(name string) (map[v1.NodeConditionType]v1.ConditionStatus, error)
func (*Client) GetConfigMap ¶
GetConfigMap returns the data of a secret or nil for any error
func (*Client) GetConfigMapV2 ¶ added in v0.29.0
func (c *Client) GetConfigMapV2(ctx context.Context, namespace, name string) (*map[string]string, error)
GetConfigMap returns the data of a secret or nil for any error
func (*Client) GetDynamicClient ¶
GetDynamicClient creates a new k8s client
func (*Client) GetDynamicClientFor ¶
func (c *Client) GetDynamicClientFor(namespace string, obj runtime.Object) (dynamic.ResourceInterface, *schema.GroupVersionResource, *unstructured.Unstructured, error)
func (*Client) GetDynamicClientForUser ¶
func (c *Client) GetDynamicClientForUser(namespace string, obj runtime.Object, user string) (dynamic.ResourceInterface, *schema.GroupVersionResource, *unstructured.Unstructured, error)
func (*Client) GetEnvValue ¶ added in v0.7.0
func (*Client) GetEnvValueFromCache ¶ added in v0.29.0
func (*Client) GetEventsFor ¶
func (*Client) GetFirstPodByLabelSelector ¶
func (c *Client) GetFirstPodByLabelSelector(namespace string, labelSelector string) (*v1.Pod, error)
Returns the first pod found by label
func (*Client) GetMasterNode ¶
GetMasterNode returns the name of the first node found labelled as a master
func (*Client) GetMasterNodes ¶
GetMasterNode returns a list of all master nodes
func (*Client) GetOrCreatePVC ¶
func (*Client) GetOrCreateSecret ¶
func (*Client) GetPodLogs ¶ added in v0.10.0
func (*Client) GetProxyDialer ¶
func (*Client) GetRESTConfigFromKubeconfig ¶
func (*Client) GetRESTConfigInCluster ¶
func (*Client) GetRestClient ¶
func (c *Client) GetRestClient(obj unstructured.Unstructured) (*cliresource.Helper, error)
func (*Client) GetRestMapper ¶
func (c *Client) GetRestMapper() (meta.RESTMapper, error)
func (*Client) GetSecretV2 ¶ added in v0.29.0
func (c *Client) GetSecretV2(ctx context.Context, namespace, name string) (*map[string][]byte, error)
GetSecret returns the data of a secret or nil for any error
func (*Client) HasChanges ¶
func (c *Client) HasChanges(from, to *unstructured.Unstructured) bool
func (*Client) HasConfigMap ¶
func (*Client) IsConditionReadyTrue ¶ added in v0.14.0
func (c *Client) IsConditionReadyTrue(item *unstructured.Unstructured) (bool, string)
func (*Client) IsConstraintTemplateReady ¶
func (c *Client) IsConstraintTemplateReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsCoreType ¶ added in v0.18.0
func (c *Client) IsCoreType(object *unstructured.Unstructured) bool
func (*Client) IsElasticsearchReady ¶ added in v0.7.2
func (c *Client) IsElasticsearchReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsKibanaReady ¶ added in v0.7.2
func (c *Client) IsKibanaReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsMongoDBReady ¶ added in v0.8.0
func (c *Client) IsMongoDBReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsPostgresqlDBReady ¶ added in v0.11.2
func (c *Client) IsPostgresqlDBReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsPostgresqlReady ¶ added in v0.7.2
func (c *Client) IsPostgresqlReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsReady ¶
func (c *Client) IsReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsReadyWithConditions ¶ added in v0.8.1
func (c *Client) IsReadyWithConditions(item *unstructured.Unstructured) (bool, string)
func (*Client) IsRedisFailoverReady ¶ added in v0.7.2
func (c *Client) IsRedisFailoverReady(item *unstructured.Unstructured) (bool, string)
func (*Client) IsTrivialType ¶
func (c *Client) IsTrivialType(item *unstructured.Unstructured) bool
func (*Client) PingMaster ¶
PingMaster attempts to connect to the API server and list nodes and services to ensure the API server is ready to accept any traffic
func (*Client) Refresh ¶
func (c *Client) Refresh(item *unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Client) RemoveVolumeAttachment ¶
func (c *Client) RemoveVolumeAttachment(va storagev1.VolumeAttachment) error
Remove volume attachment
func (*Client) ResetConnection ¶
func (c *Client) ResetConnection()
func (*Client) ResetRestMapper ¶ added in v0.15.0
Remove the reference to the existing RestMapper, forcing a recreation next time GetRestMapper is called Use when it is known that the existing discovery cache is stale to avoid having to wait for the 10 minute timeout
func (*Client) SetCondition ¶
func (c *Client) SetCondition(item *unstructured.Unstructured, kind, status string) error
func (*Client) StreamLogs ¶
func (*Client) StreamLogsV2 ¶ added in v0.25.0
func (*Client) TriggerCronJobManually ¶ added in v0.11.0
TriggerCronJobManually creates a Job from the cronJobName passed to the function and return the created job's name
func (*Client) WaitFor ¶
func (c *Client) WaitFor(obj runtime.Object, timeout time.Duration) (*unstructured.Unstructured, error)
func (*Client) WaitForAPIResource ¶
func (*Client) WaitForCRD ¶
func (c *Client) WaitForCRD(kind, namespace, name string, timeout time.Duration, waitFN WaitFN) (*unstructured.Unstructured, error)
func (*Client) WaitForContainerStart ¶ added in v0.25.0
func (c *Client) WaitForContainerStart(ns, name string, timeout time.Duration, containerNames ...string) error
WaitForContainerStart waits for the specified containers to be started (or any container if no names are specified) - returns an error if the timeout is exceeded
func (*Client) WaitForDaemonSet ¶
WaitForDaemonSet waits for a statefulset to have at least 1 ready replica, or returns an error if the timeout is exceeded
func (*Client) WaitForDeployment ¶
WaitForDeployment waits for a deployment to have at least 1 ready replica, or returns an error if the timeout is exceeded
func (*Client) WaitForJob ¶ added in v0.11.0
WaitForJob waits for a job to finish (the condition type "Complete" has status of "True"), or returns an error if the timeout is exceeded
func (*Client) WaitForNamespace ¶
func (*Client) WaitForNode ¶
func (c *Client) WaitForNode(name string, timeout time.Duration, condition v1.NodeConditionType, statii ...v1.ConditionStatus) (map[v1.NodeConditionType]v1.ConditionStatus, error)
WaitForNode waits for a pod to be in the specified phase, or returns an error if the timeout is exceeded
func (*Client) WaitForPod ¶
WaitForPod waits for a pod to be in the specified phase, or returns an error if the timeout is exceeded
func (*Client) WaitForPodByLabel ¶ added in v0.11.2
func (c *Client) WaitForPodByLabel(ns, label string, timeout time.Duration, phases ...v1.PodPhase) (*v1.Pod, error)
WaitForPod waits for a pod to be in the specified phase, or returns an error if the timeout is exceeded
func (*Client) WaitForPodCommand ¶
func (c *Client) WaitForPodCommand(ns, name string, container string, timeout time.Duration, command ...string) error
WaitForPodCommand waits for a command executed in pod to succeed with an exit code of 0 error if the timeout is exceeded
func (*Client) WaitForResource ¶
func (c *Client) WaitForResource(kind, namespace, name string, timeout time.Duration) (*unstructured.Unstructured, error)
func (*Client) WaitForRestMapping ¶ added in v0.5.1
func (*Client) WaitForStatefulSet ¶
WaitForStatefulSet waits for a statefulset to have at least 1 ready replica, or returns an error if the timeout is exceeded
type ConfigMapKeySelector ¶ added in v0.7.0
type ConfigMapKeySelector struct { LocalObjectReference `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` Key string `json:"key" yaml:"key" protobuf:"bytes,2,opt,name=key"` Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` }
+kubebuilder:object:generate=true
func (*ConfigMapKeySelector) DeepCopy ¶ added in v0.7.0
func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector.
func (*ConfigMapKeySelector) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentBuilder ¶
type DeploymentBuilder struct { Builder *Builder Name, Image string // contains filtered or unexported fields }
func Deployment ¶
func Deployment(name, image string) *DeploymentBuilder
func (*DeploymentBuilder) Annotations ¶
func (d *DeploymentBuilder) Annotations(annotations map[string]string) *DeploymentBuilder
func (*DeploymentBuilder) Args ¶
func (d *DeploymentBuilder) Args(args ...string) *DeploymentBuilder
func (*DeploymentBuilder) AsCronJob ¶
func (d *DeploymentBuilder) AsCronJob(schedule string) *batchv1beta1.CronJob
func (*DeploymentBuilder) AsOneShotJob ¶
func (d *DeploymentBuilder) AsOneShotJob() *batchv1.Job
func (*DeploymentBuilder) AsOneShotPod ¶ added in v0.9.0
func (d *DeploymentBuilder) AsOneShotPod() *v1.Pod
func (*DeploymentBuilder) Build ¶
func (d *DeploymentBuilder) Build() *Builder
func (*DeploymentBuilder) Command ¶
func (d *DeploymentBuilder) Command(cmd ...string) *DeploymentBuilder
func (*DeploymentBuilder) EnvFromConfigMap ¶ added in v0.9.0
func (d *DeploymentBuilder) EnvFromConfigMap(name string) *DeploymentBuilder
func (*DeploymentBuilder) EnvFromSecret ¶ added in v0.9.0
func (d *DeploymentBuilder) EnvFromSecret(name string) *DeploymentBuilder
func (*DeploymentBuilder) EnvVarFromConfigMap ¶
func (d *DeploymentBuilder) EnvVarFromConfigMap(env, configmap, key string) *DeploymentBuilder
func (*DeploymentBuilder) EnvVarFromField ¶
func (d *DeploymentBuilder) EnvVarFromField(env, field string) *DeploymentBuilder
func (*DeploymentBuilder) EnvVarFromSecret ¶
func (d *DeploymentBuilder) EnvVarFromSecret(env, secret, key string) *DeploymentBuilder
func (*DeploymentBuilder) EnvVars ¶
func (d *DeploymentBuilder) EnvVars(env map[string]string) *DeploymentBuilder
func (*DeploymentBuilder) Expose ¶
func (d *DeploymentBuilder) Expose(ports ...int32) *DeploymentBuilder
func (*DeploymentBuilder) GetLabels ¶
func (d *DeploymentBuilder) GetLabels() map[string]string
func (*DeploymentBuilder) Labels ¶
func (d *DeploymentBuilder) Labels(labels map[string]string) *DeploymentBuilder
func (*DeploymentBuilder) MountConfigMap ¶
func (d *DeploymentBuilder) MountConfigMap(cm, path string) *DeploymentBuilder
func (*DeploymentBuilder) MountSecret ¶
func (d *DeploymentBuilder) MountSecret(secret, path string, mode int32) *DeploymentBuilder
func (*DeploymentBuilder) NodeAffinity ¶
func (d *DeploymentBuilder) NodeAffinity(nodeReadinessLabel map[string]string) *DeploymentBuilder
func (*DeploymentBuilder) ObjectMeta ¶
func (d *DeploymentBuilder) ObjectMeta() metav1.ObjectMeta
func (*DeploymentBuilder) PodAffinity ¶
func (d *DeploymentBuilder) PodAffinity(labels map[string]string, topologyKey string) *DeploymentBuilder
func (*DeploymentBuilder) PodSpec ¶
func (d *DeploymentBuilder) PodSpec() v1.PodSpec
func (*DeploymentBuilder) PodTemplate ¶
func (d *DeploymentBuilder) PodTemplate() v1.PodTemplateSpec
func (*DeploymentBuilder) Ports ¶
func (d *DeploymentBuilder) Ports(ports ...int32) *DeploymentBuilder
func (*DeploymentBuilder) Replicas ¶
func (d *DeploymentBuilder) Replicas(replicas int) *DeploymentBuilder
func (*DeploymentBuilder) Resources ¶
func (d *DeploymentBuilder) Resources(resources v1.ResourceRequirements) *DeploymentBuilder
func (*DeploymentBuilder) ServiceAccount ¶
func (d *DeploymentBuilder) ServiceAccount(name string) *DeploymentBuilder
type DynamicKind ¶
type DynamicKind struct {
APIVersion, Kind string
}
func (DynamicKind) GroupVersionKind ¶
func (dk DynamicKind) GroupVersionKind() schema.GroupVersionKind
func (DynamicKind) SetGroupVersionKind ¶
func (dk DynamicKind) SetGroupVersionKind(gvk schema.GroupVersionKind)
type EnvVar ¶ added in v0.7.0
type EnvVar struct { Name string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,1,opt,name=name"` Value string `json:"value,omitempty" yaml:"value,omitempty" protobuf:"bytes,2,opt,name=value"` ValueFrom *EnvVarSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"` }
+kubebuilder:object:generate=true
func (*EnvVar) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.
func (*EnvVar) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (EnvVar) GetCacheKey ¶ added in v0.29.0
type EnvVarSource ¶ added in v0.7.0
type EnvVarSource struct { ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" yaml:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"` SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"` }
+kubebuilder:object:generate=true
func (*EnvVarSource) DeepCopy ¶ added in v0.7.0
func (in *EnvVarSource) DeepCopy() *EnvVarSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarSource.
func (*EnvVarSource) DeepCopyInto ¶ added in v0.7.0
func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Health ¶
type Health struct {
RunningPods, PendingPods, ErrorPods, CrashLoopBackOff int
ReadyNodes, UnreadyNodes int
Error error
}
func (Health) GetNonReadyPods ¶
func (Health) IsDegradedComparedTo ¶
type IsType ¶
type IsType func(*unstructured.Unstructured) bool
type LocalObjectReference ¶ added in v0.7.0
type LocalObjectReference struct {
Name string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
}
+kubebuilder:object:generate=true
func (*LocalObjectReference) DeepCopy ¶ added in v0.7.0
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.
func (*LocalObjectReference) DeepCopyInto ¶ added in v0.7.0
func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶ added in v0.7.0
type SecretKeySelector struct { LocalObjectReference `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` Key string `json:"key" yaml:"key" protobuf:"bytes,2,opt,name=key"` Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` }
+kubebuilder:object:generate=true
func (*SecretKeySelector) DeepCopy ¶ added in v0.7.0
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶ added in v0.7.0
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceAccountBuilder ¶
func (*ServiceAccountBuilder) AddClusterRole ¶
func (s *ServiceAccountBuilder) AddClusterRole(role string) *ServiceAccountBuilder
func (*ServiceAccountBuilder) AddRole ¶
func (s *ServiceAccountBuilder) AddRole(role string) *ServiceAccountBuilder
type Spec ¶
type Spec struct { Path string Items []*unstructured.Unstructured }
type Specs ¶
type Specs []Spec
func Walk ¶
Walk iterates recursively over each file in path and returns all of the objects contained
func (Specs) FilterBy ¶
func (specs Specs) FilterBy(kind string) []*unstructured.Unstructured
type WaitFN ¶
type WaitFN func(*unstructured.Unstructured) (bool, string)
type WebhookBuilder ¶
type WebhookBuilder struct { *WebhookConfigBuilder admission.ValidatingWebhook CA []byte Service, Path string }
func (WebhookBuilder) Add ¶
func (b WebhookBuilder) Add() *WebhookConfigBuilder
func (WebhookBuilder) Fail ¶
func (b WebhookBuilder) Fail() WebhookBuilder
func (WebhookBuilder) Match ¶
func (b WebhookBuilder) Match(groups, versions, resources []string) WebhookBuilder
func (WebhookBuilder) MatchAny ¶
func (b WebhookBuilder) MatchAny() WebhookBuilder
func (WebhookBuilder) MatchKinds ¶
func (b WebhookBuilder) MatchKinds(resources ...string) WebhookBuilder
func (WebhookBuilder) TimeoutSeconds ¶
func (b WebhookBuilder) TimeoutSeconds(timeout int32) WebhookBuilder
func (WebhookBuilder) WithNamespaceLabel ¶
func (b WebhookBuilder) WithNamespaceLabel(label string, values ...string) WebhookBuilder
func (WebhookBuilder) WithoutNamespaceLabel ¶
func (b WebhookBuilder) WithoutNamespaceLabel(label string, values ...string) WebhookBuilder
type WebhookConfigBuilder ¶
type WebhookConfigBuilder struct { admission.ValidatingWebhookConfiguration Service string CA []byte }
func (WebhookConfigBuilder) Build ¶
func (b WebhookConfigBuilder) Build() *admission.ValidatingWebhookConfiguration
func (WebhookConfigBuilder) BuildMutating ¶
func (b WebhookConfigBuilder) BuildMutating() *admission.MutatingWebhookConfiguration
func (*WebhookConfigBuilder) NewHook ¶
func (b *WebhookConfigBuilder) NewHook(Name, Path string) *WebhookBuilder