2.2. Automated Operator features


You can use the Operator to automate several key processes to effectively configure your Backstage application.

2.2.1. Metadata generation

The Operator automatically generates specific metadata values for all default resources at runtime to ensure your Backstage application functions properly.

For all the default resources, metadata.name is generated according to the rules defined in the Default Configuration files, particularly the Resource name column. For example, Backstage Custom Resource (CR) named mybackstage creates Kubernetes Deployment resource called backstage-mybackstage.

The following metadata is generated for each resource:

  • deployment.yaml

    • spec.selector.matchLabels[rhdh.redhat.com/app] = backstage-{cr-name}
    • spec.template.metadata.labels[rhdh.redhat.com/app] = backstage-{cr-name}
  • service.yaml

    • spec.selector[rhdh.redhat.com/app] = backstage-{cr-name}
  • db-statefulset.yaml

    • spec.selector.matchLabels[rhdh.redhat.com/app] = backstage-psql-{cr-name}
    • spec.template.metadata.labels[rhdh.redhat.com/app] = backstage-psql-{cr-name}
  • db-service.yaml

    • spec.selector[rhdh.redhat.com/app] = backstage-psql-{cr-name}

2.2.2. Multiple resources

You can define and create multiple resources of the same type in a single YAML file. This is applicable to any resource type that is a list in the resource table. To define multiple resources, use the --- delimiter to separate each resource definition.

For example, adding the following code snip to pvcs.yaml creates two PersistentVolumeClaims (PVCs) called backstage-{cr-name}-myclaim1 and backstage-{cr-name}-myclaim2 and mounts them to the Backstage container accordingly.

Example creating multiple PVCs

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: myclaim1
...
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: myclaim2
...

2.2.3. Default base URLs

The Operator automatically sets the base URLs for your Backstage application in the default app-config ConfigMap known as backstage-appconfig-{CR_name}. The Operator does so based on your Route parameters and the OpenShift cluster ingress domain.

The Operator follows these rules to set the base URLs for your application:

The Operator updates the following base URLs in the default app-config ConfigMap:

  • app.baseUrl
  • backend.baseUrl
  • backend.cors.origin
注意

You can perform these actions on a best-effort basis and only on OpenShift. During an error or on non-OpenShift clusters, you can still override these defaults by providing a custom app-config ConfigMap.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部