-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-17704 updated create-only mode #104178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,10 +4,15 @@ | |||||
|
|
||||||
| :_mod-docs-content-type: PROCEDURE | ||||||
| [id="zero-trust-manager-pause-reconciliation_{context}"] | ||||||
| = Pausing Operator reconciliation | ||||||
|
|
||||||
| = Pausing Operator reconciliation by annotation | ||||||
| [role="_abstract"] | ||||||
| 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. | ||||||
|
|
||||||
| Reconciliation by annotation supports the `SpireServer`, `SpireAgent`, `SpiffeCSIDriver`, `SpireOIDCDiscoveryProvider`, and the `ZeroTrustWorkloadIdentityManager` custom resources. You can pause the reconciliation process by adding an annotation. | ||||||
| [IMPORTANT] | ||||||
| ==== | ||||||
| When `create-only` mode is disabled, the Operator overwrites the resources if any conflicts exist. | ||||||
| ==== | ||||||
|
|
||||||
| .Prerequisites | ||||||
|
|
||||||
|
|
@@ -17,11 +22,11 @@ Reconciliation by annotation supports the `SpireServer`, `SpireAgent`, `SpiffeCS | |||||
|
|
||||||
| .Procedure | ||||||
|
|
||||||
| * To pause reconciling the `SpireServer` custom resource, add the `create-only` annotation to the named `cluster` by running the following command: | ||||||
| * To pause reconciling the `SpireServer`, add the environment variable `CREATE_ONLY_MODE`: `true` in the subscription object by running the following command: | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
| $ oc annotate SpireServer cluster -n zero-trust-workload-identity-manager ztwim.openshift.io/create-only=true | ||||||
| $ oc -n $OPERATOR_NAMESPACE patch subscription openshift-zero-trust-workload-identity-manager --type='merge' -p '{"spec":{"config":{"env":[{"name":"CREATE_ONLY_MODE","value":"true"}]}}}' | ||||||
| ---- | ||||||
|
|
||||||
| .Verification | ||||||
|
|
@@ -44,3 +49,8 @@ status: | |||||
| type: CreateOnlyMode | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .Verification
$ oc get zerotrustworkloadidentitymanager cluster -o yaml .Example output |
||||||
| ---- | ||||||
|
|
||||||
| [IMPORTANT] | ||||||
| ==== | ||||||
| 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. | ||||||
| ==== | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,15 +7,18 @@ | |||||
|
|
||||||
| = Resuming Operator reconciliation by annotation | ||||||
|
|
||||||
| [role="_abstract"] | ||||||
| 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. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| .Procedure | ||||||
|
|
||||||
| Follow these steps to restart the reconciliation process: | ||||||
|
|
||||||
| . Run the `oc annotate` command, adding a hyphen (`-`) at the end of the annotation name. This removes the annotation from the cluster resource. | ||||||
| . To restart reconciling the `SpireServer`, add the environment variable `CREATE_ONLY_MODE`: `false` in the subscription object by running the following command: | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
| $ oc annotate SpireServer cluster -n zero-trust-workload-identity-manager ztwim.openshift.io/create-only- | ||||||
| $ oc -n $OPERATOR_NAMESPACE patch subscription openshift-zero-trust-workload-identity-manager --type='merge' -p '{"spec":{"config":{"env":[{"name":"CREATE_ONLY_MODE","value":"false"}]}}}' | ||||||
| ---- | ||||||
|
|
||||||
| . Restart the controller by running the following command: | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the retart for the operator deployment. |
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.