Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the operator-utils v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator-utils.example.io
Index ¶
- Variables
- type ConditionMap
- type Conditions
- type EnforcingCRD
- func (in *EnforcingCRD) DeepCopy() *EnforcingCRD
- func (in *EnforcingCRD) DeepCopyInto(out *EnforcingCRD)
- func (in *EnforcingCRD) DeepCopyObject() runtime.Object
- func (m *EnforcingCRD) GetEnforcingReconcileStatus() EnforcingReconcileStatus
- func (m *EnforcingCRD) SetEnforcingReconcileStatus(reconcileStatus EnforcingReconcileStatus)
- type EnforcingCRDList
- type EnforcingCRDSpec
- type EnforcingCRDStatus
- type EnforcingPatch
- func (in *EnforcingPatch) DeepCopy() *EnforcingPatch
- func (in *EnforcingPatch) DeepCopyInto(out *EnforcingPatch)
- func (in *EnforcingPatch) DeepCopyObject() runtime.Object
- func (m *EnforcingPatch) GetEnforcingReconcileStatus() EnforcingReconcileStatus
- func (m *EnforcingPatch) SetEnforcingReconcileStatus(reconcileStatus EnforcingReconcileStatus)
- type EnforcingPatchList
- type EnforcingPatchSpec
- type EnforcingPatchStatus
- type EnforcingReconcileStatus
- type EnforcingReconcileStatusAware
- type LockedResource
- type LockedResourceTemplate
- type MyCRD
- type MyCRDList
- type MyCRDSpec
- type MyCRDStatus
- type PatchSpec
- type SourceObjectReference
- func (in *SourceObjectReference) DeepCopy() *SourceObjectReference
- func (in *SourceObjectReference) DeepCopyInto(out *SourceObjectReference)
- func (s *SourceObjectReference) GetNameAndNamespace(context context.Context, target *unstructured.Unstructured) (name string, namespace string, err error)
- func (s *SourceObjectReference) GetReferencedObject(context context.Context, target *unstructured.Unstructured) (*unstructured.Unstructured, error)
- type TargetObjectReference
- func (in *TargetObjectReference) DeepCopy() *TargetObjectReference
- func (in *TargetObjectReference) DeepCopyInto(out *TargetObjectReference)
- func (t *TargetObjectReference) GetReferencedObject(context context.Context) (*unstructured.Unstructured, error)
- func (t *TargetObjectReference) GetReferencedObjectWithName(context context.Context, namespacedName types.NamespacedName) (*unstructured.Unstructured, error)
- func (t *TargetObjectReference) GetReferencedObjects(context context.Context) ([]unstructured.Unstructured, error)
- func (t *TargetObjectReference) IsNamespaced(context context.Context) (bool, error)
- func (t *TargetObjectReference) IsSelectingMultipleInstances(context context.Context) (multiple bool, namespacedSelection bool, err error)
- func (t *TargetObjectReference) Selects(context context.Context, obj client.Object) (bool, error)
- type TemplatedEnforcingCRD
- func (in *TemplatedEnforcingCRD) DeepCopy() *TemplatedEnforcingCRD
- func (in *TemplatedEnforcingCRD) DeepCopyInto(out *TemplatedEnforcingCRD)
- func (in *TemplatedEnforcingCRD) DeepCopyObject() runtime.Object
- func (m *TemplatedEnforcingCRD) GetEnforcingReconcileStatus() EnforcingReconcileStatus
- func (m *TemplatedEnforcingCRD) SetEnforcingReconcileStatus(reconcileStatus EnforcingReconcileStatus)
- type TemplatedEnforcingCRDList
- type TemplatedEnforcingCRDSpec
- type TemplatedEnforcingCRDStatus
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "operator-utils.example.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type ConditionMap ¶ added in v1.3.0
type ConditionMap map[string]Conditions
+mapType=granular
func (ConditionMap) DeepCopy ¶ added in v1.3.0
func (in ConditionMap) DeepCopy() ConditionMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionMap.
func (ConditionMap) DeepCopyInto ¶ added in v1.3.0
func (in ConditionMap) DeepCopyInto(out *ConditionMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Conditions ¶ added in v1.3.0
+listType=map +listMapKey=type
func (Conditions) DeepCopy ¶ added in v1.3.0
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶ added in v1.3.0
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnforcingCRD ¶
type EnforcingCRD struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EnforcingCRDSpec `json:"spec,omitempty"` Status EnforcingCRDStatus `json:"status,omitempty"` }
EnforcingCRD is the Schema for the enforcingcrds API
func (*EnforcingCRD) DeepCopy ¶
func (in *EnforcingCRD) DeepCopy() *EnforcingCRD
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingCRD.
func (*EnforcingCRD) DeepCopyInto ¶
func (in *EnforcingCRD) DeepCopyInto(out *EnforcingCRD)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnforcingCRD) DeepCopyObject ¶
func (in *EnforcingCRD) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EnforcingCRD) GetEnforcingReconcileStatus ¶
func (m *EnforcingCRD) GetEnforcingReconcileStatus() EnforcingReconcileStatus
func (*EnforcingCRD) SetEnforcingReconcileStatus ¶
func (m *EnforcingCRD) SetEnforcingReconcileStatus(reconcileStatus EnforcingReconcileStatus)
type EnforcingCRDList ¶
type EnforcingCRDList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []EnforcingCRD `json:"items"` }
EnforcingCRDList contains a list of EnforcingCRD
func (*EnforcingCRDList) DeepCopy ¶
func (in *EnforcingCRDList) DeepCopy() *EnforcingCRDList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingCRDList.
func (*EnforcingCRDList) DeepCopyInto ¶
func (in *EnforcingCRDList) DeepCopyInto(out *EnforcingCRDList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnforcingCRDList) DeepCopyObject ¶
func (in *EnforcingCRDList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EnforcingCRDSpec ¶
type EnforcingCRDSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html // Resources is a list of resource manifests that should be locked into the specified configuration // +kubebuilder:validation:Optional // +listType=atomic Resources []LockedResource `json:"resources,omitempty"` }
EnforcingCRDSpec defines the desired state of EnforcingCRD
func (*EnforcingCRDSpec) DeepCopy ¶
func (in *EnforcingCRDSpec) DeepCopy() *EnforcingCRDSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingCRDSpec.
func (*EnforcingCRDSpec) DeepCopyInto ¶
func (in *EnforcingCRDSpec) DeepCopyInto(out *EnforcingCRDSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnforcingCRDStatus ¶
type EnforcingCRDStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html // +kubebuilder:validation:Optional EnforcingReconcileStatus `json:",inline,omitempty"` }
EnforcingCRDStatus defines the observed state of EnforcingCRD
func (*EnforcingCRDStatus) DeepCopy ¶
func (in *EnforcingCRDStatus) DeepCopy() *EnforcingCRDStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingCRDStatus.
func (*EnforcingCRDStatus) DeepCopyInto ¶
func (in *EnforcingCRDStatus) DeepCopyInto(out *EnforcingCRDStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnforcingPatch ¶
type EnforcingPatch struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EnforcingPatchSpec `json:"spec,omitempty"` Status EnforcingPatchStatus `json:"status,omitempty"` }
EnforcingPatch is the Schema for the enforcingpatches API
func (*EnforcingPatch) DeepCopy ¶
func (in *EnforcingPatch) DeepCopy() *EnforcingPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingPatch.
func (*EnforcingPatch) DeepCopyInto ¶
func (in *EnforcingPatch) DeepCopyInto(out *EnforcingPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnforcingPatch) DeepCopyObject ¶
func (in *EnforcingPatch) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EnforcingPatch) GetEnforcingReconcileStatus ¶
func (m *EnforcingPatch) GetEnforcingReconcileStatus() EnforcingReconcileStatus
func (*EnforcingPatch) SetEnforcingReconcileStatus ¶
func (m *EnforcingPatch) SetEnforcingReconcileStatus(reconcileStatus EnforcingReconcileStatus)
type EnforcingPatchList ¶
type EnforcingPatchList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []EnforcingPatch `json:"items"` }
EnforcingPatchList contains a list of EnforcingPatch
func (*EnforcingPatchList) DeepCopy ¶
func (in *EnforcingPatchList) DeepCopy() *EnforcingPatchList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingPatchList.
func (*EnforcingPatchList) DeepCopyInto ¶
func (in *EnforcingPatchList) DeepCopyInto(out *EnforcingPatchList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnforcingPatchList) DeepCopyObject ¶
func (in *EnforcingPatchList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EnforcingPatchSpec ¶
type EnforcingPatchSpec struct { // Patches is a list of pacthes that should be encforced at runtime. // +kubebuilder:validation:Optional Patches map[string]PatchSpec `json:"patches,omitempty"` }
EnforcingPatchSpec defines the desired state of EnforcingPatch
func (*EnforcingPatchSpec) DeepCopy ¶
func (in *EnforcingPatchSpec) DeepCopy() *EnforcingPatchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingPatchSpec.
func (*EnforcingPatchSpec) DeepCopyInto ¶
func (in *EnforcingPatchSpec) DeepCopyInto(out *EnforcingPatchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnforcingPatchStatus ¶
type EnforcingPatchStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html EnforcingReconcileStatus `json:",inline,omitempty"` }
EnforcingPatchStatus defines the observed state of EnforcingPatch
func (*EnforcingPatchStatus) DeepCopy ¶
func (in *EnforcingPatchStatus) DeepCopy() *EnforcingPatchStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingPatchStatus.
func (*EnforcingPatchStatus) DeepCopyInto ¶
func (in *EnforcingPatchStatus) DeepCopyInto(out *EnforcingPatchStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnforcingReconcileStatus ¶ added in v1.3.0
type EnforcingReconcileStatus struct { // ReconcileStatus this is the general status of the main reconciler // +kubebuilder:validation:Optional // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` //LockedResourceStatuses contains the reconcile status for each of the managed resources // +kubebuilder:validation:Optional LockedResourceStatuses map[string]Conditions `json:"lockedResourceStatuses,omitempty"` //LockedResourceStatuses contains the reconcile status for each of the managed resources // +kubebuilder:validation:Optional LockedPatchStatuses map[string]ConditionMap `json:"lockedPatchStatuses,omitempty"` }
EnforcingReconcileStatus represents the status of the last reconcile cycle. It's used to communicate success or failure and the error message
func (*EnforcingReconcileStatus) DeepCopy ¶ added in v1.3.0
func (in *EnforcingReconcileStatus) DeepCopy() *EnforcingReconcileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnforcingReconcileStatus.
func (*EnforcingReconcileStatus) DeepCopyInto ¶ added in v1.3.0
func (in *EnforcingReconcileStatus) DeepCopyInto(out *EnforcingReconcileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnforcingReconcileStatusAware ¶ added in v1.3.0
type EnforcingReconcileStatusAware interface { GetEnforcingReconcileStatus() EnforcingReconcileStatus SetEnforcingReconcileStatus(enforcingReconcileStatus EnforcingReconcileStatus) }
EnforcingReconcileStatusAware is an interfce that must be implemented by a CRD type that has been enabled with ReconcileStatus, it can then benefit of a series of utility methods. +kubebuilder:object:generate:=false
type LockedResource ¶ added in v1.3.0
type LockedResource struct { // Object is a yaml representation of an API resource // +kubebuilder:validation:Required Object runtime.RawExtension `json:"object"` // ExludedPaths are a set of json paths that need not be considered by the LockedResourceReconciler // +kubebuilder:validation:Optional // +listType=set ExcludedPaths []string `json:"excludedPaths,omitempty"` }
LockedResource represents a resource to be enforced in a LockedResourceController and can be used in a API specification +k8s:openapi-gen=true
func (*LockedResource) DeepCopy ¶ added in v1.3.0
func (in *LockedResource) DeepCopy() *LockedResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LockedResource.
func (*LockedResource) DeepCopyInto ¶ added in v1.3.0
func (in *LockedResource) DeepCopyInto(out *LockedResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LockedResourceTemplate ¶ added in v1.3.0
type LockedResourceTemplate struct { // ObjectTemplate is a goland template. Whne processed, it must resolve to a yaml representation of an API resource // +kubebuilder:validation:Required ObjectTemplate string `json:"objectTemplate"` // ExludedPaths are a set of json paths that need not be considered by the LockedResourceReconciler // +kubebuilder:validation:Optional // +listType=set ExcludedPaths []string `json:"excludedPaths,omitempty"` }
LockedResourceTemplate represents a resource template in go language to be enforced in a LockedResourceController and can be used in a API specification +k8s:openapi-gen=true
func (*LockedResourceTemplate) DeepCopy ¶ added in v1.3.0
func (in *LockedResourceTemplate) DeepCopy() *LockedResourceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LockedResourceTemplate.
func (*LockedResourceTemplate) DeepCopyInto ¶ added in v1.3.0
func (in *LockedResourceTemplate) DeepCopyInto(out *LockedResourceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MyCRD ¶
type MyCRD struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MyCRDSpec `json:"spec,omitempty"` Status MyCRDStatus `json:"status,omitempty"` }
MyCRD is the Schema for the mycrds API
func (*MyCRD) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyCRD.
func (*MyCRD) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MyCRD) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MyCRD) GetConditions ¶
func (*MyCRD) SetConditions ¶
type MyCRDList ¶
type MyCRDList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MyCRD `json:"items"` }
MyCRDList contains a list of MyCRD
func (*MyCRDList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyCRDList.
func (*MyCRDList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MyCRDList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MyCRDSpec ¶
type MyCRDSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html Initialized bool `json:"initialized"` Valid bool `json:"valid"` Error bool `json:"error"` }
MyCRDSpec defines the desired state of MyCRD
func (*MyCRDSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyCRDSpec.
func (*MyCRDSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MyCRDStatus ¶
type MyCRDStatus struct { // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
MyCRDStatus defines the observed state of MyCRD
func (*MyCRDStatus) DeepCopy ¶
func (in *MyCRDStatus) DeepCopy() *MyCRDStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyCRDStatus.
func (*MyCRDStatus) DeepCopyInto ¶
func (in *MyCRDStatus) DeepCopyInto(out *MyCRDStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PatchSpec ¶ added in v1.3.1
type PatchSpec struct { // SourceObjectRefs is an arrays of refereces to source objects that will be used as input for the template processing. These refernces must resolve to single instance. The resolution rule is as follows (+ present, - absent): // the King and APIVersion field are mandatory // +Namespace +Name: resolves to object <Namespace>/<Name> // +Namespace -Name: results in an error // -Namespace +Name: resolves to cluster-level object <Name>. If Kind is namespaced, this results in an error. // -Namespace -Name: results in an error // Name manespaces Namespace are evaluated as golang templates with the input of the template being the target object. When selecting multiple target, this allows for having specific source objects for each target. // ResourceVersion and UID are always ignored // If FieldPath is specified, the restuned object is calculated from the path, so for example if FieldPath=.spec, the only the spec portion of the object is returned. // The target object is always added as element zero of the array of the SourceObjectRefs // +kubebuilder:validation:Optional // +listType=atomic SourceObjectRefs []SourceObjectReference `json:"sourceObjectRefs,omitempty"` // TargetObjectRef is a reference to the object to which the pacth should be applied. // the King and APIVersion field are mandatory // the Name and Namespace field have the following meaning (+ present, - absent) // +Namespace +Name: apply the patch to the object: <Namespace>/<Name> // +Namespace -Name: apply the patch to all of the objects in <Namespace> // -Namespace +Name: apply the patch to the cluster-level object <Name>. If Kind is namespaced, this results in an error. // -Namespace -Name: if the kind is namespaced apply the patch to all of the objects in all of the namespaces. If the kind is not namespaced, apply the patch to all of the cluster level objects. // The lable selector can be used to further filter the selected objects. // +kubebuilder:validation:Required TargetObjectRef TargetObjectReference `json:"targetObjectRef,omitempty"` // PatchType is the type of patch to be applied, one of "application/json-patch+json"'"application/merge-patch+json","application/strategic-merge-patch+json","application/apply-patch+yaml" // +kubebuilder:validation:Required // +kubebuilder:validation:Enum="application/json-patch+json";"application/merge-patch+json";"application/strategic-merge-patch+json";"application/apply-patch+yaml" // default:="application/strategic-merge-patch+json" PatchType types.PatchType `json:"patchType,omitempty"` // PatchTemplate is a go template that will be resolved using the SourceObjectRefs as parameters. The result must be a valid patch based on the pacth type and the target object. // +kubebuilder:validation:Required PatchTemplate string `json:"patchTemplate,omitempty"` }
Patch describes a patch to be enforced at runtime +k8s:openapi-gen=true
func (*PatchSpec) DeepCopy ¶ added in v1.3.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchSpec.
func (*PatchSpec) DeepCopyInto ¶ added in v1.3.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SourceObjectReference ¶ added in v1.3.0
type SourceObjectReference struct { // API version of the referent. // +kubebuilder:validation:Required APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` // Kind of the referent. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +kubebuilder:validation:Required Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` // Namespace of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ // +kubebuilder:validation:Optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +kubebuilder:validation:Optional Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` // If referring to a piece of an object instead of an entire object, this string // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. // For example, if the object reference is to a container within a pod, this would take on a value like: // "spec.containers{name}" (where "name" refers to the name of the container that triggered // the event) or if no container name is specified "spec.containers[2]" (container with // index 2 in this pod). This syntax is chosen only to have some well-defined way of // referencing a part of an object. // +kubebuilder:validation:Optional FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,7,opt,name=fieldPath"` // contains filtered or unexported fields }
func (*SourceObjectReference) DeepCopy ¶ added in v1.3.0
func (in *SourceObjectReference) DeepCopy() *SourceObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceObjectReference.
func (*SourceObjectReference) DeepCopyInto ¶ added in v1.3.0
func (in *SourceObjectReference) DeepCopyInto(out *SourceObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SourceObjectReference) GetNameAndNamespace ¶ added in v1.3.0
func (s *SourceObjectReference) GetNameAndNamespace(context context.Context, target *unstructured.Unstructured) (name string, namespace string, err error)
GetNameAndNamespace processes the templates for Name and Namespace of the sourceObjectReference requires context with log and restConfig
func (*SourceObjectReference) GetReferencedObject ¶ added in v1.3.0
func (s *SourceObjectReference) GetReferencedObject(context context.Context, target *unstructured.Unstructured) (*unstructured.Unstructured, error)
type TargetObjectReference ¶ added in v1.3.0
type TargetObjectReference struct { // API version of the referent. // +kubebuilder:validation:Required APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` // Kind of the referent. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +kubebuilder:validation:Required Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` // Namespace of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ // +kubebuilder:validation:Optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +kubebuilder:validation:Optional Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` // LabelSelector selects objects by label // +kubebuilder:validation:Optional LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` // AnnotationSelector selects objects by label AnnotationSelector *metav1.LabelSelector `json:"annotationSelector,omitempty"` // contains filtered or unexported fields }
func (*TargetObjectReference) DeepCopy ¶ added in v1.3.0
func (in *TargetObjectReference) DeepCopy() *TargetObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetObjectReference.
func (*TargetObjectReference) DeepCopyInto ¶ added in v1.3.0
func (in *TargetObjectReference) DeepCopyInto(out *TargetObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TargetObjectReference) GetReferencedObject ¶ added in v1.3.0
func (t *TargetObjectReference) GetReferencedObject(context context.Context) (*unstructured.Unstructured, error)
func (*TargetObjectReference) GetReferencedObjectWithName ¶ added in v1.3.0
func (t *TargetObjectReference) GetReferencedObjectWithName(context context.Context, namespacedName types.NamespacedName) (*unstructured.Unstructured, error)
func (*TargetObjectReference) GetReferencedObjects ¶ added in v1.3.0
func (t *TargetObjectReference) GetReferencedObjects(context context.Context) ([]unstructured.Unstructured, error)
func (*TargetObjectReference) IsNamespaced ¶ added in v1.3.0
func (t *TargetObjectReference) IsNamespaced(context context.Context) (bool, error)
func (*TargetObjectReference) IsSelectingMultipleInstances ¶ added in v1.3.0
func (t *TargetObjectReference) IsSelectingMultipleInstances(context context.Context) (multiple bool, namespacedSelection bool, err error)
IsSelectingMultipleInstances is a helper function to determine whether this targetObjectReference selects one or multiple instance.
type TemplatedEnforcingCRD ¶
type TemplatedEnforcingCRD struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TemplatedEnforcingCRDSpec `json:"spec,omitempty"` Status TemplatedEnforcingCRDStatus `json:"status,omitempty"` }
TemplatedEnforcingCRD is the Schema for the templatedenforcingcrds API
func (*TemplatedEnforcingCRD) DeepCopy ¶
func (in *TemplatedEnforcingCRD) DeepCopy() *TemplatedEnforcingCRD
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplatedEnforcingCRD.
func (*TemplatedEnforcingCRD) DeepCopyInto ¶
func (in *TemplatedEnforcingCRD) DeepCopyInto(out *TemplatedEnforcingCRD)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemplatedEnforcingCRD) DeepCopyObject ¶
func (in *TemplatedEnforcingCRD) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TemplatedEnforcingCRD) GetEnforcingReconcileStatus ¶
func (m *TemplatedEnforcingCRD) GetEnforcingReconcileStatus() EnforcingReconcileStatus
func (*TemplatedEnforcingCRD) SetEnforcingReconcileStatus ¶
func (m *TemplatedEnforcingCRD) SetEnforcingReconcileStatus(reconcileStatus EnforcingReconcileStatus)
type TemplatedEnforcingCRDList ¶
type TemplatedEnforcingCRDList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TemplatedEnforcingCRD `json:"items"` }
TemplatedEnforcingCRDList contains a list of TemplatedEnforcingCRD
func (*TemplatedEnforcingCRDList) DeepCopy ¶
func (in *TemplatedEnforcingCRDList) DeepCopy() *TemplatedEnforcingCRDList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplatedEnforcingCRDList.
func (*TemplatedEnforcingCRDList) DeepCopyInto ¶
func (in *TemplatedEnforcingCRDList) DeepCopyInto(out *TemplatedEnforcingCRDList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemplatedEnforcingCRDList) DeepCopyObject ¶
func (in *TemplatedEnforcingCRDList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TemplatedEnforcingCRDSpec ¶
type TemplatedEnforcingCRDSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html // +kubebuilder:validation:Optional // +listType=atomic Templates []LockedResourceTemplate `json:"templates,omitempty"` }
TemplatedEnforcingCRDSpec defines the desired state of TemplatedEnforcingCRD
func (*TemplatedEnforcingCRDSpec) DeepCopy ¶
func (in *TemplatedEnforcingCRDSpec) DeepCopy() *TemplatedEnforcingCRDSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplatedEnforcingCRDSpec.
func (*TemplatedEnforcingCRDSpec) DeepCopyInto ¶
func (in *TemplatedEnforcingCRDSpec) DeepCopyInto(out *TemplatedEnforcingCRDSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplatedEnforcingCRDStatus ¶
type TemplatedEnforcingCRDStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html // +kubebuilder:validation:Optional EnforcingReconcileStatus `json:",inline,omitempty"` }
TemplatedEnforcingCRDStatus defines the observed state of TemplatedEnforcingCRD
func (*TemplatedEnforcingCRDStatus) DeepCopy ¶
func (in *TemplatedEnforcingCRDStatus) DeepCopy() *TemplatedEnforcingCRDStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplatedEnforcingCRDStatus.
func (*TemplatedEnforcingCRDStatus) DeepCopyInto ¶
func (in *TemplatedEnforcingCRDStatus) DeepCopyInto(out *TemplatedEnforcingCRDStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.