- `seconds`: Converts a [duration](/reference/compose-file/extension.md#specifying-durations) into an integer
- `uppercase`: Converts a string into upper case characters
- `title`: Converts a string by capitalizing the first letter of each word
- `safe`: Converts a string into a safe identifier, replacing all characters (except lowercase a-z) with `-`
- `truncate`: Removes the N first elements from a list
- `join`: Groups elements from a list into a single string, using a separator
- `base64`: Encodes a string as base64 used in Kubernetes for encoding secrets
- `map`: Transforms a value according to mappings expressed as `"value -> newValue"` strings
- `indent`: Writes string content indented by N spaces
- `helmValue`: Writes the string content as a template value in the final file
In the following example, the template checks if a healthcheck interval is specified for a service, applies the `seconds` function to convert this interval into seconds and assigns the value to the `periodSeconds` attribute.
```yaml
{{ if $service.healthcheck.interval }}
periodSeconds: {{ $service.healthcheck.interval | seconds }}{{ end }}
{{ end }}
```
## Customization
As Kubernetes is a versatile platform, there are many ways
to map Compose concepts into Kubernetes resource definitions. Compose
Bridge lets you customize the transformation to match your own infrastructure
decisions and preferences, with various level of flexibility and effort.
### Modify the default templates
You can extract templates used by the default transformation `docker/compose-bridge-kubernetes`,
by running `compose-bridge transformations create --from docker/compose-bridge-kubernetes my-template`
and adjusting the templates to match your needs.
The templates are extracted into a directory named after your template name, in this case `my-template`.
It includes a Dockerfile that lets you create your own image to distribute your template, as well as a directory containing the templating files.
You are free to edit the existing files, delete them, or [add new ones](#add-your-own-templates) to subsequently generate Kubernetes manifests that meet your needs.
You can then use the generated Dockerfile to package your changes into a new transformation image, which you can then use with Compose Bridge:
```console
$ docker build --tag mycompany/transform --push .
```
You can then use your transformation as a replacement:
```console
$ compose-bridge convert --transformations mycompany/transform
```