Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0680888
fetcher
gazarenkov Aug 6, 2026
1329517
fetcher
gazarenkov Aug 6, 2026
d8dcc1f
deps
gazarenkov Aug 10, 2026
7f4feaa
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Aug 10, 2026
47b948a
devhub catalog support
gazarenkov Aug 20, 2026
38fd936
docs
gazarenkov Aug 24, 2026
e381b55
missed files
gazarenkov Aug 24, 2026
5587899
DISABLE_CATALOG_CONTROLLER
gazarenkov Aug 25, 2026
d420ddc
bundle
gazarenkov Aug 25, 2026
56cbbd3
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Aug 25, 2026
f973d40
bundle
gazarenkov Aug 25, 2026
b49b055
Remove .go.1 backup files from repo
gazarenkov Aug 25, 2026
772d28b
fix
gazarenkov Aug 25, 2026
92d6a7a
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Aug 25, 2026
cb0c2c8
bundles
gazarenkov Aug 25, 2026
d5241d6
fixes
gazarenkov Aug 26, 2026
78535df
fixes
gazarenkov Aug 26, 2026
8ec906f
fixes
gazarenkov Aug 26, 2026
6361ce8
fixes
gazarenkov Aug 26, 2026
9543319
fixes
gazarenkov Aug 27, 2026
0559863
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Aug 27, 2026
33938c3
fixes
gazarenkov Aug 27, 2026
40f43d9
add files
gazarenkov Aug 27, 2026
084f7a9
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Aug 31, 2026
e600ab0
fix
gazarenkov Aug 31, 2026
57912df
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Aug 31, 2026
d6b839b
fix
gazarenkov Aug 31, 2026
e04ae7a
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Sep 4, 2026
0ca33d9
fix
gazarenkov Sep 4, 2026
145363f
fix
gazarenkov Sep 4, 2026
8395328
fix
gazarenkov Sep 4, 2026
7ca8d6e
fix
gazarenkov Sep 8, 2026
9c6cf17
bundle
gazarenkov Sep 8, 2026
e32ed46
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Sep 8, 2026
c99fdbc
bundle
gazarenkov Sep 8, 2026
16b4c96
Merge remote-tracking branch 'upstream/main' into devhub-plugin-catalog
gazarenkov Sep 8, 2026
1009830
bundle
gazarenkov Sep 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 30 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PROFILE ?= rhdh
# Enable operator dynamic plugins processing (default: true)
OPERATOR_DP_PROCESSING ?= true
# Install dynamic plugins image (required when OPERATOR_DP_PROCESSING=true)
INSTALL_DP_IMAGE ?= quay.io/rhdh-community/rhdh-plugin-installer:next
RELATED_IMAGE_plugin_installer ?= quay.io/rhdh-community/rhdh-plugin-installer:next
PROFILE_SHORT := $(shell echo $(PROFILE) | cut -d. -f1)

# VERSION defines the project version for the bundle.
Expand All @@ -33,15 +33,16 @@ IMAGE_TAG_VERSION = $(VERSION)

ifeq ($(PROFILE), rhdh)
# Profile-specific settings
ifeq ($(DEFAULT_VERSION), true)
# Keep the same major version as VERSION (community and RHDH are aligned).
# Strip the patch for IMAGE_TAG_VERSION (x.y.z => x.y) to match downstream
# quay.io/rhdh image tags. Only if VERSION was not explicitly overridden.
IMAGE_TAG_VERSION := $(shell echo $(VERSION) | cut -d. -f1,2)
endif

# IMAGE_TAG_BASE ?= registry.redhat.io/rhdh/rhdh-rhel10-operator
IMAGE_TAG_BASE ?= quay.io/rhdh/rhdh-rhel10-operator
# ifeq ($(DEFAULT_VERSION), true)
# # Keep the same major version as VERSION (community and RHDH are aligned).
# # Strip the patch for IMAGE_TAG_VERSION (x.y.z => x.y) to match downstream
# # quay.io/rhdh image tags. Only if VERSION was not explicitly overridden.
# IMAGE_TAG_VERSION := $(shell echo $(VERSION) | cut -d. -f1,2)
# endif

# TODO: Changed to 'rhdh-community' at least until 'rhdh' does not support arm64
# IMAGE_TAG_BASE ?= registry.redhat.io/rhdh/rhdh-rhel9-operator
IMAGE_TAG_BASE ?= quay.io/rhdh-community/operator
DEFAULT_CHANNEL ?= fast
CHANNELS ?= fast,fast-\$${CI_X_VERSION}.\$${CI_Y_VERSION}
BUNDLE_METADATA_PACKAGE_NAME ?= rhdh
Expand Down Expand Up @@ -170,12 +171,12 @@ fmt: goimports ## Format the code using goimports
.PHONY: test
test: manifests generate fmt vet setup-envtest $(LOCALBIN) ## Run tests. We need LOCALBIN=$(LOCALBIN) to get correct default-config path
@OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) ./hack/copy-local-dynamic-plugins.sh $(PROFILE) $(LOCALBIN)
OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) INSTALL_DP_IMAGE=$(INSTALL_DP_IMAGE) LOCALBIN=$(LOCALBIN) KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $(PKGS) -coverprofile cover.out
DISABLE_CATALOG_CONTROLLER=true OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) RELATED_IMAGE_plugin_installer=$(RELATED_IMAGE_plugin_installer) LOCALBIN=$(LOCALBIN) KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $(PKGS) -coverprofile cover.out
Comment thread
rm3l marked this conversation as resolved.
Resolved

.PHONY: integration-test
integration-test: ginkgo manifests generate fmt vet envtest $(LOCALBIN) ## Run integration_tests. We need LOCALBIN=$(LOCALBIN) to get correct default-config path
@OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) ./hack/copy-local-dynamic-plugins.sh $(PROFILE) $(LOCALBIN)
OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) INSTALL_DP_IMAGE=$(INSTALL_DP_IMAGE) LOCALBIN=$(LOCALBIN) KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -v -r $(ARGS) integration_tests
DISABLE_CATALOG_CONTROLLER=true OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) RELATED_IMAGE_plugin_installer=$(RELATED_IMAGE_plugin_installer) LOCALBIN=$(LOCALBIN) KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -v -r $(ARGS) integration_tests

# After this time, Ginkgo will emit progress reports, so we can get visibility into long-running tests.
POLL_PROGRESS_INTERVAL := 600s
Expand Down Expand Up @@ -249,7 +250,7 @@ build: manifests generate fmt vet ## Build manager binary.
.PHONY: run
run: manifests generate fmt vet $(LOCALBIN) ## Run a controller from your host.
@OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) ./hack/copy-local-dynamic-plugins.sh $(PROFILE) $(LOCALBIN)
OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) INSTALL_DP_IMAGE=$(INSTALL_DP_IMAGE) go run -C $(LOCALBIN) ../cmd/main.go $(ARGS)
DISABLE_CATALOG_CONTROLLER=true OPERATOR_DP_PROCESSING=$(OPERATOR_DP_PROCESSING) RELATED_IMAGE_plugin_installer=$(RELATED_IMAGE_plugin_installer) go run -C $(LOCALBIN) ../cmd/main.go $(ARGS)

.PHONY: local-dynamic-plugins
local-dynamic-plugins: ## Generate local-test dynamic-plugins.yaml from catalog-index image for local testing
Expand Down Expand Up @@ -278,15 +279,15 @@ image-push: ## Push container image with the manager.

.PHONY: install-dp-build
install-dp-build: ## Build the plugin installer image (skopeo variant, single platform)
$(CONTAINER_TOOL) build --platform $(PLATFORM) -t $(INSTALL_DP_IMAGE) --label $(LABEL) -f plugin-installer/Dockerfile.skopeo .
$(CONTAINER_TOOL) build --platform $(PLATFORM) -t $(RELATED_IMAGE_plugin_installer) --label $(LABEL) -f plugin-installer/Dockerfile.skopeo .

.PHONY: install-dp-buildx
install-dp-buildx: ## Build and push multiplatform plugin installer image (skopeo variant)
$(CONTAINER_TOOL) buildx build --push --platform=$(MIN_PLATFORMS) -t $(INSTALL_DP_IMAGE) --label $(LABEL) -f plugin-installer/Dockerfile.skopeo .
$(CONTAINER_TOOL) buildx build --push --platform=$(MIN_PLATFORMS) -t $(RELATED_IMAGE_plugin_installer) --label $(LABEL) -f plugin-installer/Dockerfile.skopeo .

.PHONY: install-dp-push
install-dp-push: ## Push the plugin installer image
$(CONTAINER_TOOL) push $(INSTALL_DP_IMAGE)
$(CONTAINER_TOOL) push $(RELATED_IMAGE_plugin_installer)

# PLATFORMS defines the target platforms for the manager image be built to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
Expand Down Expand Up @@ -317,6 +318,9 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
mkdir -p dist/$(PROFILE)
cd config/profile/$(PROFILE) && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/profile/$(PROFILE) > dist/$(PROFILE)/install.yaml
@sed $(SED_I) 's|quay.io/rhdh/plugin-catalog-index:next|$(CATALOG_INDEX_IMAGE)|g' dist/$(PROFILE)/install.yaml
@sed $(SED_I) 's|{{OPERATOR_DP_PROCESSING}}|$(OPERATOR_DP_PROCESSING)|g' dist/$(PROFILE)/install.yaml
@sed $(SED_I) 's|{{RELATED_IMAGE_plugin_installer}}|$(RELATED_IMAGE_plugin_installer)|g' dist/$(PROFILE)/install.yaml
@echo "Generated operator installer manifest: dist/$(PROFILE)/install.yaml"

.PHONY: deployment-manifest
Expand Down Expand Up @@ -345,7 +349,11 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
--input-dir ./config/manifests/$(PROFILE)/ \
--output-dir ./config/manifests/$(PROFILE)/
cd config/profile/$(PROFILE) && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests/$(PROFILE) | $(OPERATOR_SDK) generate bundle --kustomize-dir config/manifests/$(PROFILE) $(BUNDLE_GEN_FLAGS)
$(KUSTOMIZE) build config/manifests/$(PROFILE) | \
sed 's|quay.io/rhdh/plugin-catalog-index:next|$(CATALOG_INDEX_IMAGE)|g' | \
Comment thread
gazarenkov marked this conversation as resolved.
Resolved
sed 's|{{OPERATOR_DP_PROCESSING}}|$(OPERATOR_DP_PROCESSING)|g' | \
sed 's|{{RELATED_IMAGE_plugin_installer}}|$(RELATED_IMAGE_plugin_installer)|g' | \
$(OPERATOR_SDK) generate bundle --kustomize-dir config/manifests/$(PROFILE) $(BUNDLE_GEN_FLAGS)
@mv -f bundle.Dockerfile ./bundle/$(PROFILE)/bundle.Dockerfile
@sed $(SED_I) 's/backstage-operator.v$(VERSION)/$(PROFILE_SHORT)-operator.v$(VERSION)/g' ./bundle/$(PROFILE)/manifests/backstage-operator.clusterserviceversion.yaml
@sed $(SED_I) 's/backstage-operator/$(BUNDLE_METADATA_PACKAGE_NAME)/g' ./bundle/$(PROFILE)/metadata/annotations.yaml
Expand Down Expand Up @@ -406,7 +414,11 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/profile/$(PROFILE) && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/profile/$(PROFILE) | $(KUBECTL) apply -f -
$(KUSTOMIZE) build config/profile/$(PROFILE) | \
sed 's|quay.io/rhdh/plugin-catalog-index:next|$(CATALOG_INDEX_IMAGE)|g' | \
sed 's|{{OPERATOR_DP_PROCESSING}}|$(OPERATOR_DP_PROCESSING)|g' | \
sed 's|{{RELATED_IMAGE_plugin_installer}}|$(RELATED_IMAGE_plugin_installer)|g' | \
$(KUBECTL) apply -f -

.PHONY: undeploy
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
Expand Down
6 changes: 6 additions & 0 deletions api/current-types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ type (

// Other types
TLS = bsv1.TLS

// DevHubPluginCatalog types
DevHubPluginCatalog = bsv1.DevHubPluginCatalog
DevHubPluginCatalogSpec = bsv1.DevHubPluginCatalogSpec
DevHubPluginCatalogList = bsv1.DevHubPluginCatalogList
CatalogSource = bsv1.CatalogSource
)

// Condition constants
Expand Down
14 changes: 7 additions & 7 deletions api/v1alpha5/backstage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,6 @@ type Flavour struct {
Enabled bool `json:"enabled,omitempty"`
}

func init() {
SchemeBuilder.Register(func(s *runtime.Scheme) error {
s.AddKnownTypes(GroupVersion, &Backstage{}, &BackstageList{})
return nil
})
}

// IsLocalDbEnabled returns true if Local database is configured and enabled
func (s *BackstageSpec) IsLocalDbEnabled() bool {
if s.Database == nil {
Expand All @@ -415,3 +408,10 @@ func (s *BackstageSpec) IsAuthSecretSpecified() bool {
func (s *BackstageSpec) IsMonitoringEnabled() bool {
return s.Monitoring.Enabled
}

func init() {
SchemeBuilder.Register(func(s *runtime.Scheme) error {
s.AddKnownTypes(GroupVersion, &Backstage{}, &BackstageList{})
return nil
})
}
88 changes: 88 additions & 0 deletions api/v1alpha5/devhubplugincatalog_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package v1alpha5

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// DevHubPluginCatalogSpec defines the desired state of DevHubPluginCatalog
type DevHubPluginCatalogSpec struct {
// Source defines where to fetch the catalog from
// +kubebuilder:validation:Required
Source CatalogSource `json:"source"`
}

// CatalogSource defines the source of the plugin catalog
type CatalogSource struct {
// Ref is the OCI artifact reference containing the catalog
// Example: oci://registry.redhat.io/rhdh/plugin-catalog:1.5
// +kubebuilder:validation:Required
Ref string `json:"ref"`

// PullSecret is a reference to a Secret containing registry credentials
// +optional
PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty"`

// CertificateAuthority is a reference to a ConfigMap key containing CA certificate
// +optional
CertificateAuthority *corev1.ConfigMapKeySelector `json:"certificateAuthority,omitempty"`

// SkipTLSVerify skips TLS certificate verification (not recommended for production)
// +optional
// +kubebuilder:default=false
SkipTLSVerify bool `json:"skipTLSVerify,omitempty"`
}

// DevHubPluginCatalogStatus defines the observed state of DevHubPluginCatalog
type DevHubPluginCatalogStatus struct {
// Conditions represent the latest available observations of the catalog's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// Condition types for DevHubPluginCatalog
const (
// ConditionTypeReady indicates whether the catalog has been successfully processed
ConditionTypeReady = "Ready"
)

// Condition reasons for DevHubPluginCatalog
const (
ConditionReasonProcessing = "Processing"
ConditionReasonSucceeded = "Succeeded"
ConditionReasonFailed = "Failed"
)

// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced,shortName=dhpc
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ref",type=string,JSONPath=`.spec.source.ref`
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// DevHubPluginCatalog is the Schema for the devhubplugincatalogs API.
// It defines a source for plugin catalogs that can be fetched from OCI registries.
type DevHubPluginCatalog struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec DevHubPluginCatalogSpec `json:"spec,omitempty"`
Status DevHubPluginCatalogStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// DevHubPluginCatalogList contains a list of DevHubPluginCatalog
type DevHubPluginCatalogList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DevHubPluginCatalog `json:"items"`
}

func init() {
SchemeBuilder.Register(func(s *runtime.Scheme) error {
s.AddKnownTypes(GroupVersion, &DevHubPluginCatalog{}, &DevHubPluginCatalogList{})
return nil
})
}
123 changes: 123 additions & 0 deletions api/v1alpha5/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading