v1alpha1

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 265

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package +groupName=eventing.knative.dev

Index

Constants

View Source
const (
	EventPolicyConditionReady                                    = apis.ConditionReady
	EventPolicyConditionAuthenticationEnabled apis.ConditionType = "AuthenticationEnabled"
	EventPolicyConditionSubjectsResolved      apis.ConditionType = "SubjectsResolved"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: eventing.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 EventPolicy added in v0.42.0

type EventPolicy struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of the EventPolicy.
	Spec EventPolicySpec `json:"spec,omitempty"`

	// Status represents the current state of the EventPolicy.
	// This data may be out of date.
	// +optional
	Status EventPolicyStatus `json:"status,omitempty"`
}

EventPolicy represents a policy for addressable resources (Broker, Channel, sinks).

func (*EventPolicy) ConvertFrom added in v0.42.0

func (ep *EventPolicy) ConvertFrom(ctx context.Context, obj apis.Convertible) error

ConvertFrom implements apis.Convertible

func (*EventPolicy) ConvertTo added in v0.42.0

func (ep *EventPolicy) ConvertTo(ctx context.Context, obj apis.Convertible) error

ConvertTo implements apis.Convertible

func (*EventPolicy) DeepCopy added in v0.42.0

func (in *EventPolicy) DeepCopy() *EventPolicy

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

func (*EventPolicy) DeepCopyInto added in v0.42.0

func (in *EventPolicy) DeepCopyInto(out *EventPolicy)

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

func (*EventPolicy) DeepCopyObject added in v0.42.0

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

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

func (*EventPolicy) GetConditionSet added in v0.42.0

func (*EventPolicy) GetConditionSet() apis.ConditionSet

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

func (*EventPolicy) GetGroupVersionKind added in v0.42.0

func (ep *EventPolicy) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for EventPolicy

func (*EventPolicy) GetStatus added in v0.42.0

func (ep *EventPolicy) GetStatus() *duckv1.Status

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

func (*EventPolicy) GetUntypedSpec added in v0.42.0

func (ep *EventPolicy) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the EventPolicy.

func (*EventPolicy) SetDefaults added in v0.42.0

func (ep *EventPolicy) SetDefaults(ctx context.Context)

func (*EventPolicy) Validate added in v0.42.0

func (ep *EventPolicy) Validate(ctx context.Context) *apis.FieldError

type EventPolicyFromReference added in v0.42.0

type EventPolicyFromReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	Kind string `json:"kind"`

	// Name of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	Name string `json:"name"`

	// Namespace of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
	// This is optional field, it gets defaulted to the object holding it if left out.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

func (*EventPolicyFromReference) DeepCopy added in v0.42.0

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

func (*EventPolicyFromReference) DeepCopyInto added in v0.42.0

func (in *EventPolicyFromReference) DeepCopyInto(out *EventPolicyFromReference)

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

func (*EventPolicyFromReference) Validate added in v0.42.0

func (r *EventPolicyFromReference) Validate() *apis.FieldError

type EventPolicyList added in v0.42.0

type EventPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EventPolicy `json:"items"`
}

EventPolicyList is a collection of EventPolicy.

func (*EventPolicyList) DeepCopy added in v0.42.0

func (in *EventPolicyList) DeepCopy() *EventPolicyList

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

func (*EventPolicyList) DeepCopyInto added in v0.42.0

func (in *EventPolicyList) DeepCopyInto(out *EventPolicyList)

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

func (*EventPolicyList) DeepCopyObject added in v0.42.0

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

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

type EventPolicySelector added in v0.42.0

type EventPolicySelector struct {
	*metav1.LabelSelector `json:",inline"`
	*metav1.TypeMeta      `json:",inline"`
}

func (*EventPolicySelector) DeepCopy added in v0.42.0

func (in *EventPolicySelector) DeepCopy() *EventPolicySelector

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

func (*EventPolicySelector) DeepCopyInto added in v0.42.0

func (in *EventPolicySelector) DeepCopyInto(out *EventPolicySelector)

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

type EventPolicySpec added in v0.42.0

type EventPolicySpec struct {
	// To lists all resources for which this policy applies.
	// Resources in this list must act like an ingress and have an audience.
	// The resources are part of the same namespace as the EventPolicy.
	// An empty list means it applies to all resources in the EventPolicies namespace
	// +optional
	To []EventPolicySpecTo `json:"to,omitempty"`

	// From is the list of sources or oidc identities, which are allowed to send events to the targets (.spec.to).
	From []EventPolicySpecFrom `json:"from,omitempty"`
}

func (*EventPolicySpec) DeepCopy added in v0.42.0

func (in *EventPolicySpec) DeepCopy() *EventPolicySpec

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

func (*EventPolicySpec) DeepCopyInto added in v0.42.0

func (in *EventPolicySpec) DeepCopyInto(out *EventPolicySpec)

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

func (*EventPolicySpec) SetDefaults added in v0.42.0

func (ets *EventPolicySpec) SetDefaults(ctx context.Context)

func (*EventPolicySpec) Validate added in v0.42.0

func (ets *EventPolicySpec) Validate(ctx context.Context) *apis.FieldError

type EventPolicySpecFrom added in v0.42.0

type EventPolicySpecFrom struct {
	// Ref contains a direct reference to a resource which is allowed to send events to the target.
	// +optional
	Ref *EventPolicyFromReference `json:"ref,omitempty"`

	// Sub sets the OIDC identity name to be allowed to send events to the target.
	// It is also possible to set a glob-like pattern to match any suffix.
	// +optional
	Sub *string `json:"sub,omitempty"`
}

func (*EventPolicySpecFrom) DeepCopy added in v0.42.0

func (in *EventPolicySpecFrom) DeepCopy() *EventPolicySpecFrom

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

func (*EventPolicySpecFrom) DeepCopyInto added in v0.42.0

func (in *EventPolicySpecFrom) DeepCopyInto(out *EventPolicySpecFrom)

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

type EventPolicySpecTo added in v0.42.0

type EventPolicySpecTo struct {
	// Ref contains the direct reference to a target
	// +optional
	Ref *EventPolicyToReference `json:"ref,omitempty"`

	// Selector contains a selector to group targets
	// +optional
	Selector *EventPolicySelector `json:"selector,omitempty"`
}

func (*EventPolicySpecTo) DeepCopy added in v0.42.0

func (in *EventPolicySpecTo) DeepCopy() *EventPolicySpecTo

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

func (*EventPolicySpecTo) DeepCopyInto added in v0.42.0

func (in *EventPolicySpecTo) DeepCopyInto(out *EventPolicySpecTo)

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

type EventPolicyStatus added in v0.42.0

type EventPolicyStatus struct {
	// inherits duck/v1 Status, 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.
	duckv1.Status `json:",inline"`

	// From is the list of resolved oidc identities from .spec.from
	From []string `json:"from,omitempty"`
}

EventPolicyStatus represents the current state of a EventPolicy.

func (*EventPolicyStatus) DeepCopy added in v0.42.0

func (in *EventPolicyStatus) DeepCopy() *EventPolicyStatus

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

func (*EventPolicyStatus) DeepCopyInto added in v0.42.0

func (in *EventPolicyStatus) DeepCopyInto(out *EventPolicyStatus)

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

func (*EventPolicyStatus) GetCondition added in v0.42.0

func (ep *EventPolicyStatus) GetCondition(t apis.ConditionType) *apis.Condition

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

func (*EventPolicyStatus) GetTopLevelCondition added in v0.42.0

func (ep *EventPolicyStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*EventPolicyStatus) InitializeConditions added in v0.42.0

func (ep *EventPolicyStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*EventPolicyStatus) IsReady added in v0.42.0

func (ep *EventPolicyStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*EventPolicyStatus) MarkOIDCAuthenticationDisabled added in v0.42.0

func (ep *EventPolicyStatus) MarkOIDCAuthenticationDisabled(reason, messageFormat string, messageA ...interface{})

MarkOIDCAuthenticationDisabled sets EventPolicyConditionAuthenticationEnabled condition to false.

func (*EventPolicyStatus) MarkOIDCAuthenticationEnabled added in v0.42.0

func (ep *EventPolicyStatus) MarkOIDCAuthenticationEnabled()

MarkOIDCAuthenticationEnabled sets EventPolicyConditionAuthenticationEnabled condition to true.

func (*EventPolicyStatus) MarkSubjectsResolvedFailed added in v0.42.0

func (ep *EventPolicyStatus) MarkSubjectsResolvedFailed(reason, messageFormat string, messageA ...interface{})

MarkSubjectsNotResolved sets EventPolicyConditionSubjectsResolved condition to false.

func (*EventPolicyStatus) MarkSubjectsResolvedSucceeded added in v0.42.0

func (ep *EventPolicyStatus) MarkSubjectsResolvedSucceeded()

MarkSubjectsResolved sets EventPolicyConditionSubjectsResolved condition to true.

type EventPolicyToReference added in v0.42.0

type EventPolicyToReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	Kind string `json:"kind"`

	// Name of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	Name string `json:"name"`
}

func (*EventPolicyToReference) DeepCopy added in v0.42.0

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

func (*EventPolicyToReference) DeepCopyInto added in v0.42.0

func (in *EventPolicyToReference) DeepCopyInto(out *EventPolicyToReference)

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

func (*EventPolicyToReference) Validate added in v0.42.0

func (r *EventPolicyToReference) Validate() *apis.FieldError

Jump to

Keyboard shortcuts

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