Documentation ¶
Index ¶
- Constants
- func APIService() schema.GroupVersionKind
- func Anvil() schema.GroupVersionKind
- func Cluster() schema.GroupVersionKind
- func ClusterConfig() schema.GroupVersionKind
- func ClusterRole() schema.GroupVersionKind
- func ClusterRoleBinding() schema.GroupVersionKind
- func ClusterRoleBindingV1Beta1() schema.GroupVersionKind
- func ClusterSelector() schema.GroupVersionKind
- func ConfigMap() schema.GroupVersionKind
- func CronJob() schema.GroupVersionKind
- func CustomResourceDefinition() schema.GroupKind
- func CustomResourceDefinitionV1() schema.GroupVersionKind
- func CustomResourceDefinitionV1Beta1() schema.GroupVersionKind
- func DaemonSet() schema.GroupVersionKind
- func Deployment() schema.GroupVersionKind
- func DeploymentResource() schema.GroupVersionResource
- func ExtractClientObjectList(objList client.ObjectList) ([]client.Object, error)
- func GVKToString(gvk schema.GroupVersionKind) string
- func HierarchyConfig() schema.GroupVersionKind
- func Ingress() schema.GroupVersionKind
- func IsListGVK(gvk schema.GroupVersionKind) bool
- func ItemGVKForListGVK(gvk schema.GroupVersionKind) schema.GroupVersionKind
- func Job() schema.GroupVersionKind
- func KptFile() schema.GroupVersionKind
- func ListGVKForItemGVK(gvk schema.GroupVersionKind) schema.GroupVersionKind
- func Lookup(obj runtime.Object, scheme *runtime.Scheme) (schema.GroupVersionKind, error)
- func Namespace() schema.GroupVersionKind
- func NamespaceConfig() schema.GroupVersionKind
- func NamespaceSelector() schema.GroupVersionKind
- func NetworkPolicy() schema.GroupVersionKind
- func NewClientObjectForGVK(gvk schema.GroupVersionKind, scheme *runtime.Scheme) (client.Object, error)
- func NewObjectForGVK(gvk schema.GroupVersionKind, scheme *runtime.Scheme) (runtime.Object, error)
- func NewTypedListForItemGVK(itemGVK schema.GroupVersionKind, scheme *runtime.Scheme) (client.ObjectList, error)
- func NewUnstructuredListForItemGVK(itemGVK schema.GroupVersionKind) *unstructured.UnstructuredList
- func ObjectAsClientObject(rObj runtime.Object) (client.Object, error)
- func ObjectAsClientObjectList(rObj runtime.Object) (client.ObjectList, error)
- func ObjectSummary(obj runtime.Object) string
- func PersistentVolume() schema.GroupVersionKind
- func Pod() schema.GroupVersionKind
- func PodSecurityPolicy() schema.GroupVersionKind
- func ReplicaSet() schema.GroupVersionKind
- func ReplicationController() schema.GroupVersionKind
- func Repo() schema.GroupVersionKind
- func RepoSyncResource() schema.GroupVersionResource
- func RepoSyncV1Alpha1() schema.GroupVersionKind
- func RepoSyncV1Beta1() schema.GroupVersionKind
- func ResourceGroup() schema.GroupVersionKind
- func ResourceQuota() schema.GroupVersionKind
- func Role() schema.GroupVersionKind
- func RoleBinding() schema.GroupVersionKind
- func RoleBindingV1Beta1() schema.GroupVersionKind
- func RootSyncResource() schema.GroupVersionResource
- func RootSyncV1Alpha1() schema.GroupVersionKind
- func RootSyncV1Beta1() schema.GroupVersionKind
- func Secret() schema.GroupVersionKind
- func Service() schema.GroupVersionKind
- func ServiceAccount() schema.GroupVersionKind
- func StatefulSet() schema.GroupVersionKind
- func Sync() schema.GroupVersionKind
- func ToTypedObject(obj runtime.Object, scheme *runtime.Scheme) (runtime.Object, error)
- func ToTypedWithVersion(obj runtime.Object, targetGVK schema.GroupVersionKind, scheme *runtime.Scheme) (runtime.Object, error)
- func ToUnstructured(obj runtime.Object, scheme *runtime.Scheme) (*unstructured.Unstructured, error)
- func ToUnstructuredWithVersion(obj runtime.Object, targetGVK schema.GroupVersionKind, scheme *runtime.Scheme) (*unstructured.Unstructured, error)
- func ToUnstructureds(scheme *runtime.Scheme, objs ...runtime.Object) ([]*unstructured.Unstructured, error)
- func ValidatingWebhookConfiguration() schema.GroupVersionKind
Constants ¶
const CustomResourceDefinitionKind = "CustomResourceDefinition"
CustomResourceDefinitionKind is the Kind for CustomResourceDefinitions
const ListSuffix = "List"
ListSuffix is the suffix expected for all Kubernetes collection resources.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 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
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
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
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
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 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 RepoSyncResource ¶ added in v1.18.0
func RepoSyncResource() schema.GroupVersionResource
RepoSyncResource returns the canonical RepoSync GroupVersionResource.
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 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 RootSyncResource ¶ added in v1.18.0
func RootSyncResource() schema.GroupVersionResource
RootSyncResource returns the canonical RootSync GroupVersionResource.
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 ToTypedObject ¶ added in v1.15.1
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.