The goal of the Backstage Operator project is to create a Kubernetes Operator for configuring, installing and synchronizing Backstage instances on Kubernetes/OpenShift. The initial target is in support of Red Hat's assemblies of Backstage - specifically supporting dynamic-plugins on OpenShift. This includes Red Hat Developer Hub (RHDH) but may be flexible enough to install any compatible Backstage instance on Kubernetes. See additional information under Configuration. 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".
- go version v1.25.0+
You’ll need a Kubernetes or OpenShift cluster. You can use Minikube or KIND for local testing, or deploy to a remote cluster.
Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info shows).
To test it on Minikube from the source code:
Both kubectl and minikube must be installed. See tools.
- Get your copy of Operator from GitHub:
git clone https://github.com/redhat-developer/rhdh-operator- Deploy Operator on the minikube cluster:
cd <your-rhdh-operator-project-dir>
make deployYou can check if the Operator pod is up by running:
kubectl get pods -n rhdh-operatorIt should be something like:
NAME READY STATUS RESTARTS AGE
rhdh-operator-975455fb7-q7xvd 1/1 Running 0 32s
- Create Backstage Custom resource on some namespace (make sure this namespace exists)
kubectl -n <your-namespace> apply -f examples/bs1.yamlYou can check if the Operand pods are up by running:
kubectl get pods -n <your-namespace>It should be something like:
NAME READY STATUS RESTARTS AGE
backstage-bs1-6c98c4dd6d-9wbgg 1/1 Running 3 (34m ago) 34m
backstage-psql-bs1-0 1/1 Running 0 34m
- Port forward Backstage pod/port (destination port is 17007 in this example) and get URL for access Backstage.
The Backstage pod name follows a pattern:
backstage-<name-of-CR>-<random-sequence>. Taking the previous item as an example, your backstage pod name would bebackstage-bs1-6c98c4dd6d-9wbgg
minikube service -n <your-namespace> backstage --url
kubectl port-forward -n <your-namespace> <backstage-pod-name> 17007:7007Output:
Forwarding from 127.0.0.1:17007 -> 7007
Forwarding from [::1]:17007 -> 7007
- Access your Backstage instance in a browser using http://localhost:17007
The telemetry data collection feature is enabled by default. The default configuration uses image with backstage-plugin-analytics-provider-segment plugin enabled and configured. To disable this and to learn what data is being collected, see https://github.com/redhat-developer/rhdh/blob/main/docs/index.md#telemetry-collection
To report issues against this repository, please use JIRA: https://issues.redhat.com/browse/RHIDP with Component: Operator To browse the issues you can use this Query.
Contributions are welcome!
Copyright Red Hat
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.