Este contenido no está disponible en el idioma seleccionado.
Chapter 2. Breaking changes
This section lists breaking changes in Red Hat Developer Hub 1.7.
2.1. Using an optional Secret named dynamic-plugins-npmrc to configure a custom NPM registry in the Operator is removed Copiar enlaceEnlace copiado en el portapapeles!
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.yamlkey in the default configuration of the Operator (rhdh-default-configConfigMap in therhdh-operatornamespace) to include custom.npmrccontent. In your Backstage custom resource (CR), complete the following steps:
-
Create a new Secret containing the custom
.npmrccontent. -
Mount the Secret to the
install-dynamic-pluginsinitContainer. Set the
NPM_CONFIG_USERCONFIGenvironment variable to reference to the mounted.npmrcfile in thespec.deployment.patchsection.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
-
Create a new Secret containing the custom
Additional resources