Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +groupName=kogito.knative.dev
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type KogitoSource
- func (in *KogitoSource) DeepCopy() *KogitoSource
- func (in *KogitoSource) DeepCopyInto(out *KogitoSource)
- func (in *KogitoSource) DeepCopyObject() runtime.Object
- func (ks *KogitoSource) Do(ctx context.Context, pod *duckv1.WithPod)
- func (ks *KogitoSource) GetBindingStatus() duckapi.BindableStatus
- func (*KogitoSource) GetConditionSet() apis.ConditionSet
- func (*KogitoSource) GetGroupVersionKind() schema.GroupVersionKind
- func (ss *KogitoSource) GetStatus() *duckv1.Status
- func (ks *KogitoSource) GetSubject() tracker.Reference
- func (s *KogitoSource) SetDefaults(ctx context.Context)
- func (ks *KogitoSource) Undo(ctx context.Context, pod *duckv1.WithPod)
- func (s *KogitoSource) Validate(ctx context.Context) *apis.FieldError
- type KogitoSourceList
- type KogitoSourceSpec
- type KogitoSourceStatus
- func (in *KogitoSourceStatus) DeepCopy() *KogitoSourceStatus
- func (in *KogitoSourceStatus) DeepCopyInto(out *KogitoSourceStatus)
- func (s *KogitoSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (s *KogitoSourceStatus) InitializeConditions()
- func (s *KogitoSourceStatus) IsReady() bool
- func (sbs *KogitoSourceStatus) MarkBindingAvailable()
- func (sbs *KogitoSourceStatus) MarkBindingUnavailable(reason, message string)
- func (s *KogitoSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})
- func (s *KogitoSourceStatus) MarkSink(uri *apis.URL)
- func (sbs *KogitoSourceStatus) SetObservedGeneration(gen int64)
Constants ¶
const ( // KogitoConditionSinkProvided has status True when the KogitoSource has been configured with a sink target. KogitoConditionSinkProvided apis.ConditionType = "SinkProvided" // KogitoConditionBindingAvailable has status True when the KogitoSource has been configured with a valid Binding target. KogitoConditionBindingAvailable apis.ConditionType = "BindingAvailable" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: kogito.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type KogitoSource ¶
type KogitoSource struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the KogitoSource (from the client). Spec KogitoSourceSpec `json:"spec"` // Status communicates the observed state of the KogitoSource (from the controller). // +optional Status KogitoSourceStatus `json:"status,omitempty"` }
KogitoSource is the representation of a Knative Eventing Source for a Kogito custom Service. +genclient +genreconciler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +operator-sdk:csv:customresourcedefinitions:displayName="Kogito Source",resources={{Trigger,eventing.knative.dev/v1,kogito-service-trigger}, {Service,serving.knative.dev/v1,kogito-service}, {Broker,eventing.knative.dev/v1,default}}
func (*KogitoSource) DeepCopy ¶
func (in *KogitoSource) DeepCopy() *KogitoSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KogitoSource.
func (*KogitoSource) DeepCopyInto ¶
func (in *KogitoSource) DeepCopyInto(out *KogitoSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KogitoSource) DeepCopyObject ¶
func (in *KogitoSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*KogitoSource) Do ¶ added in v0.28.0
func (ks *KogitoSource) Do(ctx context.Context, pod *duckv1.WithPod)
Do reuse the logic from SinkBinding to inject the sink URLs to the target pod
func (*KogitoSource) GetBindingStatus ¶ added in v0.28.0
func (ks *KogitoSource) GetBindingStatus() duckapi.BindableStatus
GetBindingStatus implements psbinding.Bindable
func (*KogitoSource) GetConditionSet ¶
func (*KogitoSource) GetConditionSet() apis.ConditionSet
GetConditionSet returns KogitoSource ConditionSet.
func (*KogitoSource) GetGroupVersionKind ¶
func (*KogitoSource) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*KogitoSource) GetStatus ¶
func (ss *KogitoSource) GetStatus() *duckv1.Status
GetStatus retrieves the status of the resource. Implements the KRShaped interface.
func (*KogitoSource) GetSubject ¶ added in v0.28.0
func (ks *KogitoSource) GetSubject() tracker.Reference
GetSubject implements psbinding.Bindable
func (*KogitoSource) SetDefaults ¶
func (s *KogitoSource) SetDefaults(ctx context.Context)
SetDefaults mutates KogitoSource.
func (*KogitoSource) Undo ¶ added in v0.28.0
func (ks *KogitoSource) Undo(ctx context.Context, pod *duckv1.WithPod)
Undo reuse the logic from SinkBinding to remove the injected environment variables from the target pod
func (*KogitoSource) Validate ¶
func (s *KogitoSource) Validate(ctx context.Context) *apis.FieldError
Validate validates KogitoSource.
type KogitoSourceList ¶
type KogitoSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []KogitoSource `json:"items"` }
KogitoSourceList is a list of KogitoSource resources
func (*KogitoSourceList) DeepCopy ¶
func (in *KogitoSourceList) DeepCopy() *KogitoSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KogitoSourceList.
func (*KogitoSourceList) DeepCopyInto ¶
func (in *KogitoSourceList) DeepCopyInto(out *KogitoSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KogitoSourceList) DeepCopyObject ¶
func (in *KogitoSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KogitoSourceSpec ¶
type KogitoSourceSpec struct { // inherits duck/v1 SourceSpec, which currently provides: // * Sink - a reference to an object that will resolve to a domain name or // a URI directly to use as the sink. // * CloudEventOverrides - defines overrides to control the output format // and modifications of the event sent to the sink. duckv1.SourceSpec `json:",inline"` // ServiceAccountName holds the name of the Kubernetes service account // as which the underlying K8s resources should be run. If unspecified // this will default to the "default" service account for the namespace // in which the KogitoSource exists. // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // inherits duck/v1 BindingSpec, which provides the interface to set a given subject to this KogitoSource // the subject must be a Kogito service with the Kogito Knative Eventing Addon to enable CloudEvents through HTTP. // Since a Kogito service can be deployed in multiple Kubernetes resources kinds (e.g. Deployment, KService), the APIKind and Version are required attributes // See: https://github.com/kiegroup/kogito-runtimes/tree/main/addons/common/knative duckv1.BindingSpec `json:",inline"` }
KogitoSourceSpec holds the desired state of the KogitoSource (from the client).
func (*KogitoSourceSpec) DeepCopy ¶
func (in *KogitoSourceSpec) DeepCopy() *KogitoSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KogitoSourceSpec.
func (*KogitoSourceSpec) DeepCopyInto ¶
func (in *KogitoSourceSpec) DeepCopyInto(out *KogitoSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KogitoSourceSpec) Validate ¶
func (sspec *KogitoSourceSpec) Validate(ctx context.Context) *apis.FieldError
Validate validates KogitoSourceSpec.
type KogitoSourceStatus ¶
type KogitoSourceStatus struct { // inherits duck/v1 SourceStatus, which currently provides: // * ObservedGeneration - the 'Generation' of the Service that was last // processed by the controller. // * Conditions - the latest available observations of a resource's current // state. // * SinkURI - the current active sink URI that has been configured for the // Source. duckv1.SourceStatus `json:",inline"` }
KogitoSourceStatus communicates the observed state of the KogitoSource (from the controller).
func (*KogitoSourceStatus) DeepCopy ¶
func (in *KogitoSourceStatus) DeepCopy() *KogitoSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KogitoSourceStatus.
func (*KogitoSourceStatus) DeepCopyInto ¶
func (in *KogitoSourceStatus) DeepCopyInto(out *KogitoSourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KogitoSourceStatus) GetCondition ¶
func (s *KogitoSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition currently associated with the given type, or nil.
func (*KogitoSourceStatus) InitializeConditions ¶
func (s *KogitoSourceStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*KogitoSourceStatus) IsReady ¶
func (s *KogitoSourceStatus) IsReady() bool
IsReady returns true if the resource is ready overall.
func (*KogitoSourceStatus) MarkBindingAvailable ¶ added in v0.28.0
func (sbs *KogitoSourceStatus) MarkBindingAvailable()
MarkBindingAvailable marks the KogitoSource's Ready condition to True.
func (*KogitoSourceStatus) MarkBindingUnavailable ¶ added in v0.28.0
func (sbs *KogitoSourceStatus) MarkBindingUnavailable(reason, message string)
MarkBindingUnavailable marks the KogitoSource's Ready condition to False with the provided reason and message.
func (*KogitoSourceStatus) MarkNoSink ¶
func (s *KogitoSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})
MarkNoSink sets the condition that the source does not have a sink configured.
func (*KogitoSourceStatus) MarkSink ¶
func (s *KogitoSourceStatus) MarkSink(uri *apis.URL)
MarkSink sets the condition that the source has a sink configured.
func (*KogitoSourceStatus) SetObservedGeneration ¶ added in v0.28.0
func (sbs *KogitoSourceStatus) SetObservedGeneration(gen int64)
SetObservedGeneration implements psbinding.BindableStatus