From 16af1e33634e681a74bba86305ab213f3972b4f2 Mon Sep 17 00:00:00 2001 From: gazarenkov Date: Sun, 26 Apr 2026 20:39:16 +0300 Subject: [PATCH 1/5] restore v1alpha1, v1alpha2, move v1alpha6 to v1alpha5 --- .rhdh/docs/airgap.adoc | 2 +- .rhdh/scripts/install-rhdh-catalog-source.sh | 2 +- .../scripts/prepare-restricted-environment.sh | 2 +- PROJECT | 4 +- api/current-types.go | 2 +- api/v1alpha1/backstage_types.go | 288 ++++++++++ .../groupversion_info.go | 6 +- api/v1alpha1/zz_generated.deepcopy.go | 351 ++++++++++++ api/{v1alpha6 => v1alpha2}/backstage_types.go | 146 +---- api/v1alpha2/groupversion_info.go | 20 + .../zz_generated.deepcopy.go | 154 ++---- api/v1alpha3/backstage_types.go | 2 + api/v1alpha3/zz_generated.deepcopy.go | 2 +- api/v1alpha4/zz_generated.deepcopy.go | 2 +- api/v1alpha5/backstage_types.go | 30 + api/v1alpha5/zz_generated.deepcopy.go | 22 +- ...kstage-operator.clusterserviceversion.yaml | 4 +- .../manifests/rhdh.redhat.com_backstages.yaml | 2 +- ...kstage-operator.clusterserviceversion.yaml | 40 +- .../manifests/rhdh.redhat.com_backstages.yaml | 513 +++++++++++++----- cmd/main.go | 2 +- .../crd/bases/rhdh.redhat.com_backstages.yaml | 513 +++++++++++++----- ...kstage-operator.clusterserviceversion.yaml | 2 +- ...kstage-operator.clusterserviceversion.yaml | 9 - config/samples/_v1alpha3_backstage.yaml | 8 - config/samples/_v1alpha6_backstage.yaml | 8 - config/samples/kustomization.yaml | 2 - dist/backstage.io/install.yaml | 2 +- dist/rhdh/install.yaml | 2 +- docs/configuration.md | 8 +- docs/dynamic-plugins.md | 2 +- docs/external-db.md | 2 +- docs/lightspeed.md | 2 +- docs/monitoring.md | 10 +- examples/bs-existing-secret.yaml | 2 +- examples/bs-route-disabled.yaml | 2 +- examples/bs-route.yaml | 2 +- examples/bs1.yaml | 2 +- examples/catalog-index.yaml | 2 +- examples/envvars.yaml | 2 +- examples/filemounts.yaml | 2 +- examples/lightspeed-disabled.yaml | 2 +- examples/lightspeed.yaml | 2 +- examples/local-bs.yaml | 2 +- examples/orchestrator-cicd.yaml | 2 +- examples/orchestrator.yaml | 2 +- examples/pvc-dp-cache.yaml | 2 +- examples/raw-runtime-config.yaml | 2 +- examples/rhdh-cr-with-app-configs.yaml | 2 +- examples/rhdh-cr.yaml | 2 +- .../rhdh-replace-dynaplugin-root.yaml | 2 +- .../testdata/spec-deployment.yaml | 2 +- internal/controller/preprocessor_test.go | 12 +- 53 files changed, 1590 insertions(+), 624 deletions(-) create mode 100644 api/v1alpha1/backstage_types.go rename api/{v1alpha6 => v1alpha1}/groupversion_info.go (82%) create mode 100644 api/v1alpha1/zz_generated.deepcopy.go rename api/{v1alpha6 => v1alpha2}/backstage_types.go (68%) create mode 100644 api/v1alpha2/groupversion_info.go rename api/{v1alpha6 => v1alpha2}/zz_generated.deepcopy.go (74%) delete mode 100644 config/samples/_v1alpha3_backstage.yaml delete mode 100644 config/samples/_v1alpha6_backstage.yaml diff --git a/.rhdh/docs/airgap.adoc b/.rhdh/docs/airgap.adoc index c06b979a2..7172790d0 100644 --- a/.rhdh/docs/airgap.adoc +++ b/.rhdh/docs/airgap.adoc @@ -225,7 +225,7 @@ On a vanilla Kubernetes, you can create a Custom Resource (CR) using `kubectl`, [source,yaml] ---- cat <". + AuthSecretName string `json:"authSecretName,omitempty"` +} + +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"` +} + +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"` +} + +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"` +} + +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"` +} + +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"` +} + +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"` +} + +// BackstageStatus defines the observed state of Backstage +type BackstageStatus struct { + // Conditions is the list of conditions describing the state of the runtime + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +//+kubebuilder:unservedversion +//+kubebuilder:deprecatedversion:warning="v1alpha1 is not served" +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +// +operator-sdk:csv:customresourcedefinitions:displayName="Red Hat Developer Hub" + +// Backstage is the Schema for the Red Hat Developer Hub backstages API. +// It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, +// which can help streamline the process of setting up a self-managed internal +// developer portal for adopters who are just starting out. +type Backstage struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BackstageSpec `json:"spec,omitempty"` + Status BackstageStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// BackstageList contains a list of Backstage +type BackstageList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Backstage `json:"items"` +} + +// Route specifies configuration parameters for OpenShift Route for Backstage. +// Only a secured edge route is supported for Backstage. +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"` +} + +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 init() { + SchemeBuilder.Register(&Backstage{}, &BackstageList{}) +} + +// IsLocalDbEnabled returns true if Local database is configured and enabled +func (s *BackstageSpec) IsLocalDbEnabled() bool { + if s.Database == nil { + return true + } + return ptr.Deref(s.Database.EnableLocalDb, true) +} + +// IsRouteEnabled returns value of Application.Route.Enabled if defined or true by default +func (s *BackstageSpec) IsRouteEnabled() bool { + if s.Application != nil && s.Application.Route != nil { + return ptr.Deref(s.Application.Route.Enabled, true) + } + return true +} + +func (s *BackstageSpec) IsAuthSecretSpecified() bool { + return s.Database != nil && s.Database.AuthSecretName != "" +} diff --git a/api/v1alpha6/groupversion_info.go b/api/v1alpha1/groupversion_info.go similarity index 82% rename from api/v1alpha6/groupversion_info.go rename to api/v1alpha1/groupversion_info.go index a07ab4500..5e0d3d257 100644 --- a/api/v1alpha6/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -1,7 +1,7 @@ -// Package v1alpha6 contains API Schema definitions for the v1alpha6 API group +// Package v1alpha1 contains API Schema definitions for the v1alpha1 API group // +kubebuilder:object:generate=true // +groupName=rhdh.redhat.com -package v1alpha6 +package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -10,7 +10,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "rhdh.redhat.com", Version: "v1alpha6"} + GroupVersion = schema.GroupVersion{Group: "rhdh.redhat.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..ca4d7a346 --- /dev/null +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,351 @@ +//go:build !ignore_autogenerated + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppConfig) DeepCopyInto(out *AppConfig) { + *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppConfig. +func (in *AppConfig) DeepCopy() *AppConfig { + if in == nil { + return nil + } + out := new(AppConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Application) DeepCopyInto(out *Application) { + *out = *in + if in.AppConfig != nil { + in, out := &in.AppConfig, &out.AppConfig + *out = new(AppConfig) + (*in).DeepCopyInto(*out) + } + if in.ExtraFiles != nil { + in, out := &in.ExtraFiles, &out.ExtraFiles + *out = new(ExtraFiles) + (*in).DeepCopyInto(*out) + } + if in.ExtraEnvs != nil { + in, out := &in.ExtraEnvs, &out.ExtraEnvs + *out = new(ExtraEnvs) + (*in).DeepCopyInto(*out) + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(string) + **out = **in + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Route != nil { + in, out := &in.Route, &out.Route + *out = new(Route) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application. +func (in *Application) DeepCopy() *Application { + if in == nil { + return nil + } + out := new(Application) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Backstage) DeepCopyInto(out *Backstage) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backstage. +func (in *Backstage) DeepCopy() *Backstage { + if in == nil { + return nil + } + out := new(Backstage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Backstage) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackstageList) DeepCopyInto(out *BackstageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Backstage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackstageList. +func (in *BackstageList) DeepCopy() *BackstageList { + if in == nil { + return nil + } + out := new(BackstageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackstageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackstageSpec) DeepCopyInto(out *BackstageSpec) { + *out = *in + if in.Application != nil { + in, out := &in.Application, &out.Application + *out = new(Application) + (*in).DeepCopyInto(*out) + } + if in.RawRuntimeConfig != nil { + in, out := &in.RawRuntimeConfig, &out.RawRuntimeConfig + *out = new(RuntimeConfig) + **out = **in + } + if in.Database != nil { + in, out := &in.Database, &out.Database + *out = new(Database) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackstageSpec. +func (in *BackstageSpec) DeepCopy() *BackstageSpec { + if in == nil { + return nil + } + out := new(BackstageSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackstageStatus) DeepCopyInto(out *BackstageStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackstageStatus. +func (in *BackstageStatus) DeepCopy() *BackstageStatus { + if in == nil { + return nil + } + out := new(BackstageStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Database) DeepCopyInto(out *Database) { + *out = *in + if in.EnableLocalDb != nil { + in, out := &in.EnableLocalDb, &out.EnableLocalDb + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Database. +func (in *Database) DeepCopy() *Database { + if in == nil { + return nil + } + out := new(Database) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Env) DeepCopyInto(out *Env) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Env. +func (in *Env) DeepCopy() *Env { + if in == nil { + return nil + } + out := new(Env) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtraEnvs) DeepCopyInto(out *ExtraEnvs) { + *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) + } + if in.Envs != nil { + in, out := &in.Envs, &out.Envs + *out = make([]Env, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraEnvs. +func (in *ExtraEnvs) DeepCopy() *ExtraEnvs { + if in == nil { + return nil + } + out := new(ExtraEnvs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtraFiles) DeepCopyInto(out *ExtraFiles) { + *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraFiles. +func (in *ExtraFiles) DeepCopy() *ExtraFiles { + if in == nil { + return nil + } + out := new(ExtraFiles) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectKeyRef) DeepCopyInto(out *ObjectKeyRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectKeyRef. +func (in *ObjectKeyRef) DeepCopy() *ObjectKeyRef { + if in == nil { + return nil + } + out := new(ObjectKeyRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Route) DeepCopyInto(out *Route) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(TLS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. +func (in *Route) DeepCopy() *Route { + if in == nil { + return nil + } + out := new(Route) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuntimeConfig) DeepCopyInto(out *RuntimeConfig) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeConfig. +func (in *RuntimeConfig) DeepCopy() *RuntimeConfig { + if in == nil { + return nil + } + out := new(RuntimeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLS) DeepCopyInto(out *TLS) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS. +func (in *TLS) DeepCopy() *TLS { + if in == nil { + return nil + } + out := new(TLS) + in.DeepCopyInto(out) + return out +} diff --git a/api/v1alpha6/backstage_types.go b/api/v1alpha2/backstage_types.go similarity index 68% rename from api/v1alpha6/backstage_types.go rename to api/v1alpha2/backstage_types.go index 299f1d5a6..20412c3ef 100644 --- a/api/v1alpha6/backstage_types.go +++ b/api/v1alpha2/backstage_types.go @@ -1,4 +1,4 @@ -package v1alpha6 +package v1alpha2 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -20,7 +20,6 @@ const ( // BackstageSpec defines the desired state of Backstage type BackstageSpec struct { - // Configuration for Backstage. Optional. Application *Application `json:"application,omitempty"` @@ -30,27 +29,9 @@ type BackstageSpec struct { // Configuration for database access. Optional. Database *Database `json:"database,omitempty"` - // Monitoring config to enable ServiceMonitor for metrics - // +optional - // +kubebuilder:default={enabled:false} - Monitoring Monitoring `json:"monitoring,omitempty"` - - // 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. + // Configuration for Backstage Deployment resource. // Optional. Deployment *BackstageDeployment `json:"deployment,omitempty"` - - // Flavours specifies which pre-configured templates to enable. - // Flavours are variations of the default configuration that extend and override - // base defaults with domain-specific customizations. - // - // If not specified (nil), flavours with enabledByDefault: true in their metadata are used. - // If specified as empty array ([]), default flavours are disabled. - // To disable a default flavour, explicitly list it with enabled: false. - // - // Multiple flavours can be enabled - configs are merged in the order specified. - // +optional - Flavours []Flavour `json:"flavours,omitempty"` } type BackstageDeployment struct { @@ -59,11 +40,6 @@ type BackstageDeployment struct { // Optional. // +kubebuilder:pruning:PreserveUnknownFields Patch *apiextensionsv1.JSON `json:"patch,omitempty"` - - // Kind of the deployment object. Can be Deployment or StatefulSet. - // +optional - // +kubebuilder:validation:Enum=Deployment;StatefulSet - Kind string `json:"kind,omitempty"` } type RuntimeConfig struct { @@ -91,13 +67,6 @@ type Database struct { AuthSecretName string `json:"authSecretName,omitempty"` } -type Monitoring struct { - // Enable ServiceMonitor for Prometheus scraping - // +optional - // +kubebuilder:default=false - Enabled bool `json:"enabled,omitempty"` -} - 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, @@ -126,6 +95,21 @@ type Application struct { // +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"` } @@ -143,7 +127,7 @@ type AppConfig struct { // 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 []FileObjectRef `json:"configMaps,omitempty"` + ConfigMaps []ObjectKeyRef `json:"configMaps,omitempty"` } type ExtraFiles struct { @@ -156,17 +140,12 @@ type ExtraFiles struct { // 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 []FileObjectRef `json:"configMaps,omitempty"` + 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 []FileObjectRef `json:"secrets,omitempty"` - - // List of references to Persistent Volume Claim objects mounted as extra files - // For each item in this array, a key must be specified that will be mounted as a file. - // +optional - Pvcs []PvcRef `json:"pvcs,omitempty"` + Secrets []ObjectKeyRef `json:"secrets,omitempty"` } type ExtraEnvs struct { @@ -174,20 +153,20 @@ type ExtraEnvs struct { // 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 []EnvObjectRef `json:"configMaps,omitempty"` + 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 []EnvObjectRef `json:"secrets,omitempty"` + Secrets []ObjectKeyRef `json:"secrets,omitempty"` // List of name and value pairs to add as environment variables. // +optional Envs []Env `json:"envs,omitempty"` } -type EnvObjectRef struct { +type ObjectKeyRef struct { // Name of the object // We support only ConfigMaps and Secrets. //+kubebuilder:validation:Required @@ -196,52 +175,6 @@ type EnvObjectRef struct { // Key in the object // +optional Key string `json:"key,omitempty"` - - // If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - // If it contains only "*", it means all containers and no other names are allowed. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:XValidation:rule="!(size(self) != 1 && self[0]==\"*\")",message="If '*' is specified, no other container names are allowed" - Containers []string `json:"containers,omitempty"` -} - -type FileObjectRef struct { - // Name of the object - // Supported ConfigMaps and Secrets - //+kubebuilder:validation:Required - Name string `json:"name"` - - // Key in the object - // +optional - Key string `json:"key,omitempty"` - - // Path to mount the Object. If not specified default-path/Name will be used - // +optional - MountPath string `json:"mountPath"` - - // If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - // If it contains only "*", it means all containers and no other names are allowed. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:XValidation:rule="!(size(self) != 1 && self[0]==\"*\")",message="If '*' is specified, no other container names are allowed" - Containers []string `json:"containers,omitempty"` -} - -type PvcRef struct { - // Name of the object - //+kubebuilder:validation:Required - Name string `json:"name"` - - // Path to mount PVC. If not specified default-path/Name will be used - // +optional - MountPath string `json:"mountPath"` - - // If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - // If it contains only "*", it means all containers and no other names are allowed. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:XValidation:rule="!(size(self) != 1 && self[0]==\"*\")",message="If '*' is specified, no other container names are allowed" - Containers []string `json:"containers,omitempty"` } type Env struct { @@ -252,13 +185,6 @@ type Env struct { // Value of the environment variable //+kubebuilder:validation:Required Value string `json:"value"` - - // If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - // If it contains only "*", it means all containers and no other names are allowed. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:XValidation:rule="!(size(self) != 1 && self[0]==\"*\")",message="If '*' is specified, no other container names are allowed" - Containers []string `json:"containers,omitempty"` } // BackstageStatus defines the observed state of Backstage @@ -268,9 +194,10 @@ type BackstageStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty"` } +//+kubebuilder:unservedversion +//+kubebuilder:deprecatedversion:warning="v1alpha2 is not served" //+kubebuilder:object:root=true //+kubebuilder:subresource:status -//+kubebuilder:storageversion // +operator-sdk:csv:customresourcedefinitions:displayName="Red Hat Developer Hub" // Backstage is the Schema for the Red Hat Developer Hub backstages API. @@ -349,22 +276,6 @@ type TLS struct { CACertificate string `json:"caCertificate,omitempty"` } -// Flavour represents a pre-configured template that extends the default configuration. -// Flavours provide domain-specific customizations (e.g., Orchestrator, Lightspeed) -// while falling back to base defaults for everything else. -type Flavour struct { - // Name of the flavour to enable (e.g., "orchestrator", "lightspeed") - // +kubebuilder:validation:Required - Name string `json:"name"` - - // Enabled controls whether this flavour is active. - // Defaults to true when not specified. - // Set to false to explicitly disable a flavour (including default flavours). - // +optional - // +kubebuilder:default=true - Enabled bool `json:"enabled,omitempty"` -} - func init() { SchemeBuilder.Register(&Backstage{}, &BackstageList{}) } @@ -388,10 +299,3 @@ func (s *BackstageSpec) IsRouteEnabled() bool { func (s *BackstageSpec) IsAuthSecretSpecified() bool { return s.Database != nil && s.Database.AuthSecretName != "" } - -// IsMonitoringEnabled checks if monitoring is explicitly enabled in the BackstageSpec. -// Returns false if the Monitoring field is nil (not configured) or explicitly disabled. -// Returns true only when spec.monitoring.enabled is set to true in the CR -func (s *BackstageSpec) IsMonitoringEnabled() bool { - return s.Monitoring.Enabled -} diff --git a/api/v1alpha2/groupversion_info.go b/api/v1alpha2/groupversion_info.go new file mode 100644 index 000000000..1aa64ab3c --- /dev/null +++ b/api/v1alpha2/groupversion_info.go @@ -0,0 +1,20 @@ +// Package v1alpha2 contains API Schema definitions for the v1alpha2 API group +// +kubebuilder:object:generate=true +// +groupName=rhdh.redhat.com +package v1alpha2 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +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 +) diff --git a/api/v1alpha6/zz_generated.deepcopy.go b/api/v1alpha2/zz_generated.deepcopy.go similarity index 74% rename from api/v1alpha6/zz_generated.deepcopy.go rename to api/v1alpha2/zz_generated.deepcopy.go index 5e0360ece..1357c08bd 100644 --- a/api/v1alpha6/zz_generated.deepcopy.go +++ b/api/v1alpha2/zz_generated.deepcopy.go @@ -2,10 +2,10 @@ // Code generated by controller-gen. DO NOT EDIT. -package v1alpha6 +package v1alpha2 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -15,10 +15,8 @@ func (in *AppConfig) DeepCopyInto(out *AppConfig) { *out = *in if in.ConfigMaps != nil { in, out := &in.ConfigMaps, &out.ConfigMaps - *out = make([]FileObjectRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) } } @@ -50,6 +48,21 @@ func (in *Application) DeepCopyInto(out *Application) { *out = new(ExtraEnvs) (*in).DeepCopyInto(*out) } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(string) + **out = **in + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.Route != nil { in, out := &in.Route, &out.Route *out = new(Route) @@ -164,17 +177,11 @@ func (in *BackstageSpec) DeepCopyInto(out *BackstageSpec) { *out = new(Database) (*in).DeepCopyInto(*out) } - out.Monitoring = in.Monitoring if in.Deployment != nil { in, out := &in.Deployment, &out.Deployment *out = new(BackstageDeployment) (*in).DeepCopyInto(*out) } - if in.Flavours != nil { - in, out := &in.Flavours, &out.Flavours - *out = make([]Flavour, len(*in)) - copy(*out, *in) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackstageSpec. @@ -232,11 +239,6 @@ func (in *Database) DeepCopy() *Database { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Env) DeepCopyInto(out *Env) { *out = *in - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]string, len(*in)) - copy(*out, *in) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Env. @@ -249,49 +251,23 @@ func (in *Env) DeepCopy() *Env { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvObjectRef) DeepCopyInto(out *EnvObjectRef) { - *out = *in - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvObjectRef. -func (in *EnvObjectRef) DeepCopy() *EnvObjectRef { - if in == nil { - return nil - } - out := new(EnvObjectRef) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExtraEnvs) DeepCopyInto(out *ExtraEnvs) { *out = *in if in.ConfigMaps != nil { in, out := &in.ConfigMaps, &out.ConfigMaps - *out = make([]EnvObjectRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets - *out = make([]EnvObjectRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) } if in.Envs != nil { in, out := &in.Envs, &out.Envs *out = make([]Env, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + copy(*out, *in) } } @@ -310,24 +286,13 @@ func (in *ExtraFiles) DeepCopyInto(out *ExtraFiles) { *out = *in if in.ConfigMaps != nil { in, out := &in.ConfigMaps, &out.ConfigMaps - *out = make([]FileObjectRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets - *out = make([]FileObjectRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Pvcs != nil { - in, out := &in.Pvcs, &out.Pvcs - *out = make([]PvcRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + *out = make([]ObjectKeyRef, len(*in)) + copy(*out, *in) } } @@ -342,71 +307,16 @@ func (in *ExtraFiles) DeepCopy() *ExtraFiles { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FileObjectRef) DeepCopyInto(out *FileObjectRef) { - *out = *in - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileObjectRef. -func (in *FileObjectRef) DeepCopy() *FileObjectRef { - if in == nil { - return nil - } - out := new(FileObjectRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Flavour) DeepCopyInto(out *Flavour) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavour. -func (in *Flavour) DeepCopy() *Flavour { - if in == nil { - return nil - } - out := new(Flavour) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Monitoring) DeepCopyInto(out *Monitoring) { +func (in *ObjectKeyRef) DeepCopyInto(out *ObjectKeyRef) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Monitoring. -func (in *Monitoring) DeepCopy() *Monitoring { - if in == nil { - return nil - } - out := new(Monitoring) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PvcRef) DeepCopyInto(out *PvcRef) { - *out = *in - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PvcRef. -func (in *PvcRef) DeepCopy() *PvcRef { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectKeyRef. +func (in *ObjectKeyRef) DeepCopy() *ObjectKeyRef { if in == nil { return nil } - out := new(PvcRef) + out := new(ObjectKeyRef) in.DeepCopyInto(out) return out } diff --git a/api/v1alpha3/backstage_types.go b/api/v1alpha3/backstage_types.go index a5d766622..454e88943 100644 --- a/api/v1alpha3/backstage_types.go +++ b/api/v1alpha3/backstage_types.go @@ -225,6 +225,8 @@ type BackstageStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty"` } +//+kubebuilder:unservedversion +//+kubebuilder:deprecatedversion:warning="v1alpha3 is not served" //+kubebuilder:object:root=true //+kubebuilder:subresource:status // +operator-sdk:csv:customresourcedefinitions:displayName="Red Hat Developer Hub" diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go index b315b789e..6613a8896 100644 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ b/api/v1alpha3/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha3 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha4/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go index c9c126a0f..9c86c46ee 100644 --- a/api/v1alpha4/zz_generated.deepcopy.go +++ b/api/v1alpha4/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha4 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha5/backstage_types.go b/api/v1alpha5/backstage_types.go index 70a266c57..9687e08b5 100644 --- a/api/v1alpha5/backstage_types.go +++ b/api/v1alpha5/backstage_types.go @@ -20,6 +20,7 @@ const ( // BackstageSpec defines the desired state of Backstage type BackstageSpec struct { + // Configuration for Backstage. Optional. Application *Application `json:"application,omitempty"` @@ -38,6 +39,18 @@ type BackstageSpec struct { // Set the Deployment's metadata and|or spec fields you want to override or add. // Optional. Deployment *BackstageDeployment `json:"deployment,omitempty"` + + // Flavours specifies which pre-configured templates to enable. + // Flavours are variations of the default configuration that extend and override + // base defaults with domain-specific customizations. + // + // If not specified (nil), flavours with enabledByDefault: true in their metadata are used. + // If specified as empty array ([]), default flavours are disabled. + // To disable a default flavour, explicitly list it with enabled: false. + // + // Multiple flavours can be enabled - configs are merged in the order specified. + // +optional + Flavours []Flavour `json:"flavours,omitempty"` } type BackstageDeployment struct { @@ -257,6 +270,7 @@ type BackstageStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status +//+kubebuilder:storageversion // +operator-sdk:csv:customresourcedefinitions:displayName="Red Hat Developer Hub" // Backstage is the Schema for the Red Hat Developer Hub backstages API. @@ -335,6 +349,22 @@ type TLS struct { CACertificate string `json:"caCertificate,omitempty"` } +// Flavour represents a pre-configured template that extends the default configuration. +// Flavours provide domain-specific customizations (e.g., Orchestrator, Lightspeed) +// while falling back to base defaults for everything else. +type Flavour struct { + // Name of the flavour to enable (e.g., "orchestrator", "lightspeed") + // +kubebuilder:validation:Required + Name string `json:"name"` + + // Enabled controls whether this flavour is active. + // Defaults to true when not specified. + // Set to false to explicitly disable a flavour (including default flavours). + // +optional + // +kubebuilder:default=true + Enabled bool `json:"enabled,omitempty"` +} + func init() { SchemeBuilder.Register(&Backstage{}, &BackstageList{}) } diff --git a/api/v1alpha5/zz_generated.deepcopy.go b/api/v1alpha5/zz_generated.deepcopy.go index 9e8b769c9..3ded0a64d 100644 --- a/api/v1alpha5/zz_generated.deepcopy.go +++ b/api/v1alpha5/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha5 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -170,6 +170,11 @@ func (in *BackstageSpec) DeepCopyInto(out *BackstageSpec) { *out = new(BackstageDeployment) (*in).DeepCopyInto(*out) } + if in.Flavours != nil { + in, out := &in.Flavours, &out.Flavours + *out = make([]Flavour, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackstageSpec. @@ -356,6 +361,21 @@ func (in *FileObjectRef) DeepCopy() *FileObjectRef { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Flavour) DeepCopyInto(out *Flavour) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavour. +func (in *Flavour) DeepCopy() *Flavour { + if in == nil { + return nil + } + out := new(Flavour) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Monitoring) DeepCopyInto(out *Monitoring) { *out = *in diff --git a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml index a7d2a2703..4d13c5b82 100644 --- a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml @@ -35,7 +35,7 @@ metadata: } }, { - "apiVersion": "rhdh.redhat.com/v1alpha6", + "apiVersion": "rhdh.redhat.com/v1alpha5", "kind": "Backstage", "metadata": { "labels": { @@ -91,7 +91,7 @@ spec: displayName: Red Hat Developer Hub kind: Backstage name: backstages.rhdh.redhat.com - version: v1alpha6 + version: v1alpha5 description: | Backstage Operator displayName: Backstage Operator diff --git a/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml b/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml index 023784b89..b17de1817 100644 --- a/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml +++ b/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml @@ -1397,7 +1397,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha6 + - name: v1alpha5 schema: openAPIV3Schema: description: |- diff --git a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml index b9d9e228c..aa7f5a44d 100644 --- a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml @@ -4,16 +4,6 @@ metadata: annotations: alm-examples: |- [ - { - "apiVersion": "rhdh.redhat.com/v1alpha3", - "kind": "Backstage", - "metadata": { - "labels": { - "app.kubernetes.io/name": "backstage" - }, - "name": "developer-hub" - } - }, { "apiVersion": "rhdh.redhat.com/v1alpha4", "kind": "Backstage", @@ -33,23 +23,13 @@ metadata: }, "name": "developer-hub" } - }, - { - "apiVersion": "rhdh.redhat.com/v1alpha6", - "kind": "Backstage", - "metadata": { - "labels": { - "app.kubernetes.io/name": "backstage" - }, - "name": "developer-hub" - } } ] capabilities: Seamless Upgrades categories: Developer Tools certified: "true" containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.10 - createdAt: "2026-04-22T07:13:05Z" + createdAt: "2026-04-26T17:32:20Z" description: Red Hat Developer Hub is a Red Hat supported version of Backstage. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed @@ -80,15 +60,6 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha3 - description: |- Backstage is the Schema for the Red Hat Developer Hub backstages API. It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, @@ -107,15 +78,6 @@ spec: kind: Backstage name: backstages.rhdh.redhat.com version: v1alpha5 - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha6 description: | Red Hat Developer Hub is an enterprise-grade platform for building developer portals, containing a supported and opinionated framework. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed internal developer portal for adopters who are just starting out. By implementing a unified and open platform designed to maximize developer skills, ease onboarding, and increase development productivity, focus can be centered on what really matters: writing great code. Red Hat Developer Hub also offers Software Templates to simplify the development process, which can reduce friction and frustration for development teams, boosting their productivity and increasing an organization's competitive advantage. diff --git a/bundle/rhdh/manifests/rhdh.redhat.com_backstages.yaml b/bundle/rhdh/manifests/rhdh.redhat.com_backstages.yaml index 023784b89..271d6e40b 100644 --- a/bundle/rhdh/manifests/rhdh.redhat.com_backstages.yaml +++ b/bundle/rhdh/manifests/rhdh.redhat.com_backstages.yaml @@ -14,7 +14,9 @@ spec: singular: backstage scope: Namespaced versions: - - name: v1alpha3 + - deprecated: true + deprecationWarning: v1alpha1 is not served + name: v1alpha1 schema: openAPIV3Schema: description: |- @@ -70,14 +72,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -169,14 +167,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -187,23 +181,368 @@ spec: description: Mount path for all extra configuration files listed in the Items field type: string - pvcs: + secrets: description: |- - List of references to Persistent Volume Claim objects mounted as extra files + 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. items: properties: - mountPath: - description: Path to mount PVC. If not specified default-path/Name - will be used + key: + description: Key in the object type: string name: - description: Name of the object + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer + route: + description: Route configuration. Used for OpenShift only. + properties: + enabled: + default: true + description: Control the creation of a Route on OpenShift. + type: boolean + host: + description: |- + 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. + maxLength: 253 + 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]))*$ + type: string + subdomain: + description: |- + 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`. + maxLength: 253 + 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]))*$ + type: string + tls: + description: |- + The tls field provides the ability to configure certificates for the route. + Ignored if Enabled is false. + properties: + caCertificate: + description: caCertificate provides the cert authority + certificate contents + type: string + certificate: + description: |- + certificate provides certificate contents. This should be a single serving certificate, not a certificate + chain. Do not include a CA certificate. + type: string + externalCertificateSecretName: + description: |- + 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. + type: string + key: + description: key provides key file contents + type: string + type: object + type: object + type: object + database: + description: Configuration for database access. Optional. + properties: + authSecretName: + description: |- + 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-". + type: string + enableLocalDb: + default: true + description: Control the creation of a local PostgreSQL DB. Set + to false if using for example an external Database for Backstage. + type: boolean + type: object + rawRuntimeConfig: + description: Raw Runtime RuntimeObjects configuration. For Advanced + scenarios. + properties: + backstageConfig: + description: Name of ConfigMap containing Backstage runtime objects + configuration + type: string + localDbConfig: + description: Name of ConfigMap containing LocalDb (PostgreSQL) + runtime objects configuration + type: string + type: object + type: object + status: + description: BackstageStatus defines the observed state of Backstage + properties: + conditions: + description: Conditions is the list of conditions describing the state + of the runtime + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + deprecationWarning: v1alpha2 is not served + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + Backstage is the Schema for the Red Hat Developer Hub backstages API. + It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, + which can help streamline the process of setting up a self-managed internal + developer portal for adopters who are just starting out. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BackstageSpec defines the desired state of Backstage + properties: + application: + description: Configuration for Backstage. Optional. + properties: + appConfig: + description: |- + 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. + properties: + configMaps: + description: |- + 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/. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. type: string required: - name type: object type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all app-config files listed in + the ConfigMapRefs field + type: string + type: object + dynamicPluginsConfigMapName: + description: |- + 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'. + type: string + extraEnvs: + description: Extra environment variables + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + envs: + description: List of name and value pairs to add as environment + variables. + items: + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable + type: string + required: + - name + - value + type: object + type: array + secrets: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + extraFiles: + description: |- + 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. + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all extra configuration files + listed in the Items field + type: string secrets: description: |- List of references to Secrets objects mounted as extra files under the MountPath specified. @@ -213,14 +552,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -324,8 +659,7 @@ spec: type: object deployment: description: |- - 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. + Configuration for Backstage Deployment resource. Optional. properties: patch: @@ -412,11 +746,13 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha4 + - deprecated: true + deprecationWarning: v1alpha3 is not served + name: v1alpha3 schema: openAPIV3Schema: description: |- @@ -469,18 +805,6 @@ spec: More details on https://backstage.io/docs/conf/writing/. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -519,18 +843,6 @@ spec: Otherwise, only the specified key will be injected as an additional environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -548,18 +860,6 @@ spec: variables. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' name: description: Name of the environment variable type: string @@ -578,18 +878,6 @@ spec: Otherwise, only the specified key will be injected as environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -616,18 +904,6 @@ spec: Otherwise, only the specified key will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -655,18 +931,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' mountPath: description: Path to mount PVC. If not specified default-path/Name will be used @@ -684,18 +948,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -821,16 +1073,6 @@ spec: Optional. x-kubernetes-preserve-unknown-fields: true type: object - monitoring: - default: - enabled: false - description: Monitoring config to enable ServiceMonitor for metrics - properties: - enabled: - default: false - description: Enable ServiceMonitor for Prometheus scraping - type: boolean - type: object rawRuntimeConfig: description: Raw Runtime RuntimeObjects configuration. For Advanced scenarios. @@ -908,11 +1150,11 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha5 + - name: v1alpha4 schema: openAPIV3Schema: description: |- @@ -1209,6 +1451,24 @@ spec: type: object type: array type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer route: description: Route configuration. Used for OpenShift only. properties: @@ -1292,13 +1552,6 @@ spec: Set the Deployment's metadata and|or spec fields you want to override or add. Optional. properties: - kind: - description: Kind of the deployment object. Can be Deployment - or StatefulSet. - enum: - - Deployment - - StatefulSet - type: string patch: description: |- Valid fragment of Deployment to be merged with default/raw configuration. @@ -1397,7 +1650,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha6 + - name: v1alpha5 schema: openAPIV3Schema: description: |- diff --git a/cmd/main.go b/cmd/main.go index 44a84c77c..64c6e9b8f 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - bsv1 "github.com/redhat-developer/rhdh-operator/api/v1alpha6" + bsv1 "github.com/redhat-developer/rhdh-operator/api/v1alpha5" "github.com/redhat-developer/rhdh-operator/internal/controller" diff --git a/config/crd/bases/rhdh.redhat.com_backstages.yaml b/config/crd/bases/rhdh.redhat.com_backstages.yaml index 2e8e3cce3..109073c27 100644 --- a/config/crd/bases/rhdh.redhat.com_backstages.yaml +++ b/config/crd/bases/rhdh.redhat.com_backstages.yaml @@ -14,7 +14,9 @@ spec: singular: backstage scope: Namespaced versions: - - name: v1alpha3 + - deprecated: true + deprecationWarning: v1alpha1 is not served + name: v1alpha1 schema: openAPIV3Schema: description: |- @@ -70,14 +72,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -169,14 +167,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -187,23 +181,368 @@ spec: description: Mount path for all extra configuration files listed in the Items field type: string - pvcs: + secrets: description: |- - List of references to Persistent Volume Claim objects mounted as extra files + 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. items: properties: - mountPath: - description: Path to mount PVC. If not specified default-path/Name - will be used + key: + description: Key in the object type: string name: - description: Name of the object + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer + route: + description: Route configuration. Used for OpenShift only. + properties: + enabled: + default: true + description: Control the creation of a Route on OpenShift. + type: boolean + host: + description: |- + 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. + maxLength: 253 + 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]))*$ + type: string + subdomain: + description: |- + 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`. + maxLength: 253 + 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]))*$ + type: string + tls: + description: |- + The tls field provides the ability to configure certificates for the route. + Ignored if Enabled is false. + properties: + caCertificate: + description: caCertificate provides the cert authority + certificate contents + type: string + certificate: + description: |- + certificate provides certificate contents. This should be a single serving certificate, not a certificate + chain. Do not include a CA certificate. + type: string + externalCertificateSecretName: + description: |- + 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. + type: string + key: + description: key provides key file contents + type: string + type: object + type: object + type: object + database: + description: Configuration for database access. Optional. + properties: + authSecretName: + description: |- + 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-". + type: string + enableLocalDb: + default: true + description: Control the creation of a local PostgreSQL DB. Set + to false if using for example an external Database for Backstage. + type: boolean + type: object + rawRuntimeConfig: + description: Raw Runtime RuntimeObjects configuration. For Advanced + scenarios. + properties: + backstageConfig: + description: Name of ConfigMap containing Backstage runtime objects + configuration + type: string + localDbConfig: + description: Name of ConfigMap containing LocalDb (PostgreSQL) + runtime objects configuration + type: string + type: object + type: object + status: + description: BackstageStatus defines the observed state of Backstage + properties: + conditions: + description: Conditions is the list of conditions describing the state + of the runtime + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + deprecationWarning: v1alpha2 is not served + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + Backstage is the Schema for the Red Hat Developer Hub backstages API. + It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, + which can help streamline the process of setting up a self-managed internal + developer portal for adopters who are just starting out. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BackstageSpec defines the desired state of Backstage + properties: + application: + description: Configuration for Backstage. Optional. + properties: + appConfig: + description: |- + 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. + properties: + configMaps: + description: |- + 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/. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. type: string required: - name type: object type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all app-config files listed in + the ConfigMapRefs field + type: string + type: object + dynamicPluginsConfigMapName: + description: |- + 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'. + type: string + extraEnvs: + description: Extra environment variables + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + envs: + description: List of name and value pairs to add as environment + variables. + items: + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable + type: string + required: + - name + - value + type: object + type: array + secrets: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + extraFiles: + description: |- + 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. + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all extra configuration files + listed in the Items field + type: string secrets: description: |- List of references to Secrets objects mounted as extra files under the MountPath specified. @@ -213,14 +552,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -324,8 +659,7 @@ spec: type: object deployment: description: |- - 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. + Configuration for Backstage Deployment resource. Optional. properties: patch: @@ -412,11 +746,13 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha4 + - deprecated: true + deprecationWarning: v1alpha3 is not served + name: v1alpha3 schema: openAPIV3Schema: description: |- @@ -469,18 +805,6 @@ spec: More details on https://backstage.io/docs/conf/writing/. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -519,18 +843,6 @@ spec: Otherwise, only the specified key will be injected as an additional environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -548,18 +860,6 @@ spec: variables. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' name: description: Name of the environment variable type: string @@ -578,18 +878,6 @@ spec: Otherwise, only the specified key will be injected as environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -616,18 +904,6 @@ spec: Otherwise, only the specified key will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -655,18 +931,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' mountPath: description: Path to mount PVC. If not specified default-path/Name will be used @@ -684,18 +948,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -821,16 +1073,6 @@ spec: Optional. x-kubernetes-preserve-unknown-fields: true type: object - monitoring: - default: - enabled: false - description: Monitoring config to enable ServiceMonitor for metrics - properties: - enabled: - default: false - description: Enable ServiceMonitor for Prometheus scraping - type: boolean - type: object rawRuntimeConfig: description: Raw Runtime RuntimeObjects configuration. For Advanced scenarios. @@ -908,11 +1150,11 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha5 + - name: v1alpha4 schema: openAPIV3Schema: description: |- @@ -1209,6 +1451,24 @@ spec: type: object type: array type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer route: description: Route configuration. Used for OpenShift only. properties: @@ -1292,13 +1552,6 @@ spec: Set the Deployment's metadata and|or spec fields you want to override or add. Optional. properties: - kind: - description: Kind of the deployment object. Can be Deployment - or StatefulSet. - enum: - - Deployment - - StatefulSet - type: string patch: description: |- Valid fragment of Deployment to be merged with default/raw configuration. @@ -1397,7 +1650,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha6 + - name: v1alpha5 schema: openAPIV3Schema: description: |- diff --git a/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml b/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml index 83c21b107..f05134589 100644 --- a/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml +++ b/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml @@ -45,7 +45,7 @@ spec: displayName: Red Hat Developer Hub kind: Backstage name: backstages.rhdh.redhat.com - version: v1alpha6 + version: v1alpha5 description: | Backstage Operator displayName: Backstage Operator diff --git a/config/manifests/rhdh/bases/backstage-operator.clusterserviceversion.yaml b/config/manifests/rhdh/bases/backstage-operator.clusterserviceversion.yaml index a13fd1c29..f163484f2 100644 --- a/config/manifests/rhdh/bases/backstage-operator.clusterserviceversion.yaml +++ b/config/manifests/rhdh/bases/backstage-operator.clusterserviceversion.yaml @@ -61,15 +61,6 @@ spec: kind: Backstage name: backstages.rhdh.redhat.com version: v1alpha5 - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha6 description: | Red Hat Developer Hub is an enterprise-grade platform for building developer portals, containing a supported and opinionated framework. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed internal developer portal for adopters who are just starting out. By implementing a unified and open platform designed to maximize developer skills, ease onboarding, and increase development productivity, focus can be centered on what really matters: writing great code. Red Hat Developer Hub also offers Software Templates to simplify the development process, which can reduce friction and frustration for development teams, boosting their productivity and increasing an organization's competitive advantage. diff --git a/config/samples/_v1alpha3_backstage.yaml b/config/samples/_v1alpha3_backstage.yaml deleted file mode 100644 index 9b429c503..000000000 --- a/config/samples/_v1alpha3_backstage.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: rhdh.redhat.com/v1alpha3 -kind: Backstage -metadata: - labels: - app.kubernetes.io/name: backstage - name: backstage-sample -#spec: - # (user): Add fields here diff --git a/config/samples/_v1alpha6_backstage.yaml b/config/samples/_v1alpha6_backstage.yaml deleted file mode 100644 index b9297a14a..000000000 --- a/config/samples/_v1alpha6_backstage.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: rhdh.redhat.com/v1alpha6 -kind: Backstage -metadata: - labels: - app.kubernetes.io/name: backstage - name: backstage-sample -#spec: - # (user): Add fields here diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 61352985c..3cfa2d61c 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,7 +1,5 @@ ## Append samples you want in your CSV to this file as resources ## resources: -- _v1alpha6_backstage.yaml - _v1alpha5_backstage.yaml - _v1alpha4_backstage.yaml -- _v1alpha3_backstage.yaml #+kubebuilder:scaffold:manifestskustomizesamples diff --git a/dist/backstage.io/install.yaml b/dist/backstage.io/install.yaml index 5274a3503..3f03fda53 100644 --- a/dist/backstage.io/install.yaml +++ b/dist/backstage.io/install.yaml @@ -1409,7 +1409,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha6 + - name: v1alpha5 schema: openAPIV3Schema: description: |- diff --git a/dist/rhdh/install.yaml b/dist/rhdh/install.yaml index cf5d4dbc5..2940b4075 100644 --- a/dist/rhdh/install.yaml +++ b/dist/rhdh/install.yaml @@ -1409,7 +1409,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha6 + - name: v1alpha5 schema: openAPIV3Schema: description: |- diff --git a/docs/configuration.md b/docs/configuration.md index 52a27aad5..8d2e8c236 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -325,7 +325,7 @@ AI-powered developer assistance with chat interface and Model Context Protocol ( ##### Default Deployment Deploy with automatically enabled default flavours: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-backstage @@ -334,7 +334,7 @@ spec: {} ##### Enable Multiple Flavours ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-backstage @@ -348,7 +348,7 @@ spec: ##### Disable All Flavours ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-backstage @@ -390,7 +390,7 @@ spec: The desired state of resources created by the Backstage Operator is defined in the Backstage Custom Resource Spec. Here’s an example of a simple Backstage CR: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: mybackstage diff --git a/docs/dynamic-plugins.md b/docs/dynamic-plugins.md index 9a2173c5c..29f2afe60 100644 --- a/docs/dynamic-plugins.md +++ b/docs/dynamic-plugins.md @@ -27,7 +27,7 @@ stringData: * Mount the Secret to the install-dynamic-plugin container by adding the following to the Backstage CR: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 #... spec: application: diff --git a/docs/external-db.md b/docs/external-db.md index 745552f9d..773864fc1 100644 --- a/docs/external-db.md +++ b/docs/external-db.md @@ -64,7 +64,7 @@ stringData: ````yaml cat < create -f - -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: diff --git a/docs/lightspeed.md b/docs/lightspeed.md index 2a49a2fcd..eb1d57969 100644 --- a/docs/lightspeed.md +++ b/docs/lightspeed.md @@ -27,7 +27,7 @@ To use Lightspeed, you need: Starting from version 1.10, RHDH includes Lightspeed as an **enabled-by-default** flavour. For new deployments, Lightspeed is automatically active (the requisite containers are running) but inert (there is a Secret which must be updated with sufficient metadata to interact with a LLM for which you have access): ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-backstage diff --git a/docs/monitoring.md b/docs/monitoring.md index d5e911a02..8d270d0ec 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -32,7 +32,7 @@ To install Prometheus Operator, follow the [official installation guide](https:/ Once Prometheus Operator is installed, enable automatic ServiceMonitor creation by configuring your Backstage Custom Resource as follows: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh @@ -90,7 +90,7 @@ To disable monitoring and remove the ServiceMonitor, either: 1. **Set `monitoring.enabled` to `false`**: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh @@ -101,7 +101,7 @@ spec: 2. **Remove the monitoring section entirely** (defaults to disabled): ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh @@ -122,7 +122,7 @@ To enable metrics monitoring on OpenShift, ensure you have enabled [monitoring f Here's a complete example of a Backstage Custom Resource with monitoring enabled: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: developer-hub @@ -213,7 +213,7 @@ To enable metrics monitoring for RHDH on Azure Kubernetes Service (AKS), you can For AKS deployments, you may need to add pod annotations for metrics scraping. You can configure this through the Backstage Custom Resource using the `deployment.patch` field: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh diff --git a/examples/bs-existing-secret.yaml b/examples/bs-existing-secret.yaml index 1d9e1b1b4..f3a836b86 100644 --- a/examples/bs-existing-secret.yaml +++ b/examples/bs-existing-secret.yaml @@ -11,7 +11,7 @@ stringData: POSTGRES_HOST: "backstage-psql-bs-existing-secret" --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs-existing-secret diff --git a/examples/bs-route-disabled.yaml b/examples/bs-route-disabled.yaml index 5b73b8713..b7fae8f68 100644 --- a/examples/bs-route-disabled.yaml +++ b/examples/bs-route-disabled.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs-route-disabled diff --git a/examples/bs-route.yaml b/examples/bs-route.yaml index 646848515..99b2650cb 100644 --- a/examples/bs-route.yaml +++ b/examples/bs-route.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs-route diff --git a/examples/bs1.yaml b/examples/bs1.yaml index 9b1b063a4..64fabf33d 100644 --- a/examples/bs1.yaml +++ b/examples/bs1.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs1 diff --git a/examples/catalog-index.yaml b/examples/catalog-index.yaml index eccc2470b..284405b28 100644 --- a/examples/catalog-index.yaml +++ b/examples/catalog-index.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-backstage diff --git a/examples/envvars.yaml b/examples/envvars.yaml index 0110c021a..c838e2164 100644 --- a/examples/envvars.yaml +++ b/examples/envvars.yaml @@ -51,7 +51,7 @@ metadata: data: dynamic-plugins.yaml: "includes: []\nplugins: []\n" --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh-envs diff --git a/examples/filemounts.yaml b/examples/filemounts.yaml index c0db4e765..bc854077f 100644 --- a/examples/filemounts.yaml +++ b/examples/filemounts.yaml @@ -73,7 +73,7 @@ stringData: base64-encoded-content --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh-file-mounts diff --git a/examples/lightspeed-disabled.yaml b/examples/lightspeed-disabled.yaml index 257daf6b3..e7b5a2c0b 100644 --- a/examples/lightspeed-disabled.yaml +++ b/examples/lightspeed-disabled.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: lightspeed-disabled diff --git a/examples/lightspeed.yaml b/examples/lightspeed.yaml index c6c691607..1fe30621a 100644 --- a/examples/lightspeed.yaml +++ b/examples/lightspeed.yaml @@ -22,7 +22,7 @@ stringData: VALIDATION_MODEL_NAME: "" LLAMA_STACK_LOGGING: "" --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: lightspeed-test diff --git a/examples/local-bs.yaml b/examples/local-bs.yaml index f1ec5a63b..0152ced96 100644 --- a/examples/local-bs.yaml +++ b/examples/local-bs.yaml @@ -11,7 +11,7 @@ data: cors: origin: "${BACKSTAGE_URL}" --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: local-bs diff --git a/examples/orchestrator-cicd.yaml b/examples/orchestrator-cicd.yaml index 7fc2fe29e..0bef934f1 100644 --- a/examples/orchestrator-cicd.yaml +++ b/examples/orchestrator-cicd.yaml @@ -109,7 +109,7 @@ data: target: https://github.com/rhdhorchestrator/workflow-software-templates/blob/main/scaffolder-templates/github-workflows/basic-workflow/template.yaml --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: orchestrator diff --git a/examples/orchestrator.yaml b/examples/orchestrator.yaml index b851df49d..cc23cd929 100644 --- a/examples/orchestrator.yaml +++ b/examples/orchestrator.yaml @@ -27,7 +27,7 @@ stringData: # node -p 'require("crypto").randomBytes(24).toString("base64")' BACKEND_SECRET: "R2FxRVNrcmwzYzhhN3l0V1VRcnQ3L1pLT09WaVhDNUEK" # notsecret --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: orchestrator diff --git a/examples/pvc-dp-cache.yaml b/examples/pvc-dp-cache.yaml index b86db63f0..17bbeb74d 100644 --- a/examples/pvc-dp-cache.yaml +++ b/examples/pvc-dp-cache.yaml @@ -43,7 +43,7 @@ data: - package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-dynamic-home-page disabled: false --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs1 diff --git a/examples/raw-runtime-config.yaml b/examples/raw-runtime-config.yaml index c89b76482..e9ea02d56 100644 --- a/examples/raw-runtime-config.yaml +++ b/examples/raw-runtime-config.yaml @@ -53,7 +53,7 @@ stringData: MY_SUPER_SECRET_1: "some value" # notsecret --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs-raw-runtime-config diff --git a/examples/rhdh-cr-with-app-configs.yaml b/examples/rhdh-cr-with-app-configs.yaml index 576f81cd2..d7cc9169b 100644 --- a/examples/rhdh-cr-with-app-configs.yaml +++ b/examples/rhdh-cr-with-app-configs.yaml @@ -183,7 +183,7 @@ stringData: SomeRsaPrivateKey --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: bs-app-config diff --git a/examples/rhdh-cr.yaml b/examples/rhdh-cr.yaml index 880e585b3..acfb8acdb 100644 --- a/examples/rhdh-cr.yaml +++ b/examples/rhdh-cr.yaml @@ -68,7 +68,7 @@ data: initialDelay: { seconds: 15} --- -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-rhdh diff --git a/integration_tests/testdata/rhdh-replace-dynaplugin-root.yaml b/integration_tests/testdata/rhdh-replace-dynaplugin-root.yaml index 0a0c527f0..d76083653 100644 --- a/integration_tests/testdata/rhdh-replace-dynaplugin-root.yaml +++ b/integration_tests/testdata/rhdh-replace-dynaplugin-root.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage spec: deployment: diff --git a/integration_tests/testdata/spec-deployment.yaml b/integration_tests/testdata/spec-deployment.yaml index 8949e0e94..e08981586 100644 --- a/integration_tests/testdata/spec-deployment.yaml +++ b/integration_tests/testdata/spec-deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage spec: deployment: diff --git a/internal/controller/preprocessor_test.go b/internal/controller/preprocessor_test.go index d27c93f99..338c6e83e 100644 --- a/internal/controller/preprocessor_test.go +++ b/internal/controller/preprocessor_test.go @@ -6,7 +6,7 @@ import ( "testing" - bsv1 "github.com/redhat-developer/rhdh-operator/api/v1alpha6" + "github.com/redhat-developer/rhdh-operator/api" "github.com/redhat-developer/rhdh-operator/pkg/model" "github.com/stretchr/testify/assert" @@ -18,15 +18,15 @@ import ( func updateConfigMap(t *testing.T) BackstageReconciler { ctx := context.TODO() - bs := bsv1.Backstage{ + bs := api.Backstage{ ObjectMeta: metav1.ObjectMeta{ Name: "bs1", Namespace: "ns1", }, - Spec: bsv1.BackstageSpec{ - Application: &bsv1.Application{ - AppConfig: &bsv1.AppConfig{ - ConfigMaps: []bsv1.FileObjectRef{{Name: "cm1"}}, + Spec: api.BackstageSpec{ + Application: &api.Application{ + AppConfig: &api.AppConfig{ + ConfigMaps: []api.FileObjectRef{{Name: "cm1"}}, }, }, }, From 294b0cf9e5913e939a1573dcc7ac1f8e373cc627 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Apr 2026 17:49:48 +0000 Subject: [PATCH 2/5] Regenerate bundle/installer manifests Co-authored-by: gazarenkov --- api/v1alpha1/zz_generated.deepcopy.go | 2 +- api/v1alpha2/zz_generated.deepcopy.go | 2 +- api/v1alpha3/zz_generated.deepcopy.go | 2 +- api/v1alpha4/zz_generated.deepcopy.go | 2 +- api/v1alpha5/zz_generated.deepcopy.go | 2 +- ...kstage-operator.clusterserviceversion.yaml | 40 +- .../manifests/rhdh.redhat.com_backstages.yaml | 511 +++++++++++++----- ...kstage-operator.clusterserviceversion.yaml | 2 +- ...kstage-operator.clusterserviceversion.yaml | 9 - dist/backstage.io/install.yaml | 511 +++++++++++++----- dist/rhdh/install.yaml | 511 +++++++++++++----- 11 files changed, 1153 insertions(+), 441 deletions(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index ca4d7a346..9b7acdd38 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha2/zz_generated.deepcopy.go b/api/v1alpha2/zz_generated.deepcopy.go index 1357c08bd..c3ecd6b25 100644 --- a/api/v1alpha2/zz_generated.deepcopy.go +++ b/api/v1alpha2/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha2 import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go index 6613a8896..b315b789e 100644 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ b/api/v1alpha3/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha3 import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha4/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go index 9c86c46ee..c9c126a0f 100644 --- a/api/v1alpha4/zz_generated.deepcopy.go +++ b/api/v1alpha4/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha4 import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha5/zz_generated.deepcopy.go b/api/v1alpha5/zz_generated.deepcopy.go index 3ded0a64d..3bf10131c 100644 --- a/api/v1alpha5/zz_generated.deepcopy.go +++ b/api/v1alpha5/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha5 import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml index 4d13c5b82..e5bb224de 100644 --- a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml @@ -4,16 +4,6 @@ metadata: annotations: alm-examples: |- [ - { - "apiVersion": "rhdh.redhat.com/v1alpha3", - "kind": "Backstage", - "metadata": { - "labels": { - "app.kubernetes.io/name": "backstage" - }, - "name": "backstage-sample" - } - }, { "apiVersion": "rhdh.redhat.com/v1alpha4", "kind": "Backstage", @@ -24,16 +14,6 @@ metadata: "name": "backstage-sample" } }, - { - "apiVersion": "rhdh.redhat.com/v1alpha5", - "kind": "Backstage", - "metadata": { - "labels": { - "app.kubernetes.io/name": "backstage" - }, - "name": "backstage-sample" - } - }, { "apiVersion": "rhdh.redhat.com/v1alpha5", "kind": "Backstage", @@ -45,7 +25,7 @@ metadata: } } ] - createdAt: "2026-04-22T07:13:03Z" + createdAt: "2026-04-26T17:49:42Z" description: Backstage Operator operators.operatorframework.io/builder: operator-sdk-v1.37.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 @@ -56,15 +36,6 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha3 - description: |- Backstage is the Schema for the Red Hat Developer Hub backstages API. It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, @@ -83,15 +54,6 @@ spec: kind: Backstage name: backstages.rhdh.redhat.com version: v1alpha5 - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha5 description: | Backstage Operator displayName: Backstage Operator diff --git a/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml b/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml index b17de1817..271d6e40b 100644 --- a/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml +++ b/bundle/backstage.io/manifests/rhdh.redhat.com_backstages.yaml @@ -14,7 +14,9 @@ spec: singular: backstage scope: Namespaced versions: - - name: v1alpha3 + - deprecated: true + deprecationWarning: v1alpha1 is not served + name: v1alpha1 schema: openAPIV3Schema: description: |- @@ -70,14 +72,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -169,14 +167,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -187,23 +181,368 @@ spec: description: Mount path for all extra configuration files listed in the Items field type: string - pvcs: + secrets: description: |- - List of references to Persistent Volume Claim objects mounted as extra files + 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. items: properties: - mountPath: - description: Path to mount PVC. If not specified default-path/Name - will be used + key: + description: Key in the object type: string name: - description: Name of the object + description: |- + Name of the object + We support only ConfigMaps and Secrets. type: string required: - name type: object type: array + type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer + route: + description: Route configuration. Used for OpenShift only. + properties: + enabled: + default: true + description: Control the creation of a Route on OpenShift. + type: boolean + host: + description: |- + 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. + maxLength: 253 + 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]))*$ + type: string + subdomain: + description: |- + 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`. + maxLength: 253 + 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]))*$ + type: string + tls: + description: |- + The tls field provides the ability to configure certificates for the route. + Ignored if Enabled is false. + properties: + caCertificate: + description: caCertificate provides the cert authority + certificate contents + type: string + certificate: + description: |- + certificate provides certificate contents. This should be a single serving certificate, not a certificate + chain. Do not include a CA certificate. + type: string + externalCertificateSecretName: + description: |- + 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. + type: string + key: + description: key provides key file contents + type: string + type: object + type: object + type: object + database: + description: Configuration for database access. Optional. + properties: + authSecretName: + description: |- + 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-". + type: string + enableLocalDb: + default: true + description: Control the creation of a local PostgreSQL DB. Set + to false if using for example an external Database for Backstage. + type: boolean + type: object + rawRuntimeConfig: + description: Raw Runtime RuntimeObjects configuration. For Advanced + scenarios. + properties: + backstageConfig: + description: Name of ConfigMap containing Backstage runtime objects + configuration + type: string + localDbConfig: + description: Name of ConfigMap containing LocalDb (PostgreSQL) + runtime objects configuration + type: string + type: object + type: object + status: + description: BackstageStatus defines the observed state of Backstage + properties: + conditions: + description: Conditions is the list of conditions describing the state + of the runtime + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + deprecationWarning: v1alpha2 is not served + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + Backstage is the Schema for the Red Hat Developer Hub backstages API. + It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, + which can help streamline the process of setting up a self-managed internal + developer portal for adopters who are just starting out. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BackstageSpec defines the desired state of Backstage + properties: + application: + description: Configuration for Backstage. Optional. + properties: + appConfig: + description: |- + 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. + properties: + configMaps: + description: |- + 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/. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all app-config files listed in + the ConfigMapRefs field + type: string + type: object + dynamicPluginsConfigMapName: + description: |- + 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'. + type: string + extraEnvs: + description: Extra environment variables + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + envs: + description: List of name and value pairs to add as environment + variables. + items: + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable + type: string + required: + - name + - value + type: object + type: array + secrets: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + extraFiles: + description: |- + 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. + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all extra configuration files + listed in the Items field + type: string secrets: description: |- List of references to Secrets objects mounted as extra files under the MountPath specified. @@ -213,14 +552,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -324,8 +659,7 @@ spec: type: object deployment: description: |- - 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. + Configuration for Backstage Deployment resource. Optional. properties: patch: @@ -412,11 +746,13 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha4 + - deprecated: true + deprecationWarning: v1alpha3 is not served + name: v1alpha3 schema: openAPIV3Schema: description: |- @@ -469,18 +805,6 @@ spec: More details on https://backstage.io/docs/conf/writing/. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -519,18 +843,6 @@ spec: Otherwise, only the specified key will be injected as an additional environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -548,18 +860,6 @@ spec: variables. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' name: description: Name of the environment variable type: string @@ -578,18 +878,6 @@ spec: Otherwise, only the specified key will be injected as environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -616,18 +904,6 @@ spec: Otherwise, only the specified key will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -655,18 +931,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' mountPath: description: Path to mount PVC. If not specified default-path/Name will be used @@ -684,18 +948,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -821,16 +1073,6 @@ spec: Optional. x-kubernetes-preserve-unknown-fields: true type: object - monitoring: - default: - enabled: false - description: Monitoring config to enable ServiceMonitor for metrics - properties: - enabled: - default: false - description: Enable ServiceMonitor for Prometheus scraping - type: boolean - type: object rawRuntimeConfig: description: Raw Runtime RuntimeObjects configuration. For Advanced scenarios. @@ -908,11 +1150,11 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha5 + - name: v1alpha4 schema: openAPIV3Schema: description: |- @@ -1209,6 +1451,24 @@ spec: type: object type: array type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer route: description: Route configuration. Used for OpenShift only. properties: @@ -1292,13 +1552,6 @@ spec: Set the Deployment's metadata and|or spec fields you want to override or add. Optional. properties: - kind: - description: Kind of the deployment object. Can be Deployment - or StatefulSet. - enum: - - Deployment - - StatefulSet - type: string patch: description: |- Valid fragment of Deployment to be merged with default/raw configuration. diff --git a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml index aa7f5a44d..0feb598cf 100644 --- a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml @@ -29,7 +29,7 @@ metadata: categories: Developer Tools certified: "true" containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.10 - createdAt: "2026-04-26T17:32:20Z" + createdAt: "2026-04-26T17:49:44Z" description: Red Hat Developer Hub is a Red Hat supported version of Backstage. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed diff --git a/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml b/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml index f05134589..c6edf3b30 100644 --- a/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml +++ b/config/manifests/backstage.io/bases/backstage-operator.clusterserviceversion.yaml @@ -37,15 +37,6 @@ spec: kind: Backstage name: backstages.rhdh.redhat.com version: v1alpha5 - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha5 description: | Backstage Operator displayName: Backstage Operator diff --git a/dist/backstage.io/install.yaml b/dist/backstage.io/install.yaml index 3f03fda53..675560a87 100644 --- a/dist/backstage.io/install.yaml +++ b/dist/backstage.io/install.yaml @@ -26,7 +26,9 @@ spec: singular: backstage scope: Namespaced versions: - - name: v1alpha3 + - deprecated: true + deprecationWarning: v1alpha1 is not served + name: v1alpha1 schema: openAPIV3Schema: description: |- @@ -82,14 +84,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -181,14 +179,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -199,23 +193,368 @@ spec: description: Mount path for all extra configuration files listed in the Items field type: string - pvcs: + secrets: description: |- - List of references to Persistent Volume Claim objects mounted as extra files + 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. items: properties: - mountPath: - description: Path to mount PVC. If not specified default-path/Name - will be used + key: + description: Key in the object type: string name: - description: Name of the object + description: |- + Name of the object + We support only ConfigMaps and Secrets. type: string required: - name type: object type: array + type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer + route: + description: Route configuration. Used for OpenShift only. + properties: + enabled: + default: true + description: Control the creation of a Route on OpenShift. + type: boolean + host: + description: |- + 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. + maxLength: 253 + 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]))*$ + type: string + subdomain: + description: |- + 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`. + maxLength: 253 + 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]))*$ + type: string + tls: + description: |- + The tls field provides the ability to configure certificates for the route. + Ignored if Enabled is false. + properties: + caCertificate: + description: caCertificate provides the cert authority + certificate contents + type: string + certificate: + description: |- + certificate provides certificate contents. This should be a single serving certificate, not a certificate + chain. Do not include a CA certificate. + type: string + externalCertificateSecretName: + description: |- + 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. + type: string + key: + description: key provides key file contents + type: string + type: object + type: object + type: object + database: + description: Configuration for database access. Optional. + properties: + authSecretName: + description: |- + 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-". + type: string + enableLocalDb: + default: true + description: Control the creation of a local PostgreSQL DB. Set + to false if using for example an external Database for Backstage. + type: boolean + type: object + rawRuntimeConfig: + description: Raw Runtime RuntimeObjects configuration. For Advanced + scenarios. + properties: + backstageConfig: + description: Name of ConfigMap containing Backstage runtime objects + configuration + type: string + localDbConfig: + description: Name of ConfigMap containing LocalDb (PostgreSQL) + runtime objects configuration + type: string + type: object + type: object + status: + description: BackstageStatus defines the observed state of Backstage + properties: + conditions: + description: Conditions is the list of conditions describing the state + of the runtime + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + deprecationWarning: v1alpha2 is not served + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + Backstage is the Schema for the Red Hat Developer Hub backstages API. + It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, + which can help streamline the process of setting up a self-managed internal + developer portal for adopters who are just starting out. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BackstageSpec defines the desired state of Backstage + properties: + application: + description: Configuration for Backstage. Optional. + properties: + appConfig: + description: |- + 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. + properties: + configMaps: + description: |- + 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/. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all app-config files listed in + the ConfigMapRefs field + type: string + type: object + dynamicPluginsConfigMapName: + description: |- + 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'. + type: string + extraEnvs: + description: Extra environment variables + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + envs: + description: List of name and value pairs to add as environment + variables. + items: + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable + type: string + required: + - name + - value + type: object + type: array + secrets: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + extraFiles: + description: |- + 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. + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all extra configuration files + listed in the Items field + type: string secrets: description: |- List of references to Secrets objects mounted as extra files under the MountPath specified. @@ -225,14 +564,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -336,8 +671,7 @@ spec: type: object deployment: description: |- - 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. + Configuration for Backstage Deployment resource. Optional. properties: patch: @@ -424,11 +758,13 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha4 + - deprecated: true + deprecationWarning: v1alpha3 is not served + name: v1alpha3 schema: openAPIV3Schema: description: |- @@ -481,18 +817,6 @@ spec: More details on https://backstage.io/docs/conf/writing/. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -531,18 +855,6 @@ spec: Otherwise, only the specified key will be injected as an additional environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -560,18 +872,6 @@ spec: variables. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' name: description: Name of the environment variable type: string @@ -590,18 +890,6 @@ spec: Otherwise, only the specified key will be injected as environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -628,18 +916,6 @@ spec: Otherwise, only the specified key will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -667,18 +943,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' mountPath: description: Path to mount PVC. If not specified default-path/Name will be used @@ -696,18 +960,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -833,16 +1085,6 @@ spec: Optional. x-kubernetes-preserve-unknown-fields: true type: object - monitoring: - default: - enabled: false - description: Monitoring config to enable ServiceMonitor for metrics - properties: - enabled: - default: false - description: Enable ServiceMonitor for Prometheus scraping - type: boolean - type: object rawRuntimeConfig: description: Raw Runtime RuntimeObjects configuration. For Advanced scenarios. @@ -920,11 +1162,11 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha5 + - name: v1alpha4 schema: openAPIV3Schema: description: |- @@ -1221,6 +1463,24 @@ spec: type: object type: array type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer route: description: Route configuration. Used for OpenShift only. properties: @@ -1304,13 +1564,6 @@ spec: Set the Deployment's metadata and|or spec fields you want to override or add. Optional. properties: - kind: - description: Kind of the deployment object. Can be Deployment - or StatefulSet. - enum: - - Deployment - - StatefulSet - type: string patch: description: |- Valid fragment of Deployment to be merged with default/raw configuration. diff --git a/dist/rhdh/install.yaml b/dist/rhdh/install.yaml index 2940b4075..9e143e133 100644 --- a/dist/rhdh/install.yaml +++ b/dist/rhdh/install.yaml @@ -26,7 +26,9 @@ spec: singular: backstage scope: Namespaced versions: - - name: v1alpha3 + - deprecated: true + deprecationWarning: v1alpha1 is not served + name: v1alpha1 schema: openAPIV3Schema: description: |- @@ -82,14 +84,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -181,14 +179,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -199,23 +193,368 @@ spec: description: Mount path for all extra configuration files listed in the Items field type: string - pvcs: + secrets: description: |- - List of references to Persistent Volume Claim objects mounted as extra files + 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. items: properties: - mountPath: - description: Path to mount PVC. If not specified default-path/Name - will be used + key: + description: Key in the object type: string name: - description: Name of the object + description: |- + Name of the object + We support only ConfigMaps and Secrets. type: string required: - name type: object type: array + type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer + route: + description: Route configuration. Used for OpenShift only. + properties: + enabled: + default: true + description: Control the creation of a Route on OpenShift. + type: boolean + host: + description: |- + 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. + maxLength: 253 + 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]))*$ + type: string + subdomain: + description: |- + 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`. + maxLength: 253 + 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]))*$ + type: string + tls: + description: |- + The tls field provides the ability to configure certificates for the route. + Ignored if Enabled is false. + properties: + caCertificate: + description: caCertificate provides the cert authority + certificate contents + type: string + certificate: + description: |- + certificate provides certificate contents. This should be a single serving certificate, not a certificate + chain. Do not include a CA certificate. + type: string + externalCertificateSecretName: + description: |- + 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. + type: string + key: + description: key provides key file contents + type: string + type: object + type: object + type: object + database: + description: Configuration for database access. Optional. + properties: + authSecretName: + description: |- + 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-". + type: string + enableLocalDb: + default: true + description: Control the creation of a local PostgreSQL DB. Set + to false if using for example an external Database for Backstage. + type: boolean + type: object + rawRuntimeConfig: + description: Raw Runtime RuntimeObjects configuration. For Advanced + scenarios. + properties: + backstageConfig: + description: Name of ConfigMap containing Backstage runtime objects + configuration + type: string + localDbConfig: + description: Name of ConfigMap containing LocalDb (PostgreSQL) + runtime objects configuration + type: string + type: object + type: object + status: + description: BackstageStatus defines the observed state of Backstage + properties: + conditions: + description: Conditions is the list of conditions describing the state + of the runtime + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: false + storage: false + subresources: + status: {} + - deprecated: true + deprecationWarning: v1alpha2 is not served + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + Backstage is the Schema for the Red Hat Developer Hub backstages API. + It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, + which can help streamline the process of setting up a self-managed internal + developer portal for adopters who are just starting out. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BackstageSpec defines the desired state of Backstage + properties: + application: + description: Configuration for Backstage. Optional. + properties: + appConfig: + description: |- + 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. + properties: + configMaps: + description: |- + 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/. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all app-config files listed in + the ConfigMapRefs field + type: string + type: object + dynamicPluginsConfigMapName: + description: |- + 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'. + type: string + extraEnvs: + description: Extra environment variables + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + envs: + description: List of name and value pairs to add as environment + variables. + items: + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable + type: string + required: + - name + - value + type: object + type: array + secrets: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + type: object + extraFiles: + description: |- + 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. + properties: + configMaps: + description: |- + 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. + items: + properties: + key: + description: Key in the object + type: string + name: + description: |- + Name of the object + We support only ConfigMaps and Secrets. + type: string + required: + - name + type: object + type: array + mountPath: + default: /opt/app-root/src + description: Mount path for all extra configuration files + listed in the Items field + type: string secrets: description: |- List of references to Secrets objects mounted as extra files under the MountPath specified. @@ -225,14 +564,10 @@ spec: key: description: Key in the object type: string - mountPath: - description: Path to mount the Object. If not specified - default-path/Name will be used - type: string name: description: |- Name of the object - Supported ConfigMaps and Secrets + We support only ConfigMaps and Secrets. type: string required: - name @@ -336,8 +671,7 @@ spec: type: object deployment: description: |- - 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. + Configuration for Backstage Deployment resource. Optional. properties: patch: @@ -424,11 +758,13 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha4 + - deprecated: true + deprecationWarning: v1alpha3 is not served + name: v1alpha3 schema: openAPIV3Schema: description: |- @@ -481,18 +817,6 @@ spec: More details on https://backstage.io/docs/conf/writing/. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -531,18 +855,6 @@ spec: Otherwise, only the specified key will be injected as an additional environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -560,18 +872,6 @@ spec: variables. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' name: description: Name of the environment variable type: string @@ -590,18 +890,6 @@ spec: Otherwise, only the specified key will be injected as environment variable. items: properties: - containers: - description: |- - If set, the env variable will be injected only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -628,18 +916,6 @@ spec: Otherwise, only the specified key will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -667,18 +943,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' mountPath: description: Path to mount PVC. If not specified default-path/Name will be used @@ -696,18 +960,6 @@ spec: For each item in this array, a key must be specified that will be mounted as a file. items: properties: - containers: - description: |- - If set, the file will be mounted only in the specified containers, otherwise in backstage container only. - If it contains only "*", it means all containers and no other names are allowed. - items: - type: string - minItems: 1 - type: array - x-kubernetes-validations: - - message: If '*' is specified, no other container names - are allowed - rule: '!(size(self) != 1 && self[0]=="*")' key: description: Key in the object type: string @@ -833,16 +1085,6 @@ spec: Optional. x-kubernetes-preserve-unknown-fields: true type: object - monitoring: - default: - enabled: false - description: Monitoring config to enable ServiceMonitor for metrics - properties: - enabled: - default: false - description: Enable ServiceMonitor for Prometheus scraping - type: boolean - type: object rawRuntimeConfig: description: Raw Runtime RuntimeObjects configuration. For Advanced scenarios. @@ -920,11 +1162,11 @@ spec: type: array type: object type: object - served: true + served: false storage: false subresources: status: {} - - name: v1alpha5 + - name: v1alpha4 schema: openAPIV3Schema: description: |- @@ -1221,6 +1463,24 @@ spec: type: object type: array type: object + image: + description: |- + 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 + type: string + imagePullSecrets: + description: Image Pull Secrets to use in all containers (including + Init Containers) + items: + type: string + type: array + replicas: + default: 1 + description: |- + Number of desired replicas to set in the Backstage Deployment. + Defaults to 1. + format: int32 + type: integer route: description: Route configuration. Used for OpenShift only. properties: @@ -1304,13 +1564,6 @@ spec: Set the Deployment's metadata and|or spec fields you want to override or add. Optional. properties: - kind: - description: Kind of the deployment object. Can be Deployment - or StatefulSet. - enum: - - Deployment - - StatefulSet - type: string patch: description: |- Valid fragment of Deployment to be merged with default/raw configuration. From 4617ccf7957adfd760afcf14bf7846094549d479 Mon Sep 17 00:00:00 2001 From: gazarenkov Date: Sun, 26 Apr 2026 20:53:47 +0300 Subject: [PATCH 3/5] make bundle --- .../manifests/backstage-operator.clusterserviceversion.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml index eba70ee88..518879061 100644 --- a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml @@ -29,7 +29,7 @@ metadata: categories: Developer Tools certified: "true" containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.10 - createdAt: "2026-04-26T17:49:44Z" + createdAt: "2026-04-26T17:53:18Z" description: Red Hat Developer Hub is a Red Hat supported version of Backstage. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed From 2b2f6ac5f379fb3c55f555ab20e6bfdd5ebf39bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Apr 2026 17:54:51 +0000 Subject: [PATCH 4/5] Regenerate bundle/installer manifests Co-authored-by: gazarenkov --- ...kstage-operator.clusterserviceversion.yaml | 40 +------------------ ...kstage-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml index 6ab5680f3..09ca27f49 100644 --- a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml @@ -4,16 +4,6 @@ metadata: annotations: alm-examples: |- [ - { - "apiVersion": "rhdh.redhat.com/v1alpha3", - "kind": "Backstage", - "metadata": { - "labels": { - "app.kubernetes.io/name": "backstage" - }, - "name": "backstage-sample" - } - }, { "apiVersion": "rhdh.redhat.com/v1alpha4", "kind": "Backstage", @@ -24,16 +14,6 @@ metadata: "name": "backstage-sample" } }, - { - "apiVersion": "rhdh.redhat.com/v1alpha5", - "kind": "Backstage", - "metadata": { - "labels": { - "app.kubernetes.io/name": "backstage" - }, - "name": "backstage-sample" - } - }, { "apiVersion": "rhdh.redhat.com/v1alpha5", "kind": "Backstage", @@ -45,7 +25,7 @@ metadata: } } ] - createdAt: "2026-04-24T11:45:41Z" + createdAt: "2026-04-26T17:54:44Z" description: Backstage Operator operators.operatorframework.io/builder: operator-sdk-v1.37.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 @@ -56,15 +36,6 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha3 - description: |- Backstage is the Schema for the Red Hat Developer Hub backstages API. It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, @@ -83,15 +54,6 @@ spec: kind: Backstage name: backstages.rhdh.redhat.com version: v1alpha5 - - description: |- - Backstage is the Schema for the Red Hat Developer Hub backstages API. - It comes with pre-built plug-ins, configuration settings, and deployment mechanisms, - which can help streamline the process of setting up a self-managed internal - developer portal for adopters who are just starting out. - displayName: Red Hat Developer Hub - kind: Backstage - name: backstages.rhdh.redhat.com - version: v1alpha5 description: | Backstage Operator displayName: Backstage Operator diff --git a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml index 518879061..35bf35c7d 100644 --- a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml @@ -29,7 +29,7 @@ metadata: categories: Developer Tools certified: "true" containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.10 - createdAt: "2026-04-26T17:53:18Z" + createdAt: "2026-04-26T17:54:47Z" description: Red Hat Developer Hub is a Red Hat supported version of Backstage. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed From bd5992ee5542818c4c8cb4cf698ba9720f207ef9 Mon Sep 17 00:00:00 2001 From: gazarenkov Date: Tue, 28 Apr 2026 17:10:19 +0300 Subject: [PATCH 5/5] fix test, remove v1alpha6 occurence --- api/v1alpha1/zz_generated.deepcopy.go | 2 +- api/v1alpha2/zz_generated.deepcopy.go | 2 +- api/v1alpha3/zz_generated.deepcopy.go | 2 +- api/v1alpha4/zz_generated.deepcopy.go | 2 +- api/v1alpha5/zz_generated.deepcopy.go | 2 +- docs/dynamic-plugins.md | 2 +- integration_tests/cr-compatibility_test.go | 8 ++++---- integration_tests/suite_test.go | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 9b7acdd38..ca4d7a346 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha1 import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha2/zz_generated.deepcopy.go b/api/v1alpha2/zz_generated.deepcopy.go index c3ecd6b25..1357c08bd 100644 --- a/api/v1alpha2/zz_generated.deepcopy.go +++ b/api/v1alpha2/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha2 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go index b315b789e..6613a8896 100644 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ b/api/v1alpha3/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha3 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha4/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go index c9c126a0f..9c86c46ee 100644 --- a/api/v1alpha4/zz_generated.deepcopy.go +++ b/api/v1alpha4/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha4 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/api/v1alpha5/zz_generated.deepcopy.go b/api/v1alpha5/zz_generated.deepcopy.go index 3bf10131c..3ded0a64d 100644 --- a/api/v1alpha5/zz_generated.deepcopy.go +++ b/api/v1alpha5/zz_generated.deepcopy.go @@ -5,7 +5,7 @@ package v1alpha5 import ( - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/docs/dynamic-plugins.md b/docs/dynamic-plugins.md index d532c2636..504dbac4b 100644 --- a/docs/dynamic-plugins.md +++ b/docs/dynamic-plugins.md @@ -61,7 +61,7 @@ The value is a comma-separated list of entries. Each entry supports two forms: To configure extra catalog index images, use the `extraEnvs` field in your Backstage CR: ```yaml -apiVersion: rhdh.redhat.com/v1alpha6 +apiVersion: rhdh.redhat.com/v1alpha5 kind: Backstage metadata: name: my-backstage diff --git a/integration_tests/cr-compatibility_test.go b/integration_tests/cr-compatibility_test.go index 38be2de7e..30601002a 100644 --- a/integration_tests/cr-compatibility_test.go +++ b/integration_tests/cr-compatibility_test.go @@ -9,7 +9,7 @@ import ( appsv1 "k8s.io/api/apps/v1" "github.com/redhat-developer/rhdh-operator/api" - bsv1prev "github.com/redhat-developer/rhdh-operator/api/v1alpha3" + bsv1prev "github.com/redhat-developer/rhdh-operator/api/v1alpha4" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -45,14 +45,14 @@ var _ = When("testing API version compatibility", func() { } // test prev version backward compatibility - By("creating a Backstage resource using v1alpha3 API") - backstageNameV3 := generateRandName("bs-v1alpha3") + By("creating a Backstage resource using v1alpha4 API") + backstageNameV3 := generateRandName("bs-v1alpha4") // create ConfigMap for prev version test generateConfigMap(ctx, k8sClient, "default-app-config", ns, map[string]string{ "app-config.yaml": `app: - title: Test App v1alpha3 + title: Test App v1alpha4 baseUrl: http://localhost:3000`, }, nil, nil) diff --git a/integration_tests/suite_test.go b/integration_tests/suite_test.go index 1aa42914e..1b682a240 100644 --- a/integration_tests/suite_test.go +++ b/integration_tests/suite_test.go @@ -36,7 +36,7 @@ import ( "k8s.io/apimachinery/pkg/util/rand" "github.com/redhat-developer/rhdh-operator/api" - bsv1alpha3 "github.com/redhat-developer/rhdh-operator/api/v1alpha3" + bsv1prev "github.com/redhat-developer/rhdh-operator/api/v1alpha4" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" @@ -113,7 +113,7 @@ var _ = BeforeSuite(func() { Expect(err).NotTo(HaveOccurred()) Expect(cfg).NotTo(BeNil()) - err = bsv1alpha3.AddToScheme(scheme.Scheme) + err = bsv1prev.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) err = api.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred())