v1alpha1

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:deepcopy-gen=package +groupName=sources.knative.dev

Index

Constants

View Source
const (
	// RedisStreamConditionReady has status True when the RedisStreamSource is ready to send events.
	RedisStreamConditionReady = apis.ConditionReady

	// RedisStreamConditionSinkProvided has status True when the RedisStreamSource has been configured with a sink target.
	RedisStreamConditionSinkProvided apis.ConditionType = "SinkProvided"

	// RedisStreamConditionDeployed has status True when the RedisStreamSource has had it's statefulset created.
	RedisStreamConditionDeployed apis.ConditionType = "Deployed"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: sources.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type RedisConnection

type RedisConnection struct {
	// Address is the Redis TCP address
	Address string `json:"address"`

	// Options are the connection options
	// +optional
	Options *RedisConnectionOptions `json:"dialOptions,omitempty"`
}

RedisConnection defines the address and options to connect to a Redis instance

func (*RedisConnection) DeepCopy

func (in *RedisConnection) DeepCopy() *RedisConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisConnection.

func (*RedisConnection) DeepCopyInto

func (in *RedisConnection) DeepCopyInto(out *RedisConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisConnectionOptions

type RedisConnectionOptions struct {
	// Password to use for connecting to Redis
	// +optional
	Password corev1.ObjectReference `json:"password,omitempty"`

	// UseTLS indicates whether to use TLS or not
	// +optional
	UseTLS bool `json:"useTLS,omitempty"`

	// SkipVerify indicates whether to skip TLS verification or not
	// +optional
	SkipVerify bool `json:"skipVerify,omitempty"`

	// Cert is the Kubernetes secret containing the client certificate.
	// +optional
	Cert RedisSecretValueFromSource `json:"cert,omitempty"`

	// Key is the Kubernetes secret containing the client key.
	// +optional
	Key RedisSecretValueFromSource `json:"key,omitempty"`

	// CACert is the Kubernetes secret containing the server CA cert.
	// +optional
	CACert RedisSecretValueFromSource `json:"caCert,omitempty"`
}

RedisConnection defines the desired state of the RedisStreamSource.

func (*RedisConnectionOptions) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisConnectionOptions.

func (*RedisConnectionOptions) DeepCopyInto

func (in *RedisConnectionOptions) DeepCopyInto(out *RedisConnectionOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisSecretValueFromSource

type RedisSecretValueFromSource struct {
	// The Secret key to select from.
	SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
}

RedisSecretValueFromSource represents the source of a secret value

func (*RedisSecretValueFromSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSecretValueFromSource.

func (*RedisSecretValueFromSource) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisStreamSource

type RedisStreamSource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RedisStreamSourceSpec   `json:"spec,omitempty"`
	Status RedisStreamSourceStatus `json:"status,omitempty"`
}

RedisStreamSource is the Schema for the RedisStream API.

func (*RedisStreamSource) DeepCopy

func (in *RedisStreamSource) DeepCopy() *RedisStreamSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisStreamSource.

func (*RedisStreamSource) DeepCopyInto

func (in *RedisStreamSource) DeepCopyInto(out *RedisStreamSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RedisStreamSource) DeepCopyObject

func (in *RedisStreamSource) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RedisStreamSource) GetConditionSet

func (*RedisStreamSource) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*RedisStreamSource) GetGroupVersionKind

func (s *RedisStreamSource) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*RedisStreamSource) GetStatus

func (p *RedisStreamSource) GetStatus() *duckv1.Status

GetStatus retrieves the status of the RedisStreamSource. Implements the KRShaped interface.

func (*RedisStreamSource) GetUntypedSpec

func (s *RedisStreamSource) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the RedisStreamSource.

type RedisStreamSourceList

type RedisStreamSourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RedisStreamSource `json:"items"`
}

RedisStreamSourceList contains a list of RedisStreamSources.

func (*RedisStreamSourceList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisStreamSourceList.

func (*RedisStreamSourceList) DeepCopyInto

func (in *RedisStreamSourceList) DeepCopyInto(out *RedisStreamSourceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RedisStreamSourceList) DeepCopyObject

func (in *RedisStreamSourceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RedisStreamSourceSpec

type RedisStreamSourceSpec 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"`

	// RedisConnection represents the address and options to connect
	// to a Redis instance
	RedisConnection `json:",inline"`

	// Stream is the name of the stream.
	Stream string `json:"stream"`

	// Group is the name of the consumer group associated to this source.
	// When left empty, a group is automatically created for this source and
	// deleted when this source is deleted.
	// +optional
	Group string `json:"group,omitempty"`

	// Number of desired consumers running in the consumer group. Defaults to 1.
	//
	// This is a pointer to distinguish between explicit
	// zero and not specified.
	// +optional
	Consumers *int32 `json:"consumers,omitempty"`
}

RedisStreamSourceSpec defines the desired state of the RedisStreamSource.

func (*RedisStreamSourceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisStreamSourceSpec.

func (*RedisStreamSourceSpec) DeepCopyInto

func (in *RedisStreamSourceSpec) DeepCopyInto(out *RedisStreamSourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RedisStreamSourceStatus

type RedisStreamSourceStatus 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"`

	// Total number of consumers actually running in the consumer group.
	// +optional
	Consumers int32 `json:"consumers,omitempty"`
}

RedisStreamSourceStatus defines the observed state of RedisStreamSource.

func (*RedisStreamSourceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisStreamSourceStatus.

func (*RedisStreamSourceStatus) DeepCopyInto

func (in *RedisStreamSourceStatus) DeepCopyInto(out *RedisStreamSourceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RedisStreamSourceStatus) GetCondition

GetCondition returns the condition currently associated with the given type, or nil.

func (*RedisStreamSourceStatus) GetTopLevelCondition

func (s *RedisStreamSourceStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level condition.

func (*RedisStreamSourceStatus) InitializeConditions

func (s *RedisStreamSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*RedisStreamSourceStatus) IsReady

func (s *RedisStreamSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*RedisStreamSourceStatus) MarkNoRoleBinding

func (s *RedisStreamSourceStatus) MarkNoRoleBinding(reason string)

MarkNoRoleBinding sets the annotation that the source does not have a role binding

func (*RedisStreamSourceStatus) MarkNoServiceAccount

func (s *RedisStreamSourceStatus) MarkNoServiceAccount(reason string)

MarkNoServiceAccount sets the annotation that the source does not have a service account

func (*RedisStreamSourceStatus) MarkNoSink

func (s *RedisStreamSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})

MarkNoSink sets the condition that the source does not have a sink configured.

func (*RedisStreamSourceStatus) MarkRoleBinding

func (s *RedisStreamSourceStatus) MarkRoleBinding()

MarkRoleBinding sets the annotation that the source has a role binding

func (*RedisStreamSourceStatus) MarkServiceAccount

func (s *RedisStreamSourceStatus) MarkServiceAccount()

MarkRoleBinding sets the annotation that the source has a service account

func (*RedisStreamSourceStatus) MarkSink

func (s *RedisStreamSourceStatus) MarkSink(uri string)

MarkSink sets the condition that the source has a sink configured.

func (*RedisStreamSourceStatus) PropagateStatefulSetAvailability

func (s *RedisStreamSourceStatus) PropagateStatefulSetAvailability(d *appsv1.StatefulSet)

PropagateStatefulSetAvailability uses the availability of the provided StatefulSet to determine if RedisStreamConditionDeployed should be marked as true or false.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL