Identifiers
Regardless if you are using the default identifier template or your own. If the template returns an empty ID the file name where the resource originate from is used. Should two resources from the same file use the file’s id it’s considered an error.
Identifiers are used to identify a file or a partial file. Based on identifiers files are merged together. File Configurations may influence the behavior. The subpath is not relevant in the identifier evaluation.
Currently if a element has the field kind
and metadata.name
it’s combined to {kind}-{metadata.name}.yaml
. If those two data fields are not set, the filename is used. You can define your identifiers per file via the id
field. See custom ID. The current template can be found here:
You can change the identifier template
Outcomes
Here are different outcomes for identifiers.
Kind and Name
In this example the kind
and metadata.name
are set.
Results in the following IDs:
configmap-my-configmap.yaml
Without Kind and Name
In this example the kind
and metadata.name
are not set. In this case the filename is used as id.
Results in the following IDs:
configmap.yaml
Custom ID
In this example we define custom identifiers via the id
field.
Results in the following IDs:
custom-id-1
custom-id-2
Custom ID + Kind and Name
In this example we define custom identifiers via the id
field. In addition the kind
and metadata.name
are set.
Results in the following IDs:
configmap-my-configmap.yaml
custom-id-1
custom-id-2