Skip to main content
Timoni allows changing the default apply behaviour of Kubernetes resources with the action.timoni.sh annotations.

Annotations

Force Apply

To recreate immutable resources such as Kubernetes Jobs, these resources can be annotated with action.timoni.sh/force: "enabled". Example:

One-Off Apply

To apply resources only if they don’t exist on the cluster, these resources can be annotated with action.timoni.sh/one-off: "enabled". Example:

Disable Pruning

To prevent Timoni’s garbage collector from deleting certain resources such as Kubernetes Persistent Volume Claims, these resources can be annotated with action.timoni.sh/prune: "disabled". Example:

Disable Waiting

To prevent Timoni’s readiness check from waiting for certain resources such as Kubernetes Persistent Volumes, these resources can be annotated with action.timoni.sh/wait: "disabled". Example:

Waiting for Custom Resources

For custom resources, a readiness evaluation can be defined with custom health checks inside timoni.cue in module root. Example:
The above definition tells Timoni to look for the Ready=True condition in all kinds under the cert-manager.io group (ClusterIssuer, Issuer, Certificate) and to look for Synced=True for the trust-manager kinds (ClusterBundle, Bundle).

Taking Ownership of Existing Resources

When a module’s resources already exist on the cluster, Timoni takes ownership of them during the server-side apply. Objects created with kubectl apply or helm install (both Helm v3 and Helm v4 releases) become managed by Timoni: the field ownership is transferred from the kubectl and helm field managers to timoni before the objects are applied, and the fields set with these tools are replaced with the module’s desired state. When taking ownership, Timoni removes the following metadata from the objects:
  • the kubectl.kubernetes.io/last-applied-configuration annotation
  • the meta.helm.sh/release-name annotation
  • the meta.helm.sh/release-namespace annotation
This allows migrating an app from Helm to Timoni by installing the module instance over the existing Helm release, then deleting the Helm release secrets without uninstalling the app.