Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

[1.1.x] Replace operator API group janus-idp.io with rhdh.redhat.com #201

Merged
merged 6 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
6 changes: 3 additions & 3 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
# janus-idp.io/backstage-operator-bundle:$VERSION and janus-idp.io/backstage-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 @@ -303,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
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
domain: janus-idp.io
domain: rhdh.redhat.com
layout:
- go.kubebuilder.io/v3
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
projectName: backstage-operator
repo: janus-idp.io/backstage-operator
repo: redhat-developer/red-hat-developer-hub-operator
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
domain: janus-idp.io
domain: rhdh.redhat.com
kind: Backstage
path: janus-idp.io/backstage-operator/api/v1alpha1
path: redhat-developer/red-hat-developer-hub-operator/api/v1alpha1
version: v1alpha1
version: "3"
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>'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to also replace the selector label in this doc once this PR is merged: https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/monitoring-and-logging.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. https://janus-idp.io/ actually exists as a website.

rhdh.redhat.com however does not, but https://redhat-developer.github.io/ does - we have the product docs at https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/ for example.

Are these URLs supposed to exist?

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 @@ -56,7 +56,7 @@ rules:
- update
- watch
- apiGroups:
- janus-idp.io
- rhdh.redhat.com
resources:
- backstages
verbs:
Expand All @@ -68,13 +68,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
3 changes: 2 additions & 1 deletion controllers/backstage_app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
"context"
"fmt"

bs "janus-idp.io/backstage-operator/api/v1alpha1"
bs "redhat-developer/red-hat-developer-hub-operator/api/v1alpha1"

appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
3 changes: 2 additions & 1 deletion controllers/backstage_backend_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
"context"
"fmt"

bs "janus-idp.io/backstage-operator/api/v1alpha1"
bs "redhat-developer/red-hat-developer-hub-operator/api/v1alpha1"

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
Expand Down
11 changes: 6 additions & 5 deletions controllers/backstage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import (
"os"
"path/filepath"

bs "redhat-developer/red-hat-developer-hub-operator/api/v1alpha1"

"github.com/go-logr/logr"
bs "janus-idp.io/backstage-operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -38,7 +39,7 @@ import (
)

const (
BackstageAppLabel = "janus-idp.io/app"
BackstageAppLabel = "rhdh.redhat.com/app"
)

var (
Expand All @@ -63,9 +64,9 @@ type BackstageReconciler struct {
IsOpenShift bool
}

//+kubebuilder:rbac:groups=janus-idp.io,resources=backstages,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=janus-idp.io,resources=backstages/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=janus-idp.io,resources=backstages/finalizers,verbs=update
//+kubebuilder:rbac:groups=rhdh.redhat.com,resources=backstages,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=rhdh.redhat.com,resources=backstages/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=rhdh.redhat.com,resources=backstages/finalizers,verbs=update
//+kubebuilder:rbac:groups="",resources=configmaps;services,verbs=get;list;watch;create;update;delete
//+kubebuilder:rbac:groups="",resources=persistentvolumes;persistentvolumeclaims,verbs=get;list;watch
//+kubebuilder:rbac:groups="",resources=secrets,verbs=create;delete
Expand Down
Loading
Loading