kinds

package
v1.17.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const CustomResourceDefinitionKind = "CustomResourceDefinition"

CustomResourceDefinitionKind is the Kind for CustomResourceDefinitions

View Source
const ListSuffix = "List"

ListSuffix is the suffix expected for all Kubernetes collection resources.

Variables

This section is empty.

Functions

func APIService

func APIService() schema.GroupVersionKind

APIService returns the APIService kind.

func Anvil

func Anvil() schema.GroupVersionKind

Anvil returns the GroupVersionKind for Anvil Custom Resource used in tests.

func Cluster

func Cluster() schema.GroupVersionKind

Cluster returns the canonical Cluster GroupVersionKind.

func ClusterConfig

func ClusterConfig() schema.GroupVersionKind

ClusterConfig returns the canonical ClusterConfig GroupVersionKind.

func ClusterRole

func ClusterRole() schema.GroupVersionKind

ClusterRole returns the canonical ClusterRole GroupVersionKind.

func ClusterRoleBinding

func ClusterRoleBinding() schema.GroupVersionKind

ClusterRoleBinding returns the canonical ClusterRoleBinding GroupVersionKind.

func ClusterRoleBindingV1Beta1

func ClusterRoleBindingV1Beta1() schema.GroupVersionKind

ClusterRoleBindingV1Beta1 returns the canonical ClusterRoleBinding GroupVersionKind.

func ClusterSelector

func ClusterSelector() schema.GroupVersionKind

ClusterSelector returns the canonical ClusterSelector GroupVersionKind.

func ConfigMap

func ConfigMap() schema.GroupVersionKind

ConfigMap returns the canonical ConfigMap GroupVersionKind.

func CronJob

func CronJob() schema.GroupVersionKind

CronJob returns the canonical CronJob GroupVersionKind.

func CustomResourceDefinition

func CustomResourceDefinition() schema.GroupKind

CustomResourceDefinition returns the canonical CustomResourceDefinition GroupKind

func CustomResourceDefinitionV1

func CustomResourceDefinitionV1() schema.GroupVersionKind

CustomResourceDefinitionV1 returns the v1 CustomResourceDefinition GroupVersionKind.

func CustomResourceDefinitionV1Beta1

func CustomResourceDefinitionV1Beta1() schema.GroupVersionKind

CustomResourceDefinitionV1Beta1 returns the v1beta1 CustomResourceDefinition GroupVersionKind.

func DaemonSet

func DaemonSet() schema.GroupVersionKind

DaemonSet returns the canonical DaemonSet GroupVersionKind.

func Deployment

func Deployment() schema.GroupVersionKind

Deployment returns the canonical Deployment GroupVersionKind.

func DeploymentResource added in v1.15.1

func DeploymentResource() schema.GroupVersionResource

DeploymentResource returns the canonical Deployment GroupVersionResource.

func ExtractClientObjectList added in v1.16.0

func ExtractClientObjectList(objList client.ObjectList) ([]client.Object, error)

ExtractClientObjectList reads the Items from a client.ObjectList into a []client.Object.

func GVKToString added in v1.16.0

func GVKToString(gvk schema.GroupVersionKind) string

GVKToString returns a human readable format for GroupVersionKind: `GROUP/VERSION.KIND`

func HierarchyConfig

func HierarchyConfig() schema.GroupVersionKind

HierarchyConfig returns the canonical HierarchyConfig GroupVersionKind.

func Ingress

func Ingress() schema.GroupVersionKind

Ingress returns the canonical Ingress GroupVersionKind.

func IsListGVK added in v1.16.0

func IsListGVK(gvk schema.GroupVersionKind) bool

IsListGVK returns true if the kind has a "List" suffix.

func ItemGVKForListGVK added in v1.16.0

func ItemGVKForListGVK(gvk schema.GroupVersionKind) schema.GroupVersionKind

ItemGVKForListGVK returns the list GroupVersionKind with "List" removed from the suffix of the kind.

func Job

Job returns the canonical Job GroupVersionKind.

func KptFile

func KptFile() schema.GroupVersionKind

KptFile returns the canonical Kptfile GroupVersionKind.

func ListGVKForItemGVK added in v1.16.0

func ListGVKForItemGVK(gvk schema.GroupVersionKind) schema.GroupVersionKind

ListGVKForItemGVK returns the item GroupVersionKind with "List" appended to the kind.

func Lookup added in v1.15.1

func Lookup(obj runtime.Object, scheme *runtime.Scheme) (schema.GroupVersionKind, error)

Lookup returns the GVK of a object based on the types registered with the provided Scheme.

func Namespace

func Namespace() schema.GroupVersionKind

Namespace returns the canonical Namespace GroupVersionKind.

func NamespaceConfig

func NamespaceConfig() schema.GroupVersionKind

NamespaceConfig returns the canonical NamespaceConfig GroupVersionKind.

func NamespaceSelector

func NamespaceSelector() schema.GroupVersionKind

NamespaceSelector returns the canonical NamespaceSelector GroupVersionKind.

func NetworkPolicy

func NetworkPolicy() schema.GroupVersionKind

NetworkPolicy returns the canonical NetworkPolicy GroupVersionKind.

func NewClientObjectForGVK added in v1.16.0

func NewClientObjectForGVK(gvk schema.GroupVersionKind, scheme *runtime.Scheme) (client.Object, error)

NewClientObjectForGVK creates a new client.Object using the type registered to the scheme for the specified GroupVersionKind.

In practice, most runtime.Object are client.Object. However, some objects are not, namely objects used for config files that are not persisted by the Kubernetes API server. This method makes this common operation easier and ensures a consistent error message.

func NewObjectForGVK added in v1.16.0

func NewObjectForGVK(gvk schema.GroupVersionKind, scheme *runtime.Scheme) (runtime.Object, error)

NewObjectForGVK creates a new runtime.Object using the type registered to the scheme for the specified GroupVersionKind. This is a wrapper around scheme.New to provide a consistent error message.

func NewTypedListForItemGVK added in v1.16.0

func NewTypedListForItemGVK(itemGVK schema.GroupVersionKind, scheme *runtime.Scheme) (client.ObjectList, error)

NewTypedListForItemGVK creates a new client.ObjectList using the list type registered to the scheme for the specified item GroupVersionKind with "List" appended to the kind.

func NewUnstructuredListForItemGVK added in v1.16.0

func NewUnstructuredListForItemGVK(itemGVK schema.GroupVersionKind) *unstructured.UnstructuredList

NewUnstructuredListForItemGVK creates a new UnstructuredList using the specified item GroupVersionKind with "List" appended to the kind.

func ObjectAsClientObject added in v1.16.0

func ObjectAsClientObject(rObj runtime.Object) (client.Object, error)

ObjectAsClientObject casts from runtime.Object to client.Object. This method ensures a consistent error message for this common operation.

func ObjectAsClientObjectList added in v1.16.0

func ObjectAsClientObjectList(rObj runtime.Object) (client.ObjectList, error)

ObjectAsClientObjectList casts from runtime.Object to client.ObjectList. This method ensures a consistent error message for this common operation.

func ObjectSummary added in v1.16.0

func ObjectSummary(obj runtime.Object) string

ObjectSummary returns a human readable format for objects. Depending on the type and what's populated, the output may be one of the following: - `GROUP/VERSION.KIND(TYPE)[NAMESPACE/NAME]` - `GROUP/VERSION.KIND(TYPE)` - `(TYPE)`

func PersistentVolume

func PersistentVolume() schema.GroupVersionKind

PersistentVolume returns the canonical PersistentVolume GroupVersionKind.

func Pod

Pod returns the canonical Pod GroupVersionKind.

func PodSecurityPolicy

func PodSecurityPolicy() schema.GroupVersionKind

PodSecurityPolicy returns the canonical PodSecurityPolicy GroupVersionKind.

func ReplicaSet

func ReplicaSet() schema.GroupVersionKind

ReplicaSet returns the canonical ReplicaSet GroupVersionKind.

func ReplicationController

func ReplicationController() schema.GroupVersionKind

ReplicationController returns the canonical ReplicationController GroupVersionKind.

func Repo

func Repo() schema.GroupVersionKind

Repo returns the canonical Repo GroupVersionKind.

func RepoSyncV1Alpha1

func RepoSyncV1Alpha1() schema.GroupVersionKind

RepoSyncV1Alpha1 returns the canonical RepoSync GroupVersionKind.

func RepoSyncV1Beta1

func RepoSyncV1Beta1() schema.GroupVersionKind

RepoSyncV1Beta1 returns the v1beta1 RepoSync GroupVersionKind.

func ResourceGroup added in v1.15.1

func ResourceGroup() schema.GroupVersionKind

ResourceGroup returns the canonical ResourceGroup GroupVersionKind.

func ResourceQuota

func ResourceQuota() schema.GroupVersionKind

ResourceQuota returns the canonical ResourceQuota GroupVersionKind.

func Role

func Role() schema.GroupVersionKind

Role returns the canonical Role GroupVersionKind.

func RoleBinding

func RoleBinding() schema.GroupVersionKind

RoleBinding returns the canonical RoleBinding GroupVersionKind.

func RoleBindingV1Beta1

func RoleBindingV1Beta1() schema.GroupVersionKind

RoleBindingV1Beta1 returns the canonical v1beta1 RoleBinding GroupVersionKind.

func RootSyncV1Alpha1

func RootSyncV1Alpha1() schema.GroupVersionKind

RootSyncV1Alpha1 returns the canonical RootSync GroupVersionKind.

func RootSyncV1Beta1

func RootSyncV1Beta1() schema.GroupVersionKind

RootSyncV1Beta1 returns the v1beta1 RootSync GroupVersionKind.

func Secret

func Secret() schema.GroupVersionKind

Secret returns the canonical Secret GroupVersionKind.

func Service

func Service() schema.GroupVersionKind

Service returns the canonical Service GroupVersionKind.

func ServiceAccount

func ServiceAccount() schema.GroupVersionKind

ServiceAccount returns the canonical ServiceAccount GroupVersionKind.

func StatefulSet

func StatefulSet() schema.GroupVersionKind

StatefulSet returns the canonical StatefulSet GroupVersionKind.

func Sync

func Sync() schema.GroupVersionKind

Sync returns the canonical Sync GroupVersionKind.

func ToTypedObject added in v1.15.1

func ToTypedObject(obj runtime.Object, scheme *runtime.Scheme) (runtime.Object, error)

ToTypedObject converts an Unstructured object into a typed object. If not Unstructured, a deep copy is returned.

func ToTypedWithVersion added in v1.15.1

func ToTypedWithVersion(obj runtime.Object, targetGVK schema.GroupVersionKind, scheme *runtime.Scheme) (runtime.Object, error)

ToTypedWithVersion converts the specified object to the specified apiVersion. If version and type already match, a deep copy is returned.

When the internal version is registered, it's assumed that the internal version is the hub version through which other versions are converted. Otherwise, either the source or target version must be the hub version and direct conversion must be registered with the scheme.

func ToUnstructured added in v1.15.1

func ToUnstructured(obj runtime.Object, scheme *runtime.Scheme) (*unstructured.Unstructured, error)

ToUnstructured converts a typed object into an Unstructured object. If already Unstructured, a deep copy is returned.

func ToUnstructuredWithVersion added in v1.15.1

func ToUnstructuredWithVersion(obj runtime.Object, targetGVK schema.GroupVersionKind, scheme *runtime.Scheme) (*unstructured.Unstructured, error)

ToUnstructuredWithVersion converts the specified object to the specified apiVersion. If version already matches, a deep copy is returned.

Since scheme.Convert ignores the target version when converting unstructured objects, we have to do three converts: unstructured -> typed (internal version) -> typed (target version) -> unstructured.

WARNING: Delegates to ConvertToVersion. See function comment for warning.

func ToUnstructureds added in v1.15.1

func ToUnstructureds(scheme *runtime.Scheme, objs ...runtime.Object) ([]*unstructured.Unstructured, error)

ToUnstructureds converts the objects to a list of Unstructured objects

func ValidatingWebhookConfiguration added in v1.15.1

func ValidatingWebhookConfiguration() schema.GroupVersionKind

ValidatingWebhookConfiguration returns the ValidatingWebhookConfiguration kind.

Types

This section is empty.

Jump to

Keyboard shortcuts

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