Skip to content

Commit

Permalink
Replace operator API group janus-idp.io with rhdh.redhat.com (janus-i…
Browse files Browse the repository at this point in the history
…dp#201)

* Replace operator API group janus-idp.io with rhdh.redhat.com

* change to use module redhat-developer/red-hat-developer-hub-operator

* Remove files that were checked in by mistake

* Update examples/rhdh-cr.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update examples/rhdh-cr-with-app-configs.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update config/manifests/bases/backstage-operator.clusterserviceversion.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
  • Loading branch information
2 people authored and gazarenkov committed Mar 17, 2024
1 parent 228172a commit 14668bf
Show file tree
Hide file tree
Showing 46 changed files with 758 additions and 98 deletions.
11 changes: 5 additions & 6 deletions .rhdh/bundle/manifests/rhdh-operator.csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
alm-examples: |-
[
{
"apiVersion": "janus-idp.io/v1alpha1",
"apiVersion": "rhdh.redhat.com/v1alpha1",
"kind": "Backstage",
"metadata": {
"name": "developer-hub"
Expand Down Expand Up @@ -55,7 +55,7 @@ spec:
developer portal for adopters who are just starting out.
displayName: Red Hat Developer Hub
kind: Backstage
name: backstages.janus-idp.io
name: backstages.rhdh.redhat.com
version: v1alpha1
description: Red Hat Developer Hub is a Red Hat supported version of Backstage.
It comes with pre-built plug-ins, configuration settings, and deployment mechanisms,
Expand Down Expand Up @@ -107,7 +107,7 @@ spec:
- update
- watch
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages
verbs:
Expand All @@ -119,13 +119,13 @@ spec:
- update
- watch
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages/finalizers
verbs:
- update
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages/status
verbs:
Expand Down Expand Up @@ -316,7 +316,6 @@ spec:
type: AllNamespaces
keywords:
- Backstage
- Janus-IDP
- RHDH
links:
- name: Product Page
Expand Down
17 changes: 3 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
# This variable is used to construct full image tags for bundle and catalog images.
#
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
# redhat-developer/red-hat-developer-hub-operator-bundle:$VERSION and redhat-developer/red-hat-developer-hub-operator-catalog:$VERSION.
# quay.io/janus-idp/operator-bundle:$VERSION and quay.io/janus-idp/operator-catalog:$VERSION.
IMAGE_TAG_BASE ?= quay.io/janus-idp/operator

# BUNDLE_IMG defines the image:tag used for the bundle.
Expand Down Expand Up @@ -129,12 +129,6 @@ test: manifests generate fmt vet envtest ## Run tests. We need LOCALBIN=$(LOCALB
mkdir -p $(LOCALBIN)/default-config && cp config/manager/$(CONF_DIR)/* $(LOCALBIN)/default-config
LOCALBIN=$(LOCALBIN) KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out

.PHONY: integration-test
integration-test: manifests generate fmt vet envtest ## Run tests. We need LOCALBIN=$(LOCALBIN) to get correct default-config path
mkdir -p $(LOCALBIN)/default-config && cp config/manager/$(CONF_DIR)/* $(LOCALBIN)/default-config
LOCALBIN=$(LOCALBIN) KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" ginkgo -v -r integration_tests


##@ Build

.PHONY: build
Expand Down Expand Up @@ -309,9 +303,9 @@ bundle: operator-sdk manifests kustomize ## Generate bundle manifests and metada
$(MAKE) fmt_license

## to update the CSV with a new tagged version of the operator:
## yq '.spec.install.spec.deployments[0].spec.template.spec.containers[1].image|="quay.io/janus-idp/operator:some-other-tag"' bundle/manifests/backstage-operator.clusterserviceversion.yaml
## yq '.spec.install.spec.deployments[0].spec.template.spec.containers[1].image|="quay.io/rhdh/operator:some-other-tag"' bundle/manifests/backstage-operator.clusterserviceversion.yaml
## or
## sed -r -e "s#(image: +)quay.io/.+operator.+#\1quay.io/janus-idp/operator:some-other-tag#g" -i bundle/manifests/backstage-operator.clusterserviceversion.yaml
## sed -r -e "s#(image: +)quay.io/.+operator.+#\1quay.io/rhdh/operator:some-other-tag#g" -i bundle/manifests/backstage-operator.clusterserviceversion.yaml
.PHONY: bundle-build
bundle-build: ## Build the bundle image.
$(CONTAINER_ENGINE) build --platform $(PLATFORM) -f docker/bundle.Dockerfile -t $(BUNDLE_IMG) --label $(LABEL) .
Expand Down Expand Up @@ -371,8 +365,3 @@ catalog-update: ## Update catalog source in the default namespace for catalogsou
.PHONY: deploy-openshift
deploy-openshift: release-build release-push catalog-update ## Deploy the operator on openshift cluster

.PHONY: deployment-script
deployment-script: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/default > rhdh-operator-${VERSION}.yaml

4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
domain: janus-idp.io
domain: rhdh.redhat.com
layout:
- go.kubebuilder.io/v3
plugins:
Expand All @@ -11,7 +11,7 @@ resources:
crdVersion: v1
namespaced: true
controller: true
domain: janus-idp.io
domain: rhdh.redhat.com
kind: Backstage
path: redhat-developer/red-hat-developer-hub-operator/api/v1alpha1
version: v1alpha1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## The Goal
The Goal of [Backstage](https://backstage.io) Operator project is creating Kubernetes Operator for configuring, installing and synchronizing Backstage instance on Kubernetes/OpenShift.
The initial target is in support of Red Hat's assemblies of Backstage - specifically supporting [dynamic-plugins](https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/dynamic-plugins.md)) on OpenShift. This includes [Janus-IDP](https://janus-idp.io/) and [Red Hat Developer Hub (RHDH)](https://developers.redhat.com/rhdh) but may be flexible enough to install any compatible Backstage instance on Kubernetes. See additional information under [Configuration](docs/configuration.md)).
The initial target is in support of Red Hat's assemblies of Backstage - specifically supporting [dynamic-plugins](https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/dynamic-plugins.md) on OpenShift. This includes [Red Hat Developer Hub (RHDH)](https://developers.redhat.com/rhdh) but may be flexible enough to install any compatible Backstage instance on Kubernetes. See additional information under [Configuration](docs/configuration.md).
The Operator provides clear and flexible configuration options to satisfy a wide range of expectations, from "no configuration for default quick start" to "highly customized configuration for production".

[More documentation...](#more-documentation)
Expand All @@ -21,7 +21,7 @@ git clone https://github.com/janus-idp/operator
```
2. Deploy Operator on the minikube cluster:
```sh
cd <your-janus-idp-operator-project-dir>
cd <your-rhdh-operator-project-dir>
make deploy
```
you can check if the Operator pod is up by running
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=janus-idp.io
// +groupName=rhdh.redhat.com
package v1alpha1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "janus-idp.io", Version: "v1alpha1"}
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}
Expand Down
14 changes: 7 additions & 7 deletions bundle/manifests/backstage-default-config_v1_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data:
name: backstage-psql-cr1-hl # placeholder for 'backstage-psql-<cr-name>-hl'
spec:
selector:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
clusterIP: None
ports:
- port: 5432
Expand All @@ -41,7 +41,7 @@ data:
name: backstage-psql # placeholder for 'backstage-psql-<cr-name>' .NOTE: For the time it is static and linked to Secret-> postgres-secrets -> OSTGRES_HOST
spec:
selector:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
ports:
- port: 5432
db-statefulset.yaml: |
Expand All @@ -54,12 +54,12 @@ data:
replicas: 1
selector:
matchLabels:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
serviceName: backstage-psql-cr1-hl # placeholder for 'backstage-psql-<cr-name>-hl'
template:
metadata:
labels:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
name: backstage-db-cr1 # placeholder for 'backstage-psql-<cr-name>'
spec:
automountServiceAccountToken: false
Expand Down Expand Up @@ -165,11 +165,11 @@ data:
replicas: 1
selector:
matchLabels:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
rhdh.redhat.com/app: # placeholder for 'backstage-<cr-name>'
template:
metadata:
labels:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
rhdh.redhat.com/app: # placeholder for 'backstage-<cr-name>'
spec:
automountServiceAccountToken: false
volumes:
Expand Down Expand Up @@ -292,7 +292,7 @@ data:
spec:
type: ClusterIP
selector:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
rhdh.redhat.com/app: # placeholder for 'backstage-<cr-name>'
ports:
- name: http-backend
port: 80
Expand Down
14 changes: 7 additions & 7 deletions bundle/manifests/backstage-operator.clusterserviceversion.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: backstages.janus-idp.io
name: backstages.rhdh.redhat.com
spec:
group: janus-idp.io
group: rhdh.redhat.com
names:
kind: Backstage
listKind: BackstageList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: backstages.janus-idp.io
name: backstages.rhdh.redhat.com
spec:
group: janus-idp.io
group: rhdh.redhat.com
names:
kind: Backstage
listKind: BackstageList
Expand Down
2 changes: 1 addition & 1 deletion config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/janus-idp.io_backstages.yaml
- bases/rhdh.redhat.com_backstages.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_backstages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: backstages.janus-idp.io
name: backstages.rhdh.redhat.com
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_backstages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: backstages.janus-idp.io
name: backstages.rhdh.redhat.com
spec:
conversion:
strategy: Webhook
Expand Down
2 changes: 1 addition & 1 deletion config/manager/default-config/db-service-hl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: backstage-psql-cr1-hl # placeholder for 'backstage-psql-<cr-name>-hl'
spec:
selector:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
clusterIP: None
ports:
- port: 5432
2 changes: 1 addition & 1 deletion config/manager/default-config/db-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ metadata:
name: backstage-psql # placeholder for 'backstage-psql-<cr-name>' .NOTE: For the time it is static and linked to Secret-> postgres-secrets -> OSTGRES_HOST
spec:
selector:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
ports:
- port: 5432
4 changes: 2 additions & 2 deletions config/manager/default-config/db-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ spec:
replicas: 1
selector:
matchLabels:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
serviceName: backstage-psql-cr1-hl # placeholder for 'backstage-psql-<cr-name>-hl'
template:
metadata:
labels:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
rhdh.redhat.com/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
name: backstage-db-cr1 # placeholder for 'backstage-psql-<cr-name>'
spec:
automountServiceAccountToken: false
Expand Down
4 changes: 2 additions & 2 deletions config/manager/default-config/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ spec:
replicas: 1
selector:
matchLabels:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
rhdh.redhat.com/app: # placeholder for 'backstage-<cr-name>'
template:
metadata:
labels:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
rhdh.redhat.com/app: # placeholder for 'backstage-<cr-name>'
spec:
automountServiceAccountToken: false
volumes:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/default-config/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
type: ClusterIP
selector:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
rhdh.redhat.com/app: # placeholder for 'backstage-<cr-name>'
ports:
- name: http-backend
port: 80
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions config/rbac/backstage_editor_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
name: backstage-editor-role
rules:
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages
verbs:
Expand All @@ -24,7 +24,7 @@ rules:
- update
- watch
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ rules:
- update
- watch
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages
verbs:
Expand All @@ -71,13 +71,13 @@ rules:
- update
- watch
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages/finalizers
verbs:
- update
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages/status
verbs:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/_v1alpha1_backstage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: janus-idp.io/v1alpha1
apiVersion: rhdh.redhat.com/v1alpha1
kind: Backstage
metadata:
labels:
Expand Down
Loading

0 comments on commit 14668bf

Please sign in to comment.