Help us shape the future of Go! Take the 2026 Go Developer Survey

v1beta1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 18 Imported by: 5

Documentation

Overview

Package v1beta1 contains API Schema definitions for the horizon v1beta1 API group +kubebuilder:object:generate=true +groupName=horizon.openstack.org

Index

Constants

View Source
const (
	// ContainerImage - default fall-back container image for Horizon if associated env var not provided
	ContainerImage = "quay.io/podified-antelope-centos9/openstack-horizon:current-podified"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "horizon.openstack.org", Version: "v1beta1"}

	// 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 SetupDefaults

func SetupDefaults()

SetupDefaults - initializes any CRD field defaults based on environment variables (the defaulting mechanism itself is implemented via webhooks)

func SetupHorizonDefaults

func SetupHorizonDefaults(defaults HorizonDefaults)

SetupHorizonDefaults - initialize Horizon spec defaults for use with either internal or external webhooks

Types

type HorizionOverrideSpec added in v0.2.0

type HorizionOverrideSpec struct {
	// Override configuration for the Service created to serve traffic to the cluster.
	Service *service.RoutedOverrideSpec `json:"service,omitempty"`
}

HorizionOverrideSpec to override the generated manifest of several child resources.

func (*HorizionOverrideSpec) DeepCopy added in v0.2.0

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

func (*HorizionOverrideSpec) DeepCopyInto added in v0.2.0

func (in *HorizionOverrideSpec) DeepCopyInto(out *HorizionOverrideSpec)

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

type Horizon

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

	Spec   HorizonSpec   `json:"spec,omitempty"`
	Status HorizonStatus `json:"status,omitempty"`
}

Horizon is the Schema for the horizons API

func (*Horizon) DeepCopy

func (in *Horizon) DeepCopy() *Horizon

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

func (*Horizon) DeepCopyInto

func (in *Horizon) DeepCopyInto(out *Horizon)

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

func (*Horizon) DeepCopyObject

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

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

func (*Horizon) Default

func (r *Horizon) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (Horizon) GetEndpoint

func (instance Horizon) GetEndpoint() (string, error)

GetEndpoint - Returns the OpenStack Dashboard URL

func (Horizon) IsReady

func (instance Horizon) IsReady() bool

IsReady - returns true if Horizon is reconciled successfully

func (Horizon) RbacConditionsSet

func (instance Horizon) RbacConditionsSet(c *condition.Condition)

RbacConditionsSet - set the conditions for the rbac object

func (Horizon) RbacNamespace

func (instance Horizon) RbacNamespace() string

RbacNamespace - return the namespace

func (Horizon) RbacResourceName

func (instance Horizon) RbacResourceName() string

RbacResourceName - return the name to be used for rbac objects (serviceaccount, role, rolebinding)

func (*Horizon) SetupWebhookWithManager

func (r *Horizon) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up the webhook with the Manager

func (*Horizon) ValidateCreate

func (r *Horizon) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Horizon) ValidateDelete

func (r *Horizon) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Horizon) ValidateUpdate

func (r *Horizon) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type HorizonDefaults

type HorizonDefaults struct {
	ContainerImageURL string
}

HorizonDefaults -

func (*HorizonDefaults) DeepCopy

func (in *HorizonDefaults) DeepCopy() *HorizonDefaults

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

func (*HorizonDefaults) DeepCopyInto

func (in *HorizonDefaults) DeepCopyInto(out *HorizonDefaults)

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

type HorizonExtraVolMounts added in v0.4.0

type HorizonExtraVolMounts struct {
	// +kubebuilder:validation:Optional
	Name string `json:"name,omitempty"`
	// +kubebuilder:validation:Optional
	Region string `json:"region,omitempty"`
	// +kubebuilder:validation:Required
	VolMounts []storage.VolMounts `json:"extraVol"`
}

HorizonExtraVolMounts exposes additional parameters processed by the horizon-operator and defines the common VolMounts structure provided by the main storage module

func (*HorizonExtraVolMounts) DeepCopy added in v0.4.0

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

func (*HorizonExtraVolMounts) DeepCopyInto added in v0.4.0

func (in *HorizonExtraVolMounts) DeepCopyInto(out *HorizonExtraVolMounts)

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

func (*HorizonExtraVolMounts) Propagate added in v0.4.0

Propagate is a function used to filter VolMounts according to the specified PropagationType array

type HorizonList

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

HorizonList contains a list of Horizon

func (*HorizonList) DeepCopy

func (in *HorizonList) DeepCopy() *HorizonList

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

func (*HorizonList) DeepCopyInto

func (in *HorizonList) DeepCopyInto(out *HorizonList)

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

func (*HorizonList) DeepCopyObject

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

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

type HorizonSpec

type HorizonSpec struct {
	// +kubebuilder:validation:Required
	// horizon Container Image URL
	ContainerImage string `json:"containerImage"`

	HorizonSpecCore `json:",inline"`
}

HorizonSpec defines the desired state of Horizon

func (*HorizonSpec) DeepCopy

func (in *HorizonSpec) DeepCopy() *HorizonSpec

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

func (*HorizonSpec) DeepCopyInto

func (in *HorizonSpec) DeepCopyInto(out *HorizonSpec)

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

func (*HorizonSpec) Default

func (spec *HorizonSpec) Default()

Default - set defaults for this Horizon spec

type HorizonSpecCore added in v0.4.0

type HorizonSpecCore struct {
	// +kubebuilder:validation:Optional
	// NodeSelector to target subset of worker nodes running this service
	NodeSelector *map[string]string `json:"nodeSelector,omitempty"`

	// +kubebuilder:validation:Optional
	// ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json.
	// But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
	// TODO: -> implement
	DefaultConfigOverwrite map[string]string `json:"defaultConfigOverwrite,omitempty"`

	// +kubebuilder:validation:Optional
	// Resources - Compute Resources required by this service (Limits/Requests).
	// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:validation:Optional
	// Override, provides the ability to override the generated manifest of several child resources.
	Override HorizionOverrideSpec `json:"override,omitempty"`

	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// TLS - Parameters related to the TLS
	TLS tls.SimpleService `json:"tls,omitempty"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Maximum=32
	// +kubebuilder:validation:Minimum=0
	// Replicas of horizon API to run
	Replicas *int32 `json:"replicas"`

	// +kubebuilder:validation:Required
	// Secret containing OpenStack password information for Horizon Secret Key
	Secret string `json:"secret"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default="# add your customization here"
	// CustomServiceConfig - customize the service config using this parameter to change service defaults,
	// or overwrite rendered information using raw OpenStack config format. The content gets added to
	// to /etc/openstack-dashboard/local_settings.d directory as 9999_custom_settings.py file.
	CustomServiceConfig string `json:"customServiceConfig"`

	// +kubebuilder:validation:Required
	// +kubebuilder:default=memcached
	// Memcached instance name.
	MemcachedInstance string `json:"memcachedInstance"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default=false
	// PreserveJobs - do not delete jobs after they finished e.g. to check logs
	PreserveJobs bool `json:"preserveJobs"`

	// ExtraMounts containing conf files
	// +kubebuilder:default={}
	ExtraMounts []HorizonExtraVolMounts `json:"extraMounts,omitempty"`

	// +kubebuilder:validation:Optional
	// NetworkAttachments is a list of NetworkAttachment resource names to expose the services to the given network
	NetworkAttachments []string `json:"networkAttachments,omitempty"`

	// +kubebuilder:validation:Optional
	// TopologyRef to apply the Topology defined by the associated CR referenced
	// by name
	TopologyRef *topologyv1.TopoRef `json:"topologyRef,omitempty"`
}

HorizonSpecBase -

func (*HorizonSpecCore) DeepCopy added in v0.4.0

func (in *HorizonSpecCore) DeepCopy() *HorizonSpecCore

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

func (*HorizonSpecCore) DeepCopyInto added in v0.4.0

func (in *HorizonSpecCore) DeepCopyInto(out *HorizonSpecCore)

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

func (*HorizonSpecCore) Default added in v0.4.0

func (spec *HorizonSpecCore) Default()

Default - set defaults for this Horizon spec core (this one gets used by OpenstackControlPlane)

type HorizonStatus

type HorizonStatus struct {
	// Map of hashes to track e.g. job status
	Hash map[string]string `json:"hash,omitempty"`

	// Endpoint url to access OpenStack Dashboard
	Endpoint string `json:"endpoint,omitempty"`

	// Conditions
	Conditions condition.Conditions `json:"conditions,omitempty" option:"true"`

	// ReadyCount of Horizon instances
	ReadyCount int32 `json:"readyCount,omitempty"`

	// ObservedGeneration - the most recent generation observed for this
	// service. If the observed generation is less than the spec generation,
	// then the controller has not processed the latest changes injected by
	// the opentack-operator in the top-level CR (e.g. the ContainerImage)
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// NetworkAttachments status of the deployment pods
	NetworkAttachments map[string][]string `json:"networkAttachments,omitempty"`

	// LastAppliedTopology - the last applied Topology
	LastAppliedTopology *topologyv1.TopoRef `json:"lastAppliedTopology,omitempty"`
}

HorizonStatus defines the observed state of Horizon

func (*HorizonStatus) DeepCopy

func (in *HorizonStatus) DeepCopy() *HorizonStatus

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

func (*HorizonStatus) DeepCopyInto

func (in *HorizonStatus) DeepCopyInto(out *HorizonStatus)

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