3.2. Examples of configuration snippet lists or arrays
Lists, or arrays, are not merged, they are overwritten. For example, you can replace a SAN or list of SANs by creating an additional snippet for the same field that is read after the first:
MicroShift configuration directory contents
-
/etc/microshift/config.yaml.defaultor/etc/microshift/config.yaml
Example MicroShift configuration snippet directory contents
-
/etc/microshift/config.d/10-san.yaml /etc/microshift/config.d/20-san.yamlExample
10-san.yamlsnippetapiServer: subjectAltNames: - host1 - host2Example
20-san.yamlsnippetapiServer: subjectAltNames: - hostZExample configuration result
apiServer: subjectAltNames: - hostZ
If you want to add a value to an existing list, you can add it to an existing snippet. For example, to add hostZ to an existing list of SANs, edit the snippet you have instead of creating a new one:
Example 10-san.yaml snippet
apiServer:
subjectAltNames:
- host1
- host2
- hostZ
Example configuration result
apiServer:
subjectAltNames:
- host1
- host2
- hostZ