Documentation ¶
Index ¶
- Variables
- func EnvFromConfigMapsOrSecrets(data map[string]any) env.Environment
- func ResourceStatusToResponse(state *ResourceStatus) gin.H
- func Transcode[T any](value any) (T, error)
- type AnnotationSelector
- type ChildUpdateMethod
- type ChildUpdateStatusChecks
- type CompositeController
- type CompositeControllerChildResourceRule
- type CompositeControllerChildUpdateStrategy
- type CompositeControllerHooks
- type CompositeControllerList
- type CompositeControllerParentResourceRule
- type CompositeControllerRevisionHistory
- type CompositeControllerSpec
- type CompositeControllerStatus
- type ControllerRevision
- type ControllerRevisionChildren
- type ControllerRevisionList
- type CustomizableController
- type CustomizeHookRequest
- type CustomizeHookResponse
- type DecoratorController
- type DecoratorControllerAttachmentRule
- type DecoratorControllerAttachmentUpdateStrategy
- type DecoratorControllerHooks
- type DecoratorControllerList
- type DecoratorControllerResourceRule
- type DecoratorControllerSpec
- type DecoratorControllerStatus
- type Hook
- type HookVersion
- type RelatedResource
- type RelatedResourceRule
- type ResourceRule
- type ResourceStatus
- type ResponseUnmarshallMode
- type ServiceReference
- type Status
- type StatusConditionCheck
- type Webhook
- type WebhookEtagConfig
Constants ¶
This section is empty.
Variables ¶
var ( // RefResource creates a tuple describing a related resource RefResource = T.MakeTuple3[string, string, *metav1.LabelSelector] // CreateRelatedResourceRules constructs an array of related resources and filter out thoe that do not have a selector CreateRelatedResourceRules = F.Flow2( A.Filter(isValidRelatedResource), A.Map(createRelatedResourceRule), ) )
Functions ¶
func EnvFromConfigMapsOrSecrets ¶ added in v0.0.4
func EnvFromConfigMapsOrSecrets(data map[string]any) env.Environment
EnvFromConfigMapsOrSecrets merges all config maps into one
func ResourceStatusToResponse ¶
func ResourceStatusToResponse(state *ResourceStatus) gin.H
Types ¶
type AnnotationSelector ¶
type AnnotationSelector struct { MatchAnnotations map[string]string `json:"matchAnnotations,omitempty"` MatchExpressions []metav1.LabelSelectorRequirement `json:"matchExpressions,omitempty"` }
type ChildUpdateMethod ¶
type ChildUpdateMethod string
+kubebuilder:validation:Enum={"OnDelete","Recreate","InPlace","RollingRecreate","RollingInPlace"}
const ( ChildUpdateOnDelete ChildUpdateMethod = "OnDelete" ChildUpdateRecreate ChildUpdateMethod = "Recreate" ChildUpdateInPlace ChildUpdateMethod = "InPlace" ChildUpdateRollingRecreate ChildUpdateMethod = "RollingRecreate" ChildUpdateRollingInPlace ChildUpdateMethod = "RollingInPlace" )
type ChildUpdateStatusChecks ¶
type ChildUpdateStatusChecks struct {
Conditions []StatusConditionCheck `json:"conditions,omitempty"`
}
type CompositeController ¶
type CompositeController struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec CompositeControllerSpec `json:"spec"` Status CompositeControllerStatus `json:"status,omitempty"` }
CompositeController +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:resource:path=compositecontrollers,scope=Cluster,shortName=cc;cctl
func (*CompositeController) GetCustomizeHook ¶
func (cc *CompositeController) GetCustomizeHook() *Hook
type CompositeControllerChildResourceRule ¶
type CompositeControllerChildResourceRule struct { ResourceRule `json:",inline"` UpdateStrategy *CompositeControllerChildUpdateStrategy `json:"updateStrategy,omitempty"` }
type CompositeControllerChildUpdateStrategy ¶
type CompositeControllerChildUpdateStrategy struct { Method ChildUpdateMethod `json:"method,omitempty"` StatusChecks ChildUpdateStatusChecks `json:"statusChecks,omitempty"` }
type CompositeControllerList ¶
type CompositeControllerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []CompositeController `json:"items"` }
CompositeControllerList +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type CompositeControllerParentResourceRule ¶
type CompositeControllerParentResourceRule struct { ResourceRule `json:",inline"` RevisionHistory *CompositeControllerRevisionHistory `json:"revisionHistory,omitempty"` LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` }
type CompositeControllerRevisionHistory ¶
type CompositeControllerRevisionHistory struct {
FieldPaths []string `json:"fieldPaths,omitempty"`
}
type CompositeControllerSpec ¶
type CompositeControllerSpec struct { ParentResource CompositeControllerParentResourceRule `json:"parentResource"` ChildResources []CompositeControllerChildResourceRule `json:"childResources,omitempty"` Hooks *CompositeControllerHooks `json:"hooks,omitempty"` ResyncPeriodSeconds *int32 `json:"resyncPeriodSeconds,omitempty"` GenerateSelector *bool `json:"generateSelector,omitempty"` }
type CompositeControllerStatus ¶
type CompositeControllerStatus struct{}
type ControllerRevision ¶
type ControllerRevision struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` ParentPatch runtime.RawExtension `json:"parentPatch"` Children []ControllerRevisionChildren `json:"children,omitempty"` }
ControllerRevision +genclient +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:resource:path=controllerrevisions,scope=Namespaced
type ControllerRevisionList ¶
type ControllerRevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []ControllerRevision `json:"items"` }
ControllerRevisionList +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type CustomizableController ¶
type CustomizableController interface { // GetCustomizeHook return v1alpha1.Hook or nil if not defined GetCustomizeHook() *Hook }
CustomizableController is an interface representing Controller exposing customize hook
type CustomizeHookRequest ¶
type CustomizeHookRequest struct { Controller CustomizableController `json:"controller"` Parent *unstructured.Unstructured `json:"parent"` }
CustomizeHookRequest is a request send to customize hook
type CustomizeHookResponse ¶
type CustomizeHookResponse struct {
RelatedResourceRules []*RelatedResourceRule `json:"relatedResources,omitempty"`
}
CustomizeHookResponse is a response from customize hook
type DecoratorController ¶
type DecoratorController struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec DecoratorControllerSpec `json:"spec"` Status DecoratorControllerStatus `json:"status,omitempty"` }
DecoratorController +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:resource:path=decoratorcontrollers,scope=Cluster,shortName=dec;decorators
func (*DecoratorController) GetCustomizeHook ¶
func (dc *DecoratorController) GetCustomizeHook() *Hook
type DecoratorControllerAttachmentRule ¶
type DecoratorControllerAttachmentRule struct { ResourceRule `json:",inline"` UpdateStrategy *DecoratorControllerAttachmentUpdateStrategy `json:"updateStrategy,omitempty"` }
type DecoratorControllerAttachmentUpdateStrategy ¶
type DecoratorControllerAttachmentUpdateStrategy struct {
Method ChildUpdateMethod `json:"method,omitempty"`
}
type DecoratorControllerList ¶
type DecoratorControllerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []DecoratorController `json:"items"` }
DecoratorControllerList +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type DecoratorControllerResourceRule ¶
type DecoratorControllerResourceRule struct { ResourceRule `json:",inline"` LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` AnnotationSelector *AnnotationSelector `json:"annotationSelector,omitempty"` }
type DecoratorControllerSpec ¶
type DecoratorControllerSpec struct { Resources []DecoratorControllerResourceRule `json:"resources"` Attachments []DecoratorControllerAttachmentRule `json:"attachments,omitempty"` Hooks *DecoratorControllerHooks `json:"hooks,omitempty"` ResyncPeriodSeconds *int32 `json:"resyncPeriodSeconds,omitempty"` }
type DecoratorControllerStatus ¶
type DecoratorControllerStatus struct{}
type Hook ¶
type Hook struct { // +kubebuilder:default:="v1" Version *HookVersion `json:"version,omitempty"` Webhook *Webhook `json:"webhook,omitempty"` }
type HookVersion ¶
type HookVersion string
+kubebuilder:validation:Enum={"v1","v2"}
const ( HookVersionV1 HookVersion = "v1" HookVersionV2 HookVersion = "v2" )
type RelatedResource ¶ added in v0.0.19
version, name selector
func RefConfigMaps ¶ added in v0.0.19
func RefConfigMaps(labels *metav1.LabelSelector) RelatedResource
RefConfigMaps references a config map as related resource
func RefSecrets ¶ added in v0.0.19
func RefSecrets(labels *metav1.LabelSelector) RelatedResource
RefSecrets references a secret as related resource
type RelatedResourceRule ¶
type RelatedResourceRule struct { ResourceRule `json:",inline"` *metav1.LabelSelector `json:"labelSelector"` Namespace string `json:"namespace,omitempty"` Names []string `json:"names"` }
type ResourceRule ¶
type ResourceStatus ¶
func CreateAction ¶ added in v0.1.22
func CreateAction(status *ResourceStatus) (*ResourceStatus, error)
func CreateErrorAction ¶
func CreateErrorAction(err error) (*ResourceStatus, error)
func CreateReadyAction ¶
func CreateReadyAction() (*ResourceStatus, error)
func CreateStatusAction ¶
func CreateStatusAction(status Status) (*ResourceStatus, error)
func CreateWaitingAction ¶
func CreateWaitingAction() (*ResourceStatus, error)
type ResponseUnmarshallMode ¶
type ResponseUnmarshallMode string
+kubebuilder:validation:Enum:={"loose","strict"}
const ( ResponseUnmarshallModeLoose ResponseUnmarshallMode = "loose" ResponseUnmarshallModeStrict ResponseUnmarshallMode = "strict" )
type ServiceReference ¶
type StatusConditionCheck ¶
type Webhook ¶
type Webhook struct { URL *string `json:"url,omitempty"` // +kubebuilder:validation:Format:="duration" Timeout *metav1.Duration `json:"timeout,omitempty"` Etag *WebhookEtagConfig `json:"etag,omitempty"` Path *string `json:"path,omitempty"` Service *ServiceReference `json:"service,omitempty"` // Sets the json unmarshall mode. One of the 'loose' or 'strict'. In 'strict' // mode additional checks are performed to detect unknown and duplicated fields. ResponseUnmarshallMode *ResponseUnmarshallMode `json:"responseUnMarshallMode,omitempty"` }