v1alpha1

package
v0.0.0-...-a67e8b1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the standard v1alpha1 API group +kubebuilder:object:generate=true +groupName=standard.oam.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "standard.oam.dev", 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 Backend

type Backend struct {
	// ReadTimeout used for setting read timeout duration for backend service, the unit is second.
	ReadTimeout int `json:"readTimeout,omitempty"`
	// SendTimeout used for setting send timeout duration for backend service, the unit is second.
	SendTimeout int `json:"sendTimeout,omitempty"`
	// BackendService specifies the backend K8s service and port, it's optional
	BackendService *BackendServiceRef `json:"backendService,omitempty"`
}

Backend defines backend configure for route trait. Route will automatically discover podSpec and label for BackendService. If BackendService is already set, discovery won't work. If BackendService is not set, the discovery mechanism will work.

func (*Backend) DeepCopy

func (in *Backend) DeepCopy() *Backend

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

func (*Backend) DeepCopyInto

func (in *Backend) DeepCopyInto(out *Backend)

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

type BackendServiceRef

type BackendServiceRef struct {
	// Port allow you direct specify backend service port.
	Port intstr.IntOrString `json:"port"`
	// ServiceName allow you direct specify K8s service for backend service.
	ServiceName string `json:"serviceName"`
}

BackendServiceRef specifies the backend K8s service and port, if specified, the two fields are all required

func (*BackendServiceRef) DeepCopy

func (in *BackendServiceRef) DeepCopy() *BackendServiceRef

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

func (*BackendServiceRef) DeepCopyInto

func (in *BackendServiceRef) DeepCopyInto(out *BackendServiceRef)

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

type IssuerType

type IssuerType string

IssuerType defines the type of issuer

const (
	// ClusterIssuer is a cluster level type of issuer
	ClusterIssuer IssuerType = "ClusterIssuer"
	// NamespaceIssuer is the default one
	NamespaceIssuer IssuerType = "Issuer"
)

type Route

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

	Spec   RouteSpec   `json:"spec,omitempty"`
	Status RouteStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true Route is the Schema for the routes API +kubebuilder:resource:categories={oam} +kubebuilder:subresource:status

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

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

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

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

func (*Route) DeepCopyObject

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

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

func (*Route) GetCondition

GetCondition get condition from CR status

func (*Route) GetWorkloadReference

func (r *Route) GetWorkloadReference() runtimev1alpha1.TypedReference

GetWorkloadReference of this Route Trait.

func (*Route) SetConditions

func (r *Route) SetConditions(c ...runtimev1alpha1.Condition)

SetConditions set condition for CR status

func (*Route) SetWorkloadReference

func (r *Route) SetWorkloadReference(rt runtimev1alpha1.TypedReference)

SetWorkloadReference of this Route Trait.

type RouteList

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

RouteList contains a list of Route +kubebuilder:object:root=true

func (*RouteList) DeepCopy

func (in *RouteList) DeepCopy() *RouteList

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

func (*RouteList) DeepCopyInto

func (in *RouteList) DeepCopyInto(out *RouteList)

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

func (*RouteList) DeepCopyObject

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

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

type RouteSpec

type RouteSpec struct {
	// WorkloadReference to the workload whose metrics needs to be exposed
	WorkloadReference runtimev1alpha1.TypedReference `json:"workloadRef,omitempty"`

	// Host is the host of the route
	Host string `json:"host"`

	// TLS indicate route trait will create SSL secret using cert-manager with specified issuer
	// If this is nil, route trait will use a selfsigned issuer
	TLS *TLS `json:"tls,omitempty"`

	// Rules contain multiple rules of route
	Rules []Rule `json:"rules,omitempty"`

	// Provider indicate which ingress controller implementation the route trait will use, by default it's nginx-ingress
	Provider string `json:"provider,omitempty"`

	// IngressClass indicate which ingress class the route trait will use, by default it's nginx
	IngressClass string `json:"ingressClass,omitempty"`
}

RouteSpec defines the desired state of Route

func (*RouteSpec) DeepCopy

func (in *RouteSpec) DeepCopy() *RouteSpec

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

func (*RouteSpec) DeepCopyInto

func (in *RouteSpec) DeepCopyInto(out *RouteSpec)

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

type RouteStatus

type RouteStatus struct {
	Ingresses                         []runtimev1alpha1.TypedReference `json:"ingresses,omitempty"`
	Service                           *runtimev1alpha1.TypedReference  `json:"service,omitempty"`
	Status                            string                           `json:"status,omitempty"`
	runtimev1alpha1.ConditionedStatus `json:",inline"`
}

RouteStatus defines the observed state of Route

func (*RouteStatus) DeepCopy

func (in *RouteStatus) DeepCopy() *RouteStatus

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

func (*RouteStatus) DeepCopyInto

func (in *RouteStatus) DeepCopyInto(out *RouteStatus)

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

type Rule

type Rule struct {
	// Name will become the suffix of underlying ingress created by this rule, if not, will use index as suffix.
	Name string `json:"name,omitempty"`

	// Path is location Path, default for "/"
	Path string `json:"path,omitempty"`

	// RewriteTarget will rewrite request from Path to RewriteTarget path.
	RewriteTarget string `json:"rewriteTarget,omitempty"`

	// CustomHeaders pass a custom list of headers to the backend service.
	CustomHeaders map[string]string `json:"customHeaders,omitempty"`

	// DefaultBackend will become the ingress default backend if the backend is not available
	DefaultBackend *runtimev1alpha1.TypedReference `json:"defaultBackend,omitempty"`

	// Backend indicate how to connect backend service
	// If it's nil, will auto discovery
	Backend *Backend `json:"backend,omitempty"`
}

Rule defines to route rule

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

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

func (*Rule) DeepCopyInto

func (in *Rule) DeepCopyInto(out *Rule)

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

type TLS

type TLS struct {
	IssuerName string `json:"issuerName,omitempty"`

	// Type indicate the issuer is ClusterIssuer or Issuer(namespace issuer), by default, it's Issuer
	// +kubebuilder:default:=Issuer
	Type IssuerType `json:"type,omitempty"`
}

TLS defines certificate issuer and type for mTLS configuration

func (*TLS) DeepCopy

func (in *TLS) DeepCopy() *TLS

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

func (*TLS) DeepCopyInto

func (in *TLS) DeepCopyInto(out *TLS)

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

Jump to

Keyboard shortcuts

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