v1beta1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 4

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() error

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

func (*Horizon) ValidateDelete

func (r *Horizon) ValidateDelete() error

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

func (*Horizon) ValidateUpdate

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

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

type HorizonDebug

type HorizonDebug struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=false
	// Service enable debug
	Service bool `json:"service"`
}

HorizonDebug can be used to enable debug in the Horizon service

func (*HorizonDebug) DeepCopy

func (in *HorizonDebug) DeepCopy() *HorizonDebug

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

func (*HorizonDebug) DeepCopyInto

func (in *HorizonDebug) DeepCopyInto(out *HorizonDebug)

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

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

	// +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
	// NodeSelector to target subset of worker nodes running this service
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// +kubebuilder:validation:Optional
	// Debug - enable debug for different deploy stages. If an init container is used, it runs and the
	// actual action pod gets started with sleep infinity
	Debug HorizonDebug `json:"debug,omitempty"`

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

	// +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: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:Required
	// +kubebuilder:default=memcached
	// Memcached instance name.
	MemcachedInstance string `json:"memcachedInstance"`

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

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 HorizonStatus

type HorizonStatus struct {
	// ReadyCount of Horizon instances
	ReadyCount int32 `json:"readyCount,omitempty"`

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

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