Documentation ¶
Index ¶
- func DeprecatedApiVersion(gvk schema.GroupVersionKind) bool
- func RemovedApiVersion(gvk schema.GroupVersionKind, version cluster.ServerVersion) (bool, *cluster.ServerVersion)
- func RemovedInVersion(gvk schema.GroupVersionKind) *cluster.ServerVersion
- func SuggestedApiVersion(gvk schema.GroupVersionKind) string
- type Kind
- type RemovedApiError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeprecatedApiVersion ¶ added in v1.0.1
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.2.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.0.1
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
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.2.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.2.0
func (e *RemovedApiError) Error() string