kinds

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeprecatedAPIVersion added in v1.6.0

func DeprecatedAPIVersion(gvk schema.GroupVersionKind) bool

DeprecatedAPIVersion returns true if the given GVK is deprecated in the most recent k8s release.

func RemovedAPIVersion added in v1.6.0

func RemovedAPIVersion(gvk schema.GroupVersionKind, version cluster.ServerVersion) (bool, *cluster.ServerVersion)

RemovedAPIVersion returns true if the given GVK has been removed in the given k8s version, and the corresponding ServerVersion where the GVK was removed.

func RemovedInVersion added in v1.4.1

func RemovedInVersion(gvk schema.GroupVersionKind) *cluster.ServerVersion

RemovedInVersion returns the ServerVersion of k8s that a GVK is removed in. The return value is nil if the GVK is not scheduled for removal.

func SuggestedAPIVersion added in v1.6.0

func SuggestedAPIVersion(gvk schema.GroupVersionKind) string

SuggestedAPIVersion returns a string with the suggested apiVersion for a given GVK. This is used to provide useful warning messages when a user creates a resource using a deprecated GVK.

Types

type Kind

type Kind string
const (
	APIService                     Kind = "APIService"
	Binding                        Kind = "Binding"
	CertificateSigningRequest      Kind = "CertificateSigningRequest"
	ClusterRole                    Kind = "ClusterRole"
	ClusterRoleBinding             Kind = "ClusterRoleBinding"
	ComponentStatus                Kind = "ComponentStatus"
	ControllerRevision             Kind = "ControllerRevision"
	CustomResourceDefinition       Kind = "CustomResourceDefinition"
	ConfigMap                      Kind = "ConfigMap"
	CronJob                        Kind = "CronJob"
	CSIDriver                      Kind = "CSIDriver"
	CSINode                        Kind = "CSINode"
	DaemonSet                      Kind = "DaemonSet"
	Deployment                     Kind = "Deployment"
	Endpoints                      Kind = "Endpoints"
	Event                          Kind = "Event"
	HorizontalPodAutoscaler        Kind = "HorizontalPodAutoscaler"
	Ingress                        Kind = "Ingress"
	Job                            Kind = "Job"
	Lease                          Kind = "Lease"
	LimitRange                     Kind = "LimitRange"
	LocalSubjectAccessReview       Kind = "LocalSubjectAccessReview"
	MutatingWebhookConfiguration   Kind = "MutatingWebhookConfiguration"
	Namespace                      Kind = "Namespace"
	NetworkPolicy                  Kind = "NetworkPolicy"
	Node                           Kind = "Node"
	PersistentVolume               Kind = "PersistentVolume"
	PersistentVolumeClaim          Kind = "PersistentVolumeClaim"
	Pod                            Kind = "Pod"
	PodDisruptionBudget            Kind = "PodDisruptionBudget"
	PodSecurityPolicy              Kind = "PodSecurityPolicy"
	PodTemplate                    Kind = "PodTemplate"
	PriorityClass                  Kind = "PriorityClass"
	ReplicaSet                     Kind = "ReplicaSet"
	ReplicationController          Kind = "ReplicationController"
	ResourceQuota                  Kind = "ResourceQuota"
	Role                           Kind = "Role"
	RoleBinding                    Kind = "RoleBinding"
	RuntimeClass                   Kind = "RuntimeClass"
	Secret                         Kind = "Secret"
	SelfSubjectAccessReview        Kind = "SelfSubjectAccessReview"
	SelfSubjectRulesReview         Kind = "SelfSubjectRulesReview"
	Service                        Kind = "Service"
	ServiceAccount                 Kind = "ServiceAccount"
	StatefulSet                    Kind = "StatefulSet"
	SubjectAccessReview            Kind = "SubjectAccessReview"
	StorageClass                   Kind = "StorageClass"
	TokenReview                    Kind = "TokenReview"
	ValidatingWebhookConfiguration Kind = "ValidatingWebhookConfiguration"
	VolumeAttachment               Kind = "VolumeAttachment"
)

func (Kind) Namespaced added in v1.4.2

func (k Kind) Namespaced() (known bool, namespaced bool)

Namespaced returns whether known resource Kinds are namespaced. If the Kind is unknown (such as CRD Kinds), the known return value will be false, and the namespaced value is unknown. In this case, this information can be queried separately from the k8s API server.

type RemovedAPIError added in v1.6.0

type RemovedAPIError struct {
	GVK     schema.GroupVersionKind
	Version *cluster.ServerVersion
}

RemovedAPIError is returned if the provided GVK does not exist in the targeted k8s cluster because the apiVersion has been deprecated and removed.

func (*RemovedAPIError) Error added in v1.6.0

func (e *RemovedAPIError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL