Skip to content

Commit 6479035

Browse files
committed
OSDOCS-17704 updated create-only mode
1 parent fdbf483 commit 6479035

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

modules/zero-trust-manager-pause-reconciliation.adoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="zero-trust-manager-pause-reconciliation_{context}"]
7+
= Pausing Operator reconciliation
78

8-
= Pausing Operator reconciliation by annotation
9+
[role="_abstract"]
10+
Pause reconciliation of the `SpireServer` by enabling `create-only` mode. This setting prevents the Operator from automatically reverting your manual changes to the desired state. You can enable this mode by updating the subscription object.
911

10-
Reconciliation by annotation supports the `SpireServer`, `SpireAgent`, `SpiffeCSIDriver`, `SpireOIDCDiscoveryProvider`, and the `ZeroTrustWorkloadIdentityManager` custom resources. You can pause the reconciliation process by adding an annotation.
12+
[IMPORTANT]
13+
====
14+
When `create-only` mode is disabled, the Operator overwrites the resources if any conflicts exist.
15+
====
1116

1217
.Prerequisites
1318

@@ -17,11 +22,11 @@ Reconciliation by annotation supports the `SpireServer`, `SpireAgent`, `SpiffeCS
1722
1823
.Procedure
1924

20-
* To pause reconciling the `SpireServer` custom resource, add the `create-only` annotation to the named `cluster` by running the following command:
25+
* To pause reconciling the `SpireServer`, add the environment variable `CREATE_ONLY_MODE`: `true` in the subscription object by running the following command:
2126
+
2227
[source,terminal]
2328
----
24-
$ oc annotate SpireServer cluster -n zero-trust-workload-identity-manager ztwim.openshift.io/create-only=true
29+
$ oc -n $OPERATOR_NAMESPACE patch subscription openshift-zero-trust-workload-identity-manager --type='merge' -p '{"spec":{"config":{"env":[{"name":"CREATE_ONLY_MODE","value":"true"}]}}}'
2530
----
2631
2732
.Verification
@@ -44,3 +49,8 @@ status:
4449
type: CreateOnlyMode
4550
----
4651

52+
[IMPORTANT]
53+
====
54+
The Operator updates the upgradeable condition to `false` in the `operatorCondition` resource. You might not be able to upgrade the Operator when in `create-only` mode.
55+
====
56+

modules/zero-trust-manager-restart-reconciliation.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77

88
= Resuming Operator reconciliation by annotation
99

10+
[role="_abstract"]
11+
Restart reconciliation of the `SpireServer` by disabling `create-only` mode. This helps to ensure that the `SpireServer` resource works correctly when you restart the controller. You can diable this mode by updating the subscription object.
12+
1013
.Procedure
1114

1215
Follow these steps to restart the reconciliation process:
1316

14-
. Run the `oc annotate` command, adding a hyphen (`-`) at the end of the annotation name. This removes the annotation from the cluster resource.
17+
. To restart reconciling the `SpireServer`, add the environment variable `CREATE_ONLY_MODE`: `false` in the subscription object by running the following command:
1518
+
1619
[source,terminal]
1720
----
18-
$ oc annotate SpireServer cluster -n zero-trust-workload-identity-manager ztwim.openshift.io/create-only-
21+
$ oc -n $OPERATOR_NAMESPACE patch subscription openshift-zero-trust-workload-identity-manager --type='merge' -p '{"spec":{"config":{"env":[{"name":"CREATE_ONLY_MODE","value":"false"}]}}}'
1922
----
2023

2124
. Restart the controller by running the following command:

security/zero_trust_workload_identity_manager/zero-trust-manager-reconciliation.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
By enabling the `create-only` mode, you can pause the Operator reconciliation, which allows you to perform manual configurations or debug without the controller overwriting your changes. This is done by annotating the API resources which are managed by the Operator. The following scenarios are examples of when the `create-only` mode might be of use:
9+
By enabling the `create-only` mode, you can pause the Operator reconciliation, which allows you to perform manual configurations or debug without the controller overwriting your changes. This is done by setting the environment variable in the subscription object.
10+
11+
The following scenarios are examples of when the `create-only` mode might be of use:
1012

1113
**Manual Customization Required**: You need to customize operator-managed resources (ConfigMaps, Deployments, DaemonSets, etc.) with specific configurations that differ from the operator's defaults
1214

0 commit comments

Comments
 (0)