v1alpha1

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the polyfea v1alpha1 API group +kubebuilder:object:generate=true +groupName=polyfea.github.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "polyfea.github.io", 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 Attribute

type Attribute struct {
	// The name of the attribute.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`

	// The value of the attribute.
	// +kubebuilder:validation:XPreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Value runtime.RawExtension `json:"value"`
}

Attribute defines a key-value pair that allows you to assign specific attributes to the element. The name field is used as the attribute name, while the value field can be any valid JSON type.

func (*Attribute) DeepCopy

func (in *Attribute) DeepCopy() *Attribute

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

func (*Attribute) DeepCopyInto

func (in *Attribute) DeepCopyInto(out *Attribute)

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

type DisplayRules

type DisplayRules struct {
	// If all of the matchers in this list are matched, the web component will be loaded.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AllOf []Matcher `json:"allOf,omitempty"`

	// If any of the matchers in this list are matched, the web component will be loaded.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AnyOf []Matcher `json:"anyOf,omitempty"`

	// If none of the matchers in this list are matched, the web component will be loaded.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	NoneOf []Matcher `json:"noneOf,omitempty"`
}

DisplayRules defines the conditions under which the web component should be loaded. There is an and opperation between AllOf, AnyOf and NoneOf lists.

func (*DisplayRules) DeepCopy

func (in *DisplayRules) DeepCopy() *DisplayRules

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

func (*DisplayRules) DeepCopyInto

func (in *DisplayRules) DeepCopyInto(out *DisplayRules)

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

type Header struct {
	// Name of the header
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`

	// Value of the header
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Value string `json:"value"`
}

Header defines the header of the frontend class

func (*Header) DeepCopy

func (in *Header) DeepCopy() *Header

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

func (*Header) DeepCopyInto

func (in *Header) DeepCopyInto(out *Header)

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

type Matcher

type Matcher struct {
	// This is a list of context names in which this element is intended to be shown.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContextName string `json:"context-name,omitempty"`

	// The list of paths in which this element is intended to be shown.
	// +kubebuilder:example="/my-menu-item"
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Path string `json:"path,omitempty"`

	// The list of roles for which this element is intended to be shown.
	// +kubebuilder:example="admin"
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Role string `json:"role,omitempty"`
}

Matcher defines the conditions under which the web component should be loaded. +kubebuilder:validation:MaxProperties=1

func (*Matcher) DeepCopy

func (in *Matcher) DeepCopy() *Matcher

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

func (*Matcher) DeepCopyInto

func (in *Matcher) DeepCopyInto(out *Matcher)

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

type MetaTag

type MetaTag struct {
	// Name of the meta tag
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`

	// Content of the meta tag
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Content string `json:"content"`
}

MetaTag defines the meta tag of the frontend class

func (*MetaTag) DeepCopy

func (in *MetaTag) DeepCopy() *MetaTag

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

func (*MetaTag) DeepCopyInto

func (in *MetaTag) DeepCopyInto(out *MetaTag)

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

type MicroFrontend

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

	Spec   MicroFrontendSpec   `json:"spec,omitempty"`
	Status MicroFrontendStatus `json:"status,omitempty"`
}

MicroFrontend is the Schema for the microfrontends API

func (*MicroFrontend) DeepCopy

func (in *MicroFrontend) DeepCopy() *MicroFrontend

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

func (*MicroFrontend) DeepCopyInto

func (in *MicroFrontend) DeepCopyInto(out *MicroFrontend)

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

func (*MicroFrontend) DeepCopyObject

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

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

type MicroFrontendClass

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

	Spec   MicroFrontendClassSpec   `json:"spec,omitempty"`
	Status MicroFrontendClassStatus `json:"status,omitempty"`
}

MicroFrontendClass is the Schema for the microfrontendclasses API

func (*MicroFrontendClass) DeepCopy

func (in *MicroFrontendClass) DeepCopy() *MicroFrontendClass

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

func (*MicroFrontendClass) DeepCopyInto

func (in *MicroFrontendClass) DeepCopyInto(out *MicroFrontendClass)

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

func (*MicroFrontendClass) DeepCopyObject

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

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

type MicroFrontendClassList

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

MicroFrontendClassList contains a list of MicroFrontendClass

func (*MicroFrontendClassList) DeepCopy

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

func (*MicroFrontendClassList) DeepCopyInto

func (in *MicroFrontendClassList) DeepCopyInto(out *MicroFrontendClassList)

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

func (*MicroFrontendClassList) DeepCopyObject

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

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

type MicroFrontendClassSpec

type MicroFrontendClassSpec struct {
	// BaseUri for which the frontend class will be used
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	BaseUri *string `json:"baseUri"`

	// Title that will be used for the frontend class.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Title *string `json:"title"`

	// CspHeader that will be used for the frontend class, a default will be used if not set.
	// +kubebuilder:default="default-src 'self'; font-src 'self'; script-src 'strict-dynamic' 'nonce-{NONCE_VALUE}'; worker-src 'self'; manifest-src 'self'; style-src 'self' 'strict-dynamic' 'nonce-{NONCE_VALUE}'; style-src-attr 'self' 'unsafe-inline';"
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CspHeader string `json:"cspHeader,omitempty"`

	// ExtraMetaTags that will be used for the frontend class, none if not set.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ExtraMetaTags []MetaTag `json:"extraMetaTags,omitempty"`

	// ExtraHeaders that will be used for the frontend class, none if not set.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ExtraHeaders []Header `json:"extraHeaders,omitempty"`

	// UserRolesHeader is the name of the header that contains the roles of the user. Defaults to 'x-auth-request-roles'.
	// +kubebuilder:default=x-auth-request-roles
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	UserRolesHeader string `json:"rolesHeader,omitempty"`

	// UserHeader is the name of the header that contains the user id. Defaults to 'x-auth-request-user'.
	// +kubebuilder:default=x-auth-request-user
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	UserHeader string `json:"userHeader,omitempty"`

	// Routing defines the routing for the frontend class from outside of the cluster you can either use a Gateway API or an Ingress.
	// You can also define your own routing by not specifying any of the fields.
	// You can either use a Gateway API or an Ingress.
	// We currently support only basic path prefix routing any customization requires creation of HTTPRoute or Ingress manually.
	// You need to have a service for the operator with label 'app' set to 'polyfea-webserver' and a port with name webserver for the routing to work.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Routing *Routing `json:"routing,omitempty"`
}

MicroFrontendClassSpec defines the desired state of MicroFrontendClass

func (*MicroFrontendClassSpec) DeepCopy

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

func (*MicroFrontendClassSpec) DeepCopyInto

func (in *MicroFrontendClassSpec) DeepCopyInto(out *MicroFrontendClassSpec)

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

type MicroFrontendClassStatus

type MicroFrontendClassStatus struct {
}

MicroFrontendClassStatus defines the observed state of MicroFrontendClass

func (*MicroFrontendClassStatus) DeepCopy

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

func (*MicroFrontendClassStatus) DeepCopyInto

func (in *MicroFrontendClassStatus) DeepCopyInto(out *MicroFrontendClassStatus)

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

type MicroFrontendList

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

MicroFrontendList contains a list of MicroFrontend

func (*MicroFrontendList) DeepCopy

func (in *MicroFrontendList) DeepCopy() *MicroFrontendList

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

func (*MicroFrontendList) DeepCopyInto

func (in *MicroFrontendList) DeepCopyInto(out *MicroFrontendList)

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

func (*MicroFrontendList) DeepCopyObject

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

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

type MicroFrontendSpec

type MicroFrontendSpec struct {
	// Reference to a service from which the modules or css would be served.
	// Fully qualified name of the service should be specified in the format <schema>://<service-name>.<namespace>.<cluster>.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Service *string `json:"service"`

	// This specifies whether the loading of web components should be proxied by the controller.
	// +kubebuilder:default=true
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Proxy *bool `json:"proxy,omitempty"`

	// CachingStrategy defines the caching strategy for the micro frontend.
	// +kubebuilder:default=none
	// +kubebuilder:validation:Enum=none;cache;
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CacheStrategy string `json:"cacheStrategy,omitempty"`

	// CacheControl defines the cache control header for the micro frontend. This is only used if the caching strategy is set to 'cache'.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CacheControl *string `json:"cacheControl,omitempty"`

	// Relative path to the module file within the service.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ModulePath *string `json:"modulePath"`

	// Relative path to the static files within the service.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	StaticResources []StaticResources `json:"staticPaths,omitempty"`

	// FrontendClass is the name of the frontend class that should be used for this micro frontend.
	// +kubebuilder:default=polyfea-controller-default
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	FrontendClass *string `json:"frontendClass"`

	// List of dependencies that should be loaded before this micro frontend.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	DependsOn []string `json:"dependsOn,omitempty"`
}

MicroFrontendSpec defines the desired state of MicroFrontend

func (*MicroFrontendSpec) DeepCopy

func (in *MicroFrontendSpec) DeepCopy() *MicroFrontendSpec

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

func (*MicroFrontendSpec) DeepCopyInto

func (in *MicroFrontendSpec) DeepCopyInto(out *MicroFrontendSpec)

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

type MicroFrontendStatus

type MicroFrontendStatus struct {
}

MicroFrontendStatus defines the observed state of MicroFrontend

func (*MicroFrontendStatus) DeepCopy

func (in *MicroFrontendStatus) DeepCopy() *MicroFrontendStatus

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

func (*MicroFrontendStatus) DeepCopyInto

func (in *MicroFrontendStatus) DeepCopyInto(out *MicroFrontendStatus)

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

type Port

type Port struct {
	// Name is the name of the port on the Service. This is a mutually exclusive setting with "Number".
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name,omitempty"`
	// Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with "Name".
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Number *int32 `json:"number,omitempty"`
}

Port is the service port being referenced. +kubebuilder:validation:MaxProperties=1

func (*Port) DeepCopy

func (in *Port) DeepCopy() *Port

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

func (*Port) DeepCopyInto

func (in *Port) DeepCopyInto(out *Port)

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

type Routing added in v0.1.3

type Routing struct {
	// ParentRefs is the name of the parent refs that the created HTTPRoute will be attached to.
	// If specified an HttpRoute will be created for the frontend class automatically.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ParentRefs []gatewayv1.ParentReference `json:"parentRefs,omitempty"`

	// IngressClassName is the name of the ingress class that will be used for the frontend class.
	// If specified an Ingress will be created for the frontend class automatically.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	IngressClassName *string `json:"ingressClassName,omitempty"`
}

Routing defines the routing for the frontend class from outside of the cluster you can either use a Gateway API or an Ingress. +kubebuilder:validation:MaxProperties=1 +kubebuilder:validation:MinProperties=1

func (*Routing) DeepCopy added in v0.1.3

func (in *Routing) DeepCopy() *Routing

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

func (*Routing) DeepCopyInto added in v0.1.3

func (in *Routing) DeepCopyInto(out *Routing)

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

type StaticResources

type StaticResources struct {
	// Kind defines the kind of the static resource can be script, stylesheet, or any other `link` element.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Kind string `json:"kind"`

	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Path string `json:"path"`

	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Attributes []Attribute `json:"attributes,omitempty"`

	// WaitOnLoad defines whether the micro frontend should wait for the static resource to load before loading itself.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	WaitOnLoad bool `json:"waitOnLoad,omitempty"`

	// This specifies whether the loading of static resource components should be proxied by the controller.
	// +kubebuilder:default=true
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Proxy *bool `json:"proxy,omitempty"`
}

StaticResources defines the static resources that should be loaded before this micro frontend.

func (*StaticResources) DeepCopy

func (in *StaticResources) DeepCopy() *StaticResources

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

func (*StaticResources) DeepCopyInto

func (in *StaticResources) DeepCopyInto(out *StaticResources)

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

type Style

type Style struct {
	// The name of the style.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`

	// The value of the style.
	Value string `json:"value"`
}

Style defines the styles that should be applied to the webcomponent.

func (*Style) DeepCopy

func (in *Style) DeepCopy() *Style

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

func (*Style) DeepCopyInto

func (in *Style) DeepCopyInto(out *Style)

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

type WebComponent

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

	Spec   WebComponentSpec   `json:"spec,omitempty"`
	Status WebComponentStatus `json:"status,omitempty"`
}

WebComponent is the Schema for the webcomponents API

func (*WebComponent) DeepCopy

func (in *WebComponent) DeepCopy() *WebComponent

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

func (*WebComponent) DeepCopyInto

func (in *WebComponent) DeepCopyInto(out *WebComponent)

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

func (*WebComponent) DeepCopyObject

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

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

type WebComponentList

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

WebComponentList contains a list of WebComponent

func (*WebComponentList) DeepCopy

func (in *WebComponentList) DeepCopy() *WebComponentList

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

func (*WebComponentList) DeepCopyInto

func (in *WebComponentList) DeepCopyInto(out *WebComponentList)

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

func (*WebComponentList) DeepCopyObject

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

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

type WebComponentSpec

type WebComponentSpec struct {
	// Reference to a microfrontend from which the webcomponent would be served.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MicroFrontend *string `json:"microFrontend,omitempty"`

	// The HTML element tag name to be used when the matcher is matched.
	// +kubebuilder:example="my-menu-item"
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Element *string `json:"element"`

	// This is a list of key-value pairs that allows you to assign specific attributes to the element. The name field is used as the attribute name, while the value field can be any valid JSON type.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Attributes []Attribute `json:"attributes,omitempty"`

	// DisplayRules defines the conditions under which the web component should be loaded.
	// There is an or opperation between the elements of the DisplayRules list. If any of the DisplayRules is matched, the web component will be loaded.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	DisplayRules []DisplayRules `json:"displayRules"`

	// Priority defines the priority of the webcomponent. Used for ordering the webcomponent within the shell. The higher the number, the higher the priority. The default priority is 0.
	// +kubebuilder:default=0
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Priority *int32 `json:"priority,omitempty"`

	// Styles defines the styles that should be applied to the webcomponent.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Style []Style `json:"style,omitempty"`
}

WebComponentSpec defines the desired state of WebComponent

func (*WebComponentSpec) DeepCopy

func (in *WebComponentSpec) DeepCopy() *WebComponentSpec

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

func (*WebComponentSpec) DeepCopyInto

func (in *WebComponentSpec) DeepCopyInto(out *WebComponentSpec)

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

type WebComponentStatus

type WebComponentStatus struct {
}

WebComponentStatus defines the observed state of WebComponent

func (*WebComponentStatus) DeepCopy

func (in *WebComponentStatus) DeepCopy() *WebComponentStatus

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

func (*WebComponentStatus) DeepCopyInto

func (in *WebComponentStatus) DeepCopyInto(out *WebComponentStatus)

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