v1alpha1

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 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

View Source
const (
	// ConditionTypeReady indicates that the resource is ready for use
	ConditionTypeReady string = "Ready"

	// ConditionTypeAccepted indicates that the resource has been accepted
	ConditionTypeAccepted string = "Accepted"

	// ConditionTypeAvailable indicates that the resource is available
	ConditionTypeAvailable string = "Available"
)

Common condition types following Kubernetes conventions

View Source
const (
	// ConditionTypeServiceResolved indicates that the service reference has been resolved
	ConditionTypeServiceResolved string = "ServiceResolved"

	// ConditionTypeFrontendClassBound indicates that the MicroFrontend is bound to a MicroFrontendClass
	ConditionTypeFrontendClassBound string = "FrontendClassBound"

	// ConditionTypeNamespacePolicyValid indicates that the MicroFrontend satisfies the namespace policy
	ConditionTypeNamespacePolicyValid string = "NamespacePolicyValid"
)

MicroFrontend-specific condition types

View Source
const (
	// ReasonSuccessful indicates a successful operation
	ReasonSuccessful string = "Successful"

	// ReasonInvalidConfiguration indicates an invalid configuration
	ReasonInvalidConfiguration string = "InvalidConfiguration"

	// ReasonNamespaceNotAllowed indicates that the namespace is not allowed by policy
	ReasonNamespaceNotAllowed string = "NamespaceNotAllowed"

	// ReasonFrontendClassNotFound indicates that the referenced MicroFrontendClass was not found
	ReasonFrontendClassNotFound string = "FrontendClassNotFound"

	// ReasonServiceNotFound indicates that the referenced Service was not found
	ReasonServiceNotFound string = "ServiceNotFound"

	// ReasonMicroFrontendNotFound indicates that the referenced MicroFrontend was not found
	ReasonMicroFrontendNotFound string = "MicroFrontendNotFound"

	// ReasonReconciling indicates that the resource is being reconciled
	ReasonReconciling string = "Reconciling"

	// ReasonError indicates that an error occurred during reconciliation
	ReasonError string = "Error"
)

Common condition reasons

View Source
const (
	MicroFrontendPhasePending  string = "Pending"
	MicroFrontendPhaseReady    string = "Ready"
	MicroFrontendPhaseFailed   string = "Failed"
	MicroFrontendPhaseRejected string = "Rejected"
)

Phase constants for MicroFrontend

View Source
const (
	WebComponentPhasePending               string = "Pending"
	WebComponentPhaseReady                 string = "Ready"
	WebComponentPhaseFailed                string = "Failed"
	WebComponentPhaseMicroFrontendNotFound string = "MicroFrontendNotFound"
)

Phase constants for WebComponent

View Source
const (
	MicroFrontendClassPhaseReady   string = "Ready"
	MicroFrontendClassPhaseInvalid string = "Invalid"
)

Phase constants for MicroFrontendClass

View Source
const (
	// ConditionTypeMicroFrontendResolved indicates that the referenced MicroFrontend has been resolved
	ConditionTypeMicroFrontendResolved string = "MicroFrontendResolved"
)

WebComponent-specific condition types

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

func GetCondition added in v0.4.0

func GetCondition(conditions []metav1.Condition, conditionType string) *metav1.Condition

GetCondition returns the condition with the given type

func IsConditionTrue added in v0.4.0

func IsConditionTrue(conditions []metav1.Condition, conditionType string) bool

IsConditionTrue returns true if the condition is present and set to true

func IsReady added in v0.4.0

func IsReady(conditions []metav1.Condition) bool

IsReady returns true if the Ready condition is present and set to true

func RemoveCondition added in v0.4.0

func RemoveCondition(conditions *[]metav1.Condition, conditionType string)

RemoveCondition removes a condition from the conditions list

func SetCondition added in v0.4.0

func SetCondition(conditions *[]metav1.Condition, conditionType string, status metav1.ConditionStatus, reason, message string)

SetCondition adds or updates a condition in the conditions list

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 CacheRoute added in v0.1.4

type CacheRoute struct {
	// Pattern is the URL pattern to which this caching strategy applies.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Pattern *string `json:"pattern"`

	// Destination is the optional destination URL for this caching strategy.
	// You can find the list of possible values here: https://developer.mozilla.org/en-US/docs/Web/API/Request/destination
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Destination *string `json:"destination,omitempty"`

	// Strategy defines the caching strategy to be used for this URL pattern. It defaults to "cache-first".
	// +kubebuilder:default=cache-first
	// +kubebuilder:validation:Enum=cache-first;network-first;cache-only;network-only;stale-while-revalidate;
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Strategy *string `json:"strategy,omitempty"`

	// MaxAgeSeconds specifies the maximum age (in seconds) for cached content.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MaxAgeSeconds *int32 `json:"maxAgeSeconds,omitempty"`

	// SyncRetentionMinutes specifies the duration (in minutes) to retain synced content in the cache.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SyncRetentionMinutes *int32 `json:"syncRetentionMinutes,omitempty"`

	// Method specifies the HTTP method to be used with this caching strategy. It defaults to "GET".
	// +kubebuilder:default=GET
	// +kubebuilder:validation:Enum=DELETE;GET;HEAD;PATCH;POST;PUT;
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Method *string `json:"method,omitempty"`

	// Statuses lists the HTTP status codes to be cached. It defaults to [0, 200, 201, 202, 204].
	// +kubebuilder:default={0,200,201,202,204}
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Statuses []int32 `json:"statuses,omitempty"`
}

CacheRoute defines the caching strategy for a specific URL pattern within a Progressive Web Application (PWA). This struct allows for fine-tuned control over how different network requests are handled, enhancing performance, reliability, and offline capabilities based on the application's requirements.

func (*CacheRoute) DeepCopy added in v0.1.4

func (in *CacheRoute) DeepCopy() *CacheRoute

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

func (*CacheRoute) DeepCopyInto added in v0.1.4

func (in *CacheRoute) DeepCopyInto(out *CacheRoute)

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.

func (*MicroFrontendClass) IsNamespaceAllowed added in v0.4.0

func (mfc *MicroFrontendClass) IsNamespaceAllowed(namespace string) bool

IsNamespaceAllowed checks if a namespace is allowed by the NamespacePolicy

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 MicroFrontendClassReference added in v0.4.0

type MicroFrontendClassReference struct {
	// Name of the MicroFrontendClass
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Name string `json:"name"`

	// Namespace of the MicroFrontendClass
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Namespace string `json:"namespace,omitempty"`

	// Accepted indicates if this MicroFrontend is accepted by the class's namespace policy
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Accepted bool `json:"accepted"`
}

MicroFrontendClassReference contains information about the MicroFrontendClass binding

func (*MicroFrontendClassReference) DeepCopy added in v0.4.0

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

func (*MicroFrontendClassReference) DeepCopyInto added in v0.4.0

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

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

	// NamespacePolicy defines which namespaces can attach MicroFrontends to this class
	// Defaults to allowing all namespaces
	// +optional
	// +kubebuilder:default={from: "All"}
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	NamespacePolicy *NamespacePolicy `json:"namespacePolicy,omitempty"`

	// 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"`

	// ProgressiveWebApp defines the configuration settings for a Progressive Web Application (PWA).
	// It includes specifications for the web app manifest and cache options, which are crucial for the PWA's functionality and performance.
	// This field is optional and can be omitted if not needed.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ProgressiveWebApp *ProgressiveWebApp `json:"progressiveWebApp,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 {
	// Conditions represent the latest available observations of the MicroFrontendClass's state
	// +optional
	// +listType=map
	// +listMapKey=type
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Phase represents the current lifecycle phase of the MicroFrontendClass
	// Possible values: Ready, Invalid
	// +optional
	// +kubebuilder:validation:Enum=Ready;Invalid
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Phase string `json:"phase,omitempty"`

	// AcceptedMicroFrontends counts how many MicroFrontends are currently bound to this class
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	AcceptedMicroFrontends int32 `json:"acceptedMicroFrontends,omitempty"`

	// RejectedMicroFrontends counts how many MicroFrontends were rejected by namespace policy
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	RejectedMicroFrontends int32 `json:"rejectedMicroFrontends,omitempty"`

	// ObservedGeneration reflects the generation of the most recently observed MicroFrontendClass
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

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.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Service *ServiceReference `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"`

	// TODO: Make this work
	// 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"`

	// TODO: Make this work
	// 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"`

	// CacheOptions specifies the cache settings for the PWA, including pre-caching and runtime caching.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CacheOptions *PWACache `json:"cacheOptions,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 {
	// Conditions represent the latest available observations of the MicroFrontend's state
	// +optional
	// +listType=map
	// +listMapKey=type
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Phase represents the current lifecycle phase of the MicroFrontend
	// Possible values: Pending, Ready, Failed, Rejected
	// +optional
	// +kubebuilder:validation:Enum=Pending;Ready;Failed;Rejected
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Phase string `json:"phase,omitempty"`

	// ResolvedServiceURL is the computed URL where the microfrontend is served from
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ResolvedServiceURL string `json:"resolvedServiceURL,omitempty"`

	// FrontendClassRef indicates which MicroFrontendClass this microfrontend is bound to
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	FrontendClassRef *MicroFrontendClassReference `json:"frontendClassRef,omitempty"`

	// RejectionReason explains why the microfrontend was rejected (namespace policy violation, etc.)
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	RejectionReason string `json:"rejectionReason,omitempty"`

	// ObservedGeneration reflects the generation of the most recently observed MicroFrontend
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

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 NamespacePolicy added in v0.4.0

type NamespacePolicy struct {
	// From defines namespace selection behavior
	// +kubebuilder:validation:Enum=All;Same;FromNamespaces
	// +kubebuilder:default=All
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	From NamespacePolicyType `json:"from"`

	// Namespaces is a list of namespaces from which MicroFrontends can be attached
	// Only used when From is "FromNamespaces"
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Namespaces []string `json:"namespaces,omitempty"`
}

NamespacePolicy defines which namespaces can attach MicroFrontends to this class

func (*NamespacePolicy) DeepCopy added in v0.4.0

func (in *NamespacePolicy) DeepCopy() *NamespacePolicy

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

func (*NamespacePolicy) DeepCopyInto added in v0.4.0

func (in *NamespacePolicy) DeepCopyInto(out *NamespacePolicy)

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

type NamespacePolicyType added in v0.4.0

type NamespacePolicyType string

NamespacePolicyType defines namespace selection behavior +kubebuilder:validation:Enum=All;Same;FromNamespaces

const (
	// NamespaceFromAll allows MicroFrontends from all namespaces
	NamespaceFromAll NamespacePolicyType = "All"

	// NamespaceFromSame allows only MicroFrontends from the same namespace as the MicroFrontendClass
	NamespaceFromSame NamespacePolicyType = "Same"

	// NamespaceFromNamespaces allows MicroFrontends from specific namespaces listed in Namespaces field
	NamespaceFromNamespaces NamespacePolicyType = "FromNamespaces"
)

type ObjectReference added in v0.4.0

type ObjectReference struct {
	// Name of the referenced object
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Name string `json:"name"`

	// Namespace of the referenced object
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Namespace string `json:"namespace"`

	// Found indicates if the referenced object was found
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Found bool `json:"found"`
}

ObjectReference contains information about a referenced object

func (*ObjectReference) DeepCopy added in v0.4.0

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto added in v0.4.0

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type PWACache added in v0.1.4

type PWACache struct {
	// PreCache lists the URLs or resources to be pre-cached when the PWA is installed.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PreCache []PreCacheEntry `json:"preCache,omitempty"`

	// CacheRoutes specifies the caching strategies for different URL patterns.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CacheRoutes []CacheRoute `json:"cacheRoutes,omitempty"`
}

PWACache defines the caching options for a Progressive Web Application (PWA). This struct includes configurations for both pre-caching and runtime caching strategies, which are essential for improving the performance and offline capabilities of the PWA.

func (*PWACache) DeepCopy added in v0.1.4

func (in *PWACache) DeepCopy() *PWACache

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

func (*PWACache) DeepCopyInto added in v0.1.4

func (in *PWACache) DeepCopyInto(out *PWACache)

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

type PWAIcon added in v0.1.4

type PWAIcon struct {
	// A string containing space-separated image dimensions using the same syntax as the sizes attribute.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Sizes *string `json:"sizes"`

	// The path to the image file. If src is a relative URL, the base URL will be the URL of the manifest.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Src *string `json:"src"`

	// A hint as to the media type of the image. The purpose of this member is to allow a user agent to quickly ignore images with media types it does not support.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Type *string `json:"type"`

	// Defines the purpose of the image, for example if the image is intended to serve some special purpose in the context of the host OS (i.e., for better integration).
	// purpose can have one or more of the following values, separated by spaces:
	// 	monochrome: A user agent can present this icon where a monochrome icon with a solid fill is needed. The color information in the icon is discarded and only the alpha data is used. The icon can then be used by the user agent like a mask over any solid fill.
	// 	maskable: The image is designed with icon masks and safe zone in mind, such that any part of the image outside the safe zone can safely be ignored and masked away by the user agent.
	// 	any: The user agent is free to display the icon in any context (this is the default value).
	// +kubebuilder:validation:Enum=monochrome;maskable;any;
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Purpose *string `json:"purpose,omitempty"`
}

Read more here: https://developer.mozilla.org/en-US/docs/Web/Manifest/icons

func (*PWAIcon) DeepCopy added in v0.1.4

func (in *PWAIcon) DeepCopy() *PWAIcon

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

func (*PWAIcon) DeepCopyInto added in v0.1.4

func (in *PWAIcon) DeepCopyInto(out *PWAIcon)

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 PreCacheEntry added in v0.1.4

type PreCacheEntry struct {
	// URL specifies the resource URL that should be pre-cached. This URL points to the asset that needs to be available offline, ensuring it is cached during the installation of the PWA.
	// URL needs to be relative to the base URL of the frontend class.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	URL *string `json:"url"`

	// Revision is an optional field that specifies a revision identifier for the resource.
	// The revision helps in cache management by allowing the service worker to recognize and update cached assets when their content changes. This ensures users always have access to the most up-to-date resources.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Revision *string `json:"revision,omitempty"`
}

PreCacheEntry represents an individual entry in the pre-cache list for a Progressive Web Application (PWA). Each entry specifies a URL to be cached and an optional revision identifier to manage cache updates and invalidation.

func (*PreCacheEntry) DeepCopy added in v0.1.4

func (in *PreCacheEntry) DeepCopy() *PreCacheEntry

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

func (*PreCacheEntry) DeepCopyInto added in v0.1.4

func (in *PreCacheEntry) DeepCopyInto(out *PreCacheEntry)

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

type ProgressiveWebApp added in v0.1.4

type ProgressiveWebApp struct {
	// WebAppManifest represents the web app manifest file for the PWA.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	WebAppManifest *WebAppManifest `json:"webAppManifest"`

	// CacheOptions specifies the cache settings for the PWA, including pre-caching and runtime caching.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CacheOptions *PWACache `json:"cacheOptions,omitempty"`

	// Time for reconciliation of the strategies from the frontend side.
	// +kubebuilder:default=1800000
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PolyfeaSWReconcileInterval *int32 `json:"polyfeaSWReconcileInterval,omitempty"`
}

ProgressiveWebApp defines the configuration settings for a Progressive Web Application (PWA). This struct includes specifications for the web app manifest, caching options, and reconciliation interval, which are critical for the PWA's functionality, performance, and synchronization with frontend updates.

func (*ProgressiveWebApp) DeepCopy added in v0.1.4

func (in *ProgressiveWebApp) DeepCopy() *ProgressiveWebApp

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

func (*ProgressiveWebApp) DeepCopyInto added in v0.1.4

func (in *ProgressiveWebApp) DeepCopyInto(out *ProgressiveWebApp)

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

type ServiceReference added in v0.3.0

type ServiceReference struct {
	// Name of the Kubernetes service (mutually exclusive with URI)
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name *string `json:"name,omitempty"`

	// URI for external services (mutually exclusive with Name)
	// Should include schema (http:// or https://)
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	URI *string `json:"uri,omitempty"`

	// Namespace of the service. Defaults to the MicroFrontend's namespace if not specified.
	// Only used when Name is set.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Namespace *string `json:"namespace,omitempty"`

	// Port of the service. Defaults to 80 if not specified.
	// Only used when Name is set.
	// +optional
	// +kubebuilder:default=80
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Port *int32 `json:"port,omitempty"`

	// Scheme to use for connection (http or https). Defaults to http.
	// Only used when Name is set.
	// +optional
	// +kubebuilder:default=http
	// +kubebuilder:validation:Enum=http;https
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Scheme *string `json:"scheme,omitempty"`

	// Domain is the cluster domain suffix. Defaults to svc.cluster.local if not specified.
	// Only used when Name is set. Allows customization for different cluster implementations.
	// +optional
	// +kubebuilder:default=svc.cluster.local
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Domain *string `json:"domain,omitempty"`
}

ServiceReference defines how to reach the service hosting the micro frontend +kubebuilder:validation:XValidation:rule="(has(self.name) && size(self.name) > 0) != (has(self.uri) && size(self.uri) > 0)",message="Either 'name' or 'uri' must be specified, but not both"

func (*ServiceReference) DeepCopy added in v0.3.0

func (in *ServiceReference) DeepCopy() *ServiceReference

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

func (*ServiceReference) DeepCopyInto added in v0.3.0

func (in *ServiceReference) DeepCopyInto(out *ServiceReference)

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

func (*ServiceReference) ResolveServiceURL added in v0.3.0

func (sr *ServiceReference) ResolveServiceURL(defaultNamespace string) string

ResolveServiceURL resolves the ServiceReference to a complete URL For in-cluster services (when Name is set), it constructs the URL from name, namespace, port, and scheme For external services (when URI is set), it returns the URI directly

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 WebAppManifest added in v0.1.4

type WebAppManifest struct {
	// Read more here: https://developer.mozilla.org/en-US/docs/Web/Manifest/name
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name *string `json:"name"`

	// Read more here: https://developer.mozilla.org/en-US/docs/Web/Manifest/icons
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Icons []PWAIcon `json:"icons"`

	// Read more here: https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url
	// URL needs to be relative to the base URL of the frontend class.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	StartUrl *string `json:"start_url"`

	// Read more here: https://developer.mozilla.org/en-US/docs/Web/Manifest/display
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Display *string `json:"display"`

	// Read more here: https://developer.mozilla.org/en-US/docs/Web/Manifest/display_override
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	DisplayOverride []string `json:"display_override,omitempty"`
}

WebAppManifest represents the web app manifest file for the PWA.

func (*WebAppManifest) DeepCopy added in v0.1.4

func (in *WebAppManifest) DeepCopy() *WebAppManifest

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

func (*WebAppManifest) DeepCopyInto added in v0.1.4

func (in *WebAppManifest) DeepCopyInto(out *WebAppManifest)

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 {
	// Conditions represent the latest available observations of the WebComponent's state
	// +optional
	// +listType=map
	// +listMapKey=type
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Phase represents the current lifecycle phase of the WebComponent
	// Possible values: Pending, Ready, Failed, MicroFrontendNotFound
	// +optional
	// +kubebuilder:validation:Enum=Pending;Ready;Failed;MicroFrontendNotFound
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Phase string `json:"phase,omitempty"`

	// MicroFrontendRef indicates the resolved MicroFrontend reference
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	MicroFrontendRef *ObjectReference `json:"microFrontendRef,omitempty"`

	// ObservedGeneration reflects the generation of the most recently observed WebComponent
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

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