v1alpha2

package
v0.0.0-...-4634687 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the v1alpha2 API group +kubebuilder:object:generate=true +groupName=rhdh.redhat.com

Index

Constants

View Source
const (
	BackstageConditionTypeDeployed BackstageConditionType = "Deployed"

	BackstageConditionReasonDeployed   BackstageConditionReason = "Deployed"
	BackstageConditionReasonFailed     BackstageConditionReason = "DeployFailed"
	BackstageConditionReasonInProgress BackstageConditionReason = "DeployInProgress"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "rhdh.redhat.com", Version: "v1alpha2"}

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

type AppConfig struct {
	// Mount path for all app-config files listed in the ConfigMapRefs field
	// +optional
	// +kubebuilder:default=/opt/app-root/src
	MountPath string `json:"mountPath,omitempty"`

	// List of ConfigMaps storing the app-config files. Will be mounted as files under the MountPath specified.
	// For each item in this array, if a key is not specified, it means that all keys in the ConfigMap will be mounted as files.
	// Otherwise, only the specified key will be mounted as a file.
	// Bear in mind not to put sensitive data in those ConfigMaps. Instead, your app-config content can reference
	// environment variables (which you can set with the ExtraEnvs field) and/or include extra files (see the ExtraFiles field).
	// More details on https://backstage.io/docs/conf/writing/.
	// +optional
	ConfigMaps []ObjectKeyRef `json:"configMaps,omitempty"`
}

func (*AppConfig) DeepCopy

func (in *AppConfig) DeepCopy() *AppConfig

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

func (*AppConfig) DeepCopyInto

func (in *AppConfig) DeepCopyInto(out *AppConfig)

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

type Application

type Application struct {
	// References to existing app-configs ConfigMap objects, that will be mounted as files in the specified mount path.
	// Each element can be a reference to any ConfigMap or Secret,
	// and will be mounted inside the main application container under a specified mount directory.
	// Additionally, each file will be passed as a `--config /mount/path/to/configmap/key` to the
	// main container args in the order of the entries defined in the AppConfigs list.
	// But bear in mind that for a single ConfigMap element containing several filenames,
	// the order in which those files will be appended to the main container args cannot be guaranteed.
	// So if you want to pass multiple app-config files, it is recommended to pass one ConfigMap per app-config file.
	// +optional
	AppConfig *AppConfig `json:"appConfig,omitempty"`

	// Reference to an existing ConfigMap for Dynamic Plugins.
	// A new one will be generated with the default config if not set.
	// The ConfigMap object must have an existing key named: 'dynamic-plugins.yaml'.
	// +optional
	DynamicPluginsConfigMapName string `json:"dynamicPluginsConfigMapName,omitempty"`

	// References to existing Config objects to use as extra config files.
	// They will be mounted as files in the specified mount path.
	// Each element can be a reference to any ConfigMap or Secret.
	// +optional
	ExtraFiles *ExtraFiles `json:"extraFiles,omitempty"`

	// Extra environment variables
	// +optional
	ExtraEnvs *ExtraEnvs `json:"extraEnvs,omitempty"`

	// Number of desired replicas to set in the Backstage Deployment.
	// Defaults to 1.
	// +optional
	//+kubebuilder:default=1
	Replicas *int32 `json:"replicas,omitempty"`

	// Custom image to use in all containers (including Init Containers).
	// It is your responsibility to make sure the image is from trusted sources and has been validated for security compliance
	// +optional
	Image *string `json:"image,omitempty"`

	// Image Pull Secrets to use in all containers (including Init Containers)
	// +optional
	ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`

	// Route configuration. Used for OpenShift only.
	Route *Route `json:"route,omitempty"`
}

func (*Application) DeepCopy

func (in *Application) DeepCopy() *Application

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

func (*Application) DeepCopyInto

func (in *Application) DeepCopyInto(out *Application)

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

type Backstage

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

	Spec   BackstageSpec   `json:"spec,omitempty"`
	Status BackstageStatus `json:"status,omitempty"`
}

Backstage is the Schema for the backstages API

func (*Backstage) DeepCopy

func (in *Backstage) DeepCopy() *Backstage

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

func (*Backstage) DeepCopyInto

func (in *Backstage) DeepCopyInto(out *Backstage)

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

func (*Backstage) DeepCopyObject

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

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

type BackstageConditionReason

type BackstageConditionReason string

type BackstageConditionType

type BackstageConditionType string

type BackstageDeployment

type BackstageDeployment struct {
	// Valid fragment of Deployment to be merged with default/raw configuration.
	// Set the Deployment's metadata and|or spec fields you want to override or add.
	// Optional.
	// +kubebuilder:pruning:PreserveUnknownFields
	Patch *apiextensionsv1.JSON `json:"patch,omitempty"`
}

func (*BackstageDeployment) DeepCopy

func (in *BackstageDeployment) DeepCopy() *BackstageDeployment

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

func (*BackstageDeployment) DeepCopyInto

func (in *BackstageDeployment) DeepCopyInto(out *BackstageDeployment)

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

type BackstageList

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

BackstageList contains a list of Backstage

func (*BackstageList) DeepCopy

func (in *BackstageList) DeepCopy() *BackstageList

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

func (*BackstageList) DeepCopyInto

func (in *BackstageList) DeepCopyInto(out *BackstageList)

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

func (*BackstageList) DeepCopyObject

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

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

type BackstageSpec

type BackstageSpec struct {
	// Configuration for Backstage. Optional.
	Application *Application `json:"application,omitempty"`

	// Raw Runtime RuntimeObjects configuration. For Advanced scenarios.
	RawRuntimeConfig *RuntimeConfig `json:"rawRuntimeConfig,omitempty"`

	// Configuration for database access. Optional.
	Database *Database `json:"database,omitempty"`

	// Configuration for Backstage Deployment resource.
	// Optional.
	Deployment *BackstageDeployment `json:"deployment,omitempty"`
}

BackstageSpec defines the desired state of Backstage

func (*BackstageSpec) DeepCopy

func (in *BackstageSpec) DeepCopy() *BackstageSpec

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

func (*BackstageSpec) DeepCopyInto

func (in *BackstageSpec) DeepCopyInto(out *BackstageSpec)

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

func (*BackstageSpec) IsAuthSecretSpecified

func (s *BackstageSpec) IsAuthSecretSpecified() bool

func (*BackstageSpec) IsLocalDbEnabled

func (s *BackstageSpec) IsLocalDbEnabled() bool

IsLocalDbEnabled returns true if Local database is configured and enabled

func (*BackstageSpec) IsRouteEnabled

func (s *BackstageSpec) IsRouteEnabled() bool

IsRouteEnabled returns value of Application.Route.Enabled if defined or true by default

type BackstageStatus

type BackstageStatus struct {
	// Conditions is the list of conditions describing the state of the runtime
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

BackstageStatus defines the observed state of Backstage

func (*BackstageStatus) DeepCopy

func (in *BackstageStatus) DeepCopy() *BackstageStatus

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

func (*BackstageStatus) DeepCopyInto

func (in *BackstageStatus) DeepCopyInto(out *BackstageStatus)

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

type Database

type Database struct {
	// Control the creation of a local PostgreSQL DB. Set to false if using for example an external Database for Backstage.
	// +optional
	//+kubebuilder:default=true
	EnableLocalDb *bool `json:"enableLocalDb,omitempty"`

	// Name of the secret for database authentication. Optional.
	// For a local database deployment (EnableLocalDb=true), a secret will be auto generated if it does not exist.
	// The secret shall include information used for the database access.
	// An example for PostgreSQL DB access:
	// "POSTGRES_PASSWORD": "rl4s3Fh4ng3M4"
	// "POSTGRES_PORT": "5432"
	// "POSTGRES_USER": "postgres"
	// "POSTGRESQL_ADMIN_PASSWORD": "rl4s3Fh4ng3M4"
	// "POSTGRES_HOST": "backstage-psql-bs1"  # For local database, set to "backstage-psql-<CR name>".
	AuthSecretName string `json:"authSecretName,omitempty"`
}

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

type Env

type Env struct {
	// Name of the environment variable
	//+kubebuilder:validation:Required
	Name string `json:"name"`

	// Value of the environment variable
	//+kubebuilder:validation:Required
	Value string `json:"value"`
}

func (*Env) DeepCopy

func (in *Env) DeepCopy() *Env

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

func (*Env) DeepCopyInto

func (in *Env) DeepCopyInto(out *Env)

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

type ExtraEnvs

type ExtraEnvs struct {
	// List of references to ConfigMaps objects to inject as additional environment variables.
	// For each item in this array, if a key is not specified, it means that all keys in the ConfigMap will be injected as additional environment variables.
	// Otherwise, only the specified key will be injected as an additional environment variable.
	// +optional
	ConfigMaps []ObjectKeyRef `json:"configMaps,omitempty"`

	// List of references to Secrets objects to inject as additional environment variables.
	// For each item in this array, if a key is not specified, it means that all keys in the Secret will be injected as additional environment variables.
	// Otherwise, only the specified key will be injected as environment variable.
	// +optional
	Secrets []ObjectKeyRef `json:"secrets,omitempty"`

	// List of name and value pairs to add as environment variables.
	// +optional
	Envs []Env `json:"envs,omitempty"`
}

func (*ExtraEnvs) DeepCopy

func (in *ExtraEnvs) DeepCopy() *ExtraEnvs

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

func (*ExtraEnvs) DeepCopyInto

func (in *ExtraEnvs) DeepCopyInto(out *ExtraEnvs)

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

type ExtraFiles

type ExtraFiles struct {
	// Mount path for all extra configuration files listed in the Items field
	// +optional
	// +kubebuilder:default=/opt/app-root/src
	MountPath string `json:"mountPath,omitempty"`

	// List of references to ConfigMaps objects mounted as extra files under the MountPath specified.
	// For each item in this array, if a key is not specified, it means that all keys in the ConfigMap will be mounted as files.
	// Otherwise, only the specified key will be mounted as a file.
	// +optional
	ConfigMaps []ObjectKeyRef `json:"configMaps,omitempty"`

	// List of references to Secrets objects mounted as extra files under the MountPath specified.
	// For each item in this array, a key must be specified that will be mounted as a file.
	// +optional
	Secrets []ObjectKeyRef `json:"secrets,omitempty"`
}

func (*ExtraFiles) DeepCopy

func (in *ExtraFiles) DeepCopy() *ExtraFiles

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

func (*ExtraFiles) DeepCopyInto

func (in *ExtraFiles) DeepCopyInto(out *ExtraFiles)

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

type ObjectKeyRef

type ObjectKeyRef struct {
	// Name of the object
	// We support only ConfigMaps and Secrets.
	//+kubebuilder:validation:Required
	Name string `json:"name"`

	// Key in the object
	// +optional
	Key string `json:"key,omitempty"`
}

func (*ObjectKeyRef) DeepCopy

func (in *ObjectKeyRef) DeepCopy() *ObjectKeyRef

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

func (*ObjectKeyRef) DeepCopyInto

func (in *ObjectKeyRef) DeepCopyInto(out *ObjectKeyRef)

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

type Route

type Route struct {
	// Control the creation of a Route on OpenShift.
	// +optional
	//+kubebuilder:default=true
	Enabled *bool `json:"enabled,omitempty"`

	// Host is an alias/DNS that points to the service. Optional.
	// Ignored if Enabled is false.
	// If not specified a route name will typically be automatically
	// chosen.  Must follow DNS952 subdomain conventions.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$`
	Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`

	// Subdomain is a DNS subdomain that is requested within the ingress controller's
	// domain (as a subdomain).
	// Ignored if Enabled is false.
	// Example: subdomain `frontend` automatically receives the router subdomain
	// `apps.mycluster.com` to have a full hostname `frontend.apps.mycluster.com`.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$`
	Subdomain string `json:"subdomain,omitempty"`

	// The tls field provides the ability to configure certificates for the route.
	// Ignored if Enabled is false.
	// +optional
	TLS *TLS `json:"tls,omitempty"`
}

Route specifies configuration parameters for OpenShift Route for Backstage. Only a secured edge route is supported for Backstage.

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

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

func (*Route) DeepCopyInto

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

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

type RuntimeConfig

type RuntimeConfig struct {
	// Name of ConfigMap containing Backstage runtime objects configuration
	BackstageConfigName string `json:"backstageConfig,omitempty"`
	// Name of ConfigMap containing LocalDb (PostgreSQL) runtime objects configuration
	LocalDbConfigName string `json:"localDbConfig,omitempty"`
}

func (*RuntimeConfig) DeepCopy

func (in *RuntimeConfig) DeepCopy() *RuntimeConfig

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

func (*RuntimeConfig) DeepCopyInto

func (in *RuntimeConfig) DeepCopyInto(out *RuntimeConfig)

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

type TLS

type TLS struct {
	// certificate provides certificate contents. This should be a single serving certificate, not a certificate
	// chain. Do not include a CA certificate.
	Certificate string `json:"certificate,omitempty"`

	// ExternalCertificateSecretName provides certificate contents as a secret reference.
	// This should be a single serving certificate, not a certificate
	// chain. Do not include a CA certificate. The secret referenced should
	// be present in the same namespace as that of the Route.
	// Forbidden when `certificate` is set.
	// Note that securing Routes with external certificates in TLS secrets is a Technology Preview feature in OpenShift,
	// and requires enabling the `RouteExternalCertificate` OpenShift Feature Gate and might not be functionally complete.
	// +optional
	ExternalCertificateSecretName string `json:"externalCertificateSecretName,omitempty"`

	// key provides key file contents
	Key string `json:"key,omitempty"`

	// caCertificate provides the cert authority certificate contents
	CACertificate string `json:"caCertificate,omitempty"`
}

func (*TLS) DeepCopy

func (in *TLS) DeepCopy() *TLS

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

func (*TLS) DeepCopyInto

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

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

Jump to

Keyboard shortcuts

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