Skip to content

Commit 5ab7117

Browse files
gazarenkovgithub-actions[bot]gabemonterorm3l
authored
Flavours (#2415)
* add v1alpha6 and type aliases * clean * clean * types * types * core flavours functionality and dynamic-plugins merge strategy * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * fix sonarqube check * small fixes * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * fix lint * add testdata * add testdata * simplify flavor internal logic * mergers and tests * mergers and tests * mergers and tests * mergers and tests * orchestrator flavour * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * lightspeed flavour * lightspeed flavour * lightspeed flavour * lightspeed flavour * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * temporarily disable check with enabled by default flavor in integration_tests * fix pvc tests and data * fix llama-stack deployment and comment out additional containers and plugins * Update examples/lightspeed.yaml Co-authored-by: Gabe Montero <gmontero@redhat.com> * lightspeed config fixed as for suggested, lightspeed flavor enabled by default * fix examples * add flavours ConfigMaps * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * add local-bs.yaml * set localhost for mcp-server url * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * fix * remove kube-api-access volume * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * fix * no specified flavours to return empty list (no defaults) * fix * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> Co-authored-by: Gabe Montero <gmontero@redhat.com> Co-authored-by: Armel Soro <asoro@redhat.com>
1 parent 8bec5a7 commit 5ab7117

148 files changed

Lines changed: 6416 additions & 885 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rhdh/docs/airgap.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ On a vanilla Kubernetes, you can create a Custom Resource (CR) using `kubectl`,
225225
[source,yaml]
226226
----
227227
cat <<EOF | kubectl -n rhdh-operator apply -f -
228-
apiVersion: rhdh.redhat.com/v1alpha5
228+
apiVersion: rhdh.redhat.com/v1alpha6
229229
kind: Backstage
230230
metadata:
231231
name: developer-hub

.rhdh/scripts/install-rhdh-catalog-source.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ if [[ "${IS_OPENSHIFT}" = "true" ]]; then
862862
fi
863863
CR_EXAMPLE="
864864
cat <<EOF | ${CLI_TOOL} apply -f -
865-
apiVersion: rhdh.redhat.com/v1alpha5
865+
apiVersion: rhdh.redhat.com/v1alpha6
866866
kind: Backstage
867867
metadata:
868868
name: developer-hub

.rhdh/scripts/prepare-restricted-environment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ if [[ -n "${TO_REGISTRY}" ]]; then
13091309
fi
13101310
CR_EXAMPLE="
13111311
cat <<EOF | ${CLI_TOOL} -n ${NAMESPACE_OPERATOR} apply -f -
1312-
apiVersion: rhdh.redhat.com/v1alpha5
1312+
apiVersion: rhdh.redhat.com/v1alpha6
13131313
kind: Backstage
13141314
metadata:
13151315
name: developer-hub

.sonarcloud.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ sonar.test.inclusions = tests/**/*, integration_tests/**/*, **/*_test.go, **/tes
77

88
# Exclude test subdirectories from source scope
99
sonar.exclusions = tests/**/*, integration_tests/**/*, **/*_test.go, **/zz_generated.deepcopy.go, **/testdata/**/*
10+
11+
# Exclude api from duplication metric
12+
sonar.cpd.exclusions=api/**

PROJECT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ resources:
1717
controller: true
1818
domain: rhdh.redhat.com
1919
kind: Backstage
20-
path: github.com/redhat-developer/rhdh-operator/api/v1alpha5
21-
version: v1alpha5
20+
path: github.com/redhat-developer/rhdh-operator/api/v1alpha6
21+
version: v1alpha6
2222
version: "3"

api/current-types.go

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package api
2+
3+
import (
4+
bsv1 "github.com/redhat-developer/rhdh-operator/api/v1alpha6"
5+
)
6+
7+
// Type aliases to decouple application code from specific API versions.
8+
// When upgrading API versions, only the import in this file needs to be updated.
9+
//
10+
// All application code should import from this package instead of importing
11+
// versioned API packages directly. For example:
12+
//
13+
// import "github.com/redhat-developer/rhdh-operator/api"
14+
//
15+
// Then use api.Backstage, api.BackstageSpec, etc.
16+
17+
type (
18+
// Core types
19+
Backstage = bsv1.Backstage
20+
BackstageSpec = bsv1.BackstageSpec
21+
BackstageStatus = bsv1.BackstageStatus
22+
BackstageList = bsv1.BackstageList
23+
24+
// Condition types
25+
BackstageConditionType = bsv1.BackstageConditionType
26+
BackstageConditionReason = bsv1.BackstageConditionReason
27+
28+
// Spec components
29+
Flavour = bsv1.Flavour
30+
Application = bsv1.Application
31+
Database = bsv1.Database
32+
AppConfig = bsv1.AppConfig
33+
ExtraEnvs = bsv1.ExtraEnvs
34+
ExtraFiles = bsv1.ExtraFiles
35+
Route = bsv1.Route
36+
RuntimeConfig = bsv1.RuntimeConfig
37+
BackstageDeployment = bsv1.BackstageDeployment
38+
Monitoring = bsv1.Monitoring
39+
40+
// Reference types
41+
EnvObjectRef = bsv1.EnvObjectRef
42+
FileObjectRef = bsv1.FileObjectRef
43+
PvcRef = bsv1.PvcRef
44+
Env = bsv1.Env
45+
46+
// Other types
47+
TLS = bsv1.TLS
48+
)
49+
50+
// Condition constants
51+
const (
52+
BackstageConditionTypeDeployed BackstageConditionType = bsv1.BackstageConditionTypeDeployed
53+
BackstageConditionReasonDeployed BackstageConditionReason = bsv1.BackstageConditionReasonDeployed
54+
BackstageConditionReasonFailed BackstageConditionReason = bsv1.BackstageConditionReasonFailed
55+
BackstageConditionReasonInProgress BackstageConditionReason = bsv1.BackstageConditionReasonInProgress
56+
)
57+
58+
// AddToScheme adds the current API version's types to the scheme.
59+
// This delegates to the underlying versioned API's AddToScheme.
60+
var AddToScheme = bsv1.AddToScheme

api/v1alpha3/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha4/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha5/backstage_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ type BackstageStatus struct {
257257

258258
//+kubebuilder:object:root=true
259259
//+kubebuilder:subresource:status
260-
//+kubebuilder:storageversion
261260
// +operator-sdk:csv:customresourcedefinitions:displayName="Red Hat Developer Hub"
262261

263262
// Backstage is the Schema for the Red Hat Developer Hub backstages API.

api/v1alpha5/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)