Documentation ¶
Index ¶
- Variables
- func CloneTemplate(c client.Client, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error)
- func ErrorsFrom(obj *unstructured.Unstructured) (string, string, error)
- func Get(c client.Client, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error)
- func IsReady(obj *unstructured.Unstructured) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TestGenericInfrastructureCRD = &apiextensionsv1beta1.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: "genericmachines.infrastructure.cluster.x-k8s.io", }, Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ Group: "infrastructure.cluster.x-k8s.io", Scope: apiextensionsv1beta1.NamespaceScoped, Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ Kind: "InfrastructureMachine", Plural: "genericmachines", }, Subresources: &apiextensionsv1beta1.CustomResourceSubresources{ Status: &apiextensionsv1beta1.CustomResourceSubresourceStatus{}, }, Validation: &apiextensionsv1beta1.CustomResourceValidation{}, Versions: []apiextensionsv1beta1.CustomResourceDefinitionVersion{ { Name: "v1alpha2", Served: true, Storage: true, }, }, }, } TestGenericInfrastructureTemplateCRD = &apiextensionsv1beta1.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: "genericmachinetemplates.infrastructure.cluster.x-k8s.io", }, Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ Group: "infrastructure.cluster.x-k8s.io", Scope: apiextensionsv1beta1.NamespaceScoped, Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ Kind: "InfrastructureMachineTemplate", Plural: "genericmachinetemplates", }, Subresources: &apiextensionsv1beta1.CustomResourceSubresources{ Status: &apiextensionsv1beta1.CustomResourceSubresourceStatus{}, }, Validation: &apiextensionsv1beta1.CustomResourceValidation{}, Versions: []apiextensionsv1beta1.CustomResourceDefinitionVersion{ { Name: "v1alpha2", Served: true, Storage: true, }, }, }, } )
Functions ¶
func CloneTemplate ¶
func CloneTemplate(c client.Client, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error)
CloneTemplate uses the client and the reference to create a new object from the template.
func ErrorsFrom ¶
func ErrorsFrom(obj *unstructured.Unstructured) (string, string, error)
ErrorsFrom returns the ErrorReason and ErrorMessage fields from the external object status.
func Get ¶
func Get(c client.Client, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error)
Get uses the client and reference to get an external, unstructured object.
func IsReady ¶
func IsReady(obj *unstructured.Unstructured) (bool, error)
IsReady returns true if the Status.Ready field on an external object is true.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.