Skip to content

Commit 26e336b

Browse files
docs: Document the annotations "restarter.stackable.tech/ignore-configmap.*" and "restarter.stackable.tech/ignore-secret.*"
1 parent faf1a73 commit 26e336b

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

docs/modules/commons-operator/pages/restarter.adoc

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ Label:: `restarter.stackable.tech/enabled`
3131
The operator can restart StatefulSets when any referenced configuration object (ConfigMap or Secret) changes.
3232
To enable this, set the `restarter.stackable.tech/enabled` label on the StatefulSet to `true`.
3333

34-
Annotation:: `restarter.stackable.tech/ignore`
34+
Annotation:: `restarter.stackable.tech/ignore-configmap.*`
35+
Annotation:: `restarter.stackable.tech/ignore-secret.*`
3536

36-
If a resource is only used for initialization or is hot-reloaded and should not trigger a restart, add the annotation `restarter.stackable.tech/ignore: "true"` to the corresponding ConfigMap or Secret:
37+
These annotations can be added if the restarter is enabled on a StatefulSet, but some ConfigMaps or Secrets should be excluded from triggering a restart. `*` can be replaced with any value and is only used to make the annotation key unique.
3738

3839
[source,yaml]
3940
----
@@ -44,31 +45,46 @@ metadata:
4445
name: statefulset-with-enabled-restarter
4546
labels:
4647
restarter.stackable.tech/enabled: "true"
48+
annotations:
49+
restarter.stackable.tech/ignore-configmap.0: hot-reloaded-configmap
50+
restarter.stackable.tech/ignore-secret.0: hot-reloaded-secret
4751
spec:
4852
template:
4953
spec:
5054
volumes:
51-
- name: hot-reloaded-configmap
55+
- name: configuration
5256
configMap:
5357
name: hot-reloaded-configmap
54-
- name: hot-reloaded-secret
58+
- name: credentials
5559
secret:
5660
secretName: hot-reloaded-secret
5761
...
62+
----
63+
64+
== ConfigMap/Secret
65+
66+
Label:: `restarter.stackable.tech/ignore`
67+
68+
If a ConfigMap or Secret is only used for initializing a StatefulSet or contains data which can be hot-reloaded, add the label `restarter.stackable.tech/ignore: "true"` to avoid unnecessary restarts of the StatefulSet pods:
69+
70+
[source,yaml]
71+
----
5872
---
5973
apiVersion: v1
6074
kind: ConfigMap
6175
metadata:
6276
name: hot-reloaded-configmap
63-
annotations:
77+
labels:
6478
restarter.stackable.tech/ignore: "true"
6579
...
6680
---
6781
apiVersion: v1
6882
kind: Secret
6983
metadata:
7084
name: hot-reloaded-secret
71-
annotations:
85+
labels:
7286
restarter.stackable.tech/ignore: "true"
7387
...
7488
----
89+
90+
Unlike the StatefulSet annotations `restarter.stackable.tech/ignore-configmap.\*` and `restarter.stackable.tech/ignore-secret.*`, this label affects every StatefulSet that references the labeled ConfigMaps or Secrets.

0 commit comments

Comments
 (0)