Manual Resource Configuration
Overview
The ignore-diff
feature lets you make manual changes to Kubernetes resources without the Hydrolix operator reverting them.
Use it when you need to test, debug, or temporarily tune a resource outside the normal configuration.
Ignoring diffs can cause resources to drift from the Hydrolix spec. Use this only when you understand the impact.
How it works
-
Add the
hydrolix.io/ignore-diff=true
annotation to a resource. -
The operator ignores that resource during reconciliation and logs a message:
hkt.k8s.resourcegroup [INFO] Ignoring changes in <resource-type>/<resource-name>. Reason: hydrolix.io/ignore-diff annotation present.
-
When you remove the annotation, the operator resumes control during the next reconciliation and resets the resource to match the spec.
-
Resources without the annotation remain under full operator management.
-
Changes to the
hydrolixcluster.yaml
spec won't apply until you remove the annotation.
Add an annotation
Use kubectl annotate
to add the annotation:
kubectl annotate <resource-type> <resource-name> "hydrolix.io/ignore-diff"="true"
This example adds a ConfigMap named prometheus-cfg
:
kubectl annotate configmap prometheus-cfg "hydrolix.io/ignore-diff"="true"
Remove an annotation
You can remove an annotation in two ways.
Overwrite the value
kubectl annotate <resource-type> <resource-name> "hydrolix.io/ignore-diff"="false" --overwrite
For example:
kubectl annotate configmap prometheus-cfg "hydrolix.io/ignore-diff"="false" --overwrite
Edit the resource
kubectl edit <resource-type> <resource-name>
Related
See Resource tuning for other options, including overcommit and resource pools.
Updated 12 days ago