You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Injecting extra files and environment variables into {backstage} containers
6
6
7
-
You must use the `spec.application.extraFiles|extraEnvs.configMaps|secrets.containers` path to configure the injection of extra files and environment variables into your {backstage} Pod containers. This ensures necessary configurations, credentials, and dependencies (such as certificates) are available at runtime.
7
+
You must use the `spec.application` path to configure the injection of extra files and environment variables into your {backstage} Pod containers. This ensures necessary configurations, credentials, and dependencies (such as certificates) are available at runtime.
8
8
9
9
By default, files mount only to the `backstage-backend` container. If the `containers` field is not specified, the volume mounts to the `backstage-backend` container only. You can also specify other targets, including a list of containers by name (such as `dynamic-plugin-install` or custom sidecars) or opt to in all containers in the {backstage} Pod.
10
10
11
-
. To mount extra files, apply the configuration to your `{product-custom-resource-type} custom resource (CR)` as shown in the following code:
11
+
. To mount files, PVCs, and injecting environment variables into different container targets., apply the configuration to your `{product-custom-resource-type} custom resource (CR)` as shown in the following code:
12
12
+
13
13
[source,yaml]
14
14
----
15
15
spec:
16
16
application:
17
+
# Default mount path for extraFiles without a specific mountPath
17
18
extraFiles:
18
-
mountPath: /my/path
19
+
mountPath: /my/path
19
20
configMaps:
20
-
- name: cm1
21
+
- name: cm1 # Mounts all entries from cm1 to /my/path/
21
22
- name: cm2
22
-
key: file21.txt
23
+
key: file21.txt # Mounts only 'file21.txt'
23
24
containers:
24
-
- "*"
25
+
- "*" # Targets all containers
25
26
- name: cm3
26
-
mountPath: /my/cm3/path
27
+
mountPath: /my/cm3/path # Mounts all entries as a directory
27
28
containers:
28
29
- backstage-backend
29
30
- install-dynamic-plugins
30
31
secrets:
31
32
- name: secret1
32
-
key: file3.txt
33
+
key: file3.txt # Must specify key for security
33
34
containers:
34
35
- install-dynamic-plugins
35
36
- name: secret2
36
-
mountPath: /my/secret2/path
37
+
mountPath: /my/secret2/path # Mounts all secret entries as a directory
38
+
pvcs:
39
+
- name: myclaim1 # Mounts to /my/path/myclaim1 (using default mountPath)
0 commit comments