Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TemplateSuffix is the object kind suffix used by infrastructure references associated // with MachineSet or MachineDeployments. TemplateSuffix = "Template" )
Variables ¶
This section is empty.
Functions ¶
func GenerateTemplate ¶
func GenerateTemplate(in *GenerateTemplateInput) (*unstructured.Unstructured, error)
func Get ¶
func Get(ctx context.Context, c client.Client, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error)
Get uses the client and reference to get an external, unstructured object.
Types ¶
type GenerateTemplateInput ¶
type GenerateTemplateInput struct {
// Template is the TemplateRef turned into an unstructured.
// +required
Template *unstructured.Unstructured
// TemplateRef is a reference to the template that needs to be cloned.
// +required
TemplateRef *corev1.ObjectReference
// Namespace is the Kubernetes namespace the cloned object should be created into.
// +required
Namespace string
// OwnerRef is an optional OwnerReference to attach to the cloned object.
// +optional
OwnerRef *metav1.OwnerReference
// Labels is an optional map of labels to be added to the object.
// +optional
Labels map[string]string
}
GenerateTemplate input is everything needed to generate a new template.
Click to show internal directories.
Click to hide internal directories.