第 2 章 Breaking changes


This section lists breaking changes in Red Hat Developer Hub 1.7.

Previously, the Operator could automatically detect and mount an optional Secret named dynamic-plugins-npmrc to configure a custom npm registry.

With this update, you can do any of the following workarounds:

  • Modify the default-config/secret-files.yaml key in the default configuration of the Operator (rhdh-default-config ConfigMap in the rhdh-operator namespace) to include custom .npmrc content.
  • In your Backstage custom resource (CR), complete the following steps:

    1. Create a new Secret containing the custom .npmrc content.
    2. Mount the Secret to the install-dynamic-plugins initContainer.
    3. Set the NPM_CONFIG_USERCONFIG environment variable to reference to the mounted .npmrc file in the spec.deployment.patch section.

      Example of a Secret containing the .npmrc file

      apiVersion: v1
      kind: Secret
      metadata:
        name: dynamic-plugins-npmrc
      type: Opaque
      stringData:
        .npmrc: |
          @my-company:registry=https://my-company.example.com
          //<registry-url>:_authToken=<auth-token>
      ---
      apiVersion: rhdh.redhat.com/v1alpha3
      kind: Backstage
      metadata:
        name: my-rhdh
      spec:
        application:
          dynamicPluginsConfigMapName: my-dynamic-plugins-rhdh
        # --- BEGIN WORKAROUND: Ensure you have the volumes, volume mounts and NPM_CONFIG_USERCONFIG env var listed below
        deployment:
          patch:
            spec:
              template:
                spec:
                  initContainers:
                    - name: install-dynamic-plugins
                      volumeMounts:
                        - mountPath: /opt/app-root/src/.my-dynamic-plugins-npmrc.dynamic-plugins
                          name: my-dynamic-plugins-npmrc
                      env:
                        - name:
                        - name: NPM_CONFIG_USERCONFIG
                          # path before .npmrc should be the same as in the mountPath above
                          # file name .npmrc should be the same as key in the dynamic-plugins-npmrc secret above
                          value: /opt/app-root/src/.my-dynamic-plugins-npmrc.dynamic-plugins/.npmrc
                  volumes:
                    - name: my-dynamic-plugins-npmrc
                      secret:
                        secretName: dynamic-plugins-npmrc
        # --- END WORKAROUND

Additional resources

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部