Identifiers
Example https://github.com/buttahtoast/helmize/tree/main/examples/example-identifiers
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.
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 there be multiple resources in that file which don’t evaluate dedicated identifiers, they are both assigned the same identifier (filename) and therefor merged.
Custom IDs are always used. If a manifest has the field kind
and metadata.name
it’s combined to {kind}-{metadata.name}.yaml
which is added as identifier. If no custom IDs are set or those two data fields, the filename is used. The current template for identifiert evaluation can be found here:
You can change the identifier template
The identifier template which should be used is defined in the helmize configuration
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