Skip to content

Commit d0229fe

Browse files
docs: Add docs for Argo Workflow controller-instanceid label (#290) (#292)
* docs: Add docs for Argo Workflow controller-instanceid label (#290) - Added a section to explain the requirement of the `workflows.argoproj.io/controller-instanceid` label in the Workflow YAML. - Included an example showing where to add the label. - Explained how to retrieve the instanceID value from the workflow-controller-configmap. Signed-off-by: Thiha Min Thant <[email protected]>
1 parent d25b7fc commit d0229fe

File tree

4 files changed

+84
-22
lines changed

4 files changed

+84
-22
lines changed

website/docs/faq.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,30 @@ To configure a git repo the user must provide the Git URL of the repository and
7070

7171
Once GitOps is enabled, any new chaos experiments created will be stored in the configured repo in the path `litmus/<project-id>/<chaos-experiment-name>.yaml`.
7272

73+
### Why is my Argo Workflow not being picked up by the Workflow controller upon applying it manually?
74+
75+
If your Argo Workflow is not being picked up by the Workflow controller after applying it, you may be missing the `workflows.argoproj.io/controller-instanceid` label in your Workflow manifest. This label is required for the Workflow controller to reconcile the Workflow upon its creation.
76+
77+
To fix this, ensure the following label is added under `metadata.labels` field in the Workflow manifest:
78+
79+
```yaml
80+
apiVersion: argoproj.io/v1alpha1
81+
kind: Workflow
82+
metadata:
83+
labels:
84+
workflows.argoproj.io/controller-instanceid: <instanceID>
85+
```
86+
87+
The `instanceID` value can be found in the `workflow-controller-configmap`. Here’s how to retrieve it:
88+
89+
```shell
90+
kubectl get configmap workflow-controller-configmap -n <namespace> -o yaml
91+
```
92+
93+
Look for the `instanceID` key in the configmap and use that value in your Workflow manifest.
94+
95+
Without this label, the Workflow controller will not be able to reconcile the Workflow.
96+
7397
## Litmusctl
7498

7599
### Does Litmusctl support actions that are currently performed from the portal dashboard?

website/docs/user-guides/construct-experiment.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,24 @@ Here, the template with the name `custom-chaos` will be executed first.
6565
4. **Artifacts** : Artifacts are defined as the files saved by the containers in each step.
6666

6767
```yaml
68-
- name: install-chaos-experiments
69-
inputs:
70-
artifacts:
71-
- name: pod-delete
72-
path: /tmp/pod-delete.yaml
73-
raw:
74-
data: >
75-
apiVersion: litmuschaos.io/v1alpha1
76-
77-
description:
78-
message: |...
68+
- name: install-chaos-experiments
69+
inputs:
70+
artifacts:
71+
- name: pod-delete
72+
path: /tmp/pod-delete.yaml
73+
raw:
74+
data: >
75+
apiVersion: litmuschaos.io/v1alpha1
76+
77+
description:
78+
message: |...
7979
```
8080

81+
### Ensuring Your Workflow is Recognized by the Argo Workflow Controller
82+
83+
When applying a Workflow manually without ChaosCenter, it's crucial to include the `workflows.argoproj.io/controller-instanceid` label in the manifest. This label helps Argo Workflow controller identify and reconcile the Workflow upon its creation.
84+
The instanceID value can be found in the `workflow-controller-configmap` under the instanceID key.
85+
8186
Once the chaos experiment is constructed, it should look like this:
8287

8388
```yaml
@@ -86,6 +91,8 @@ kind: Workflow
8691
metadata:
8792
name: pod-delete-experiment
8893
namespace: litmus
94+
labels:
95+
workflows.argoproj.io/controller-instanceid: 86a4f130-d99b-4e91-b34b-8f9eee22cb63
8996
spec:
9097
arguments:
9198
parameters:

website/versioned_docs/version-3.10.0/faq.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,30 @@ To configure a git repo the user must provide the Git URL of the repository and
7070

7171
Once GitOps is enabled, any new chaos experiments created will be stored in the configured repo in the path `litmus/<project-id>/<chaos-experiment-name>.yaml`.
7272

73+
### Why is my Argo Workflow not being picked up by the Workflow controller upon applying it manually?
74+
75+
If your Argo Workflow is not being picked up by the Workflow controller after applying it, you may be missing the `workflows.argoproj.io/controller-instanceid` label in your Workflow manifest. This label is required for the Workflow controller to reconcile the Workflow upon its creation.
76+
77+
To fix this, ensure the following label is added under `metadata.labels` field in the Workflow manifest:
78+
79+
```yaml
80+
apiVersion: argoproj.io/v1alpha1
81+
kind: Workflow
82+
metadata:
83+
labels:
84+
workflows.argoproj.io/controller-instanceid: <instanceID>
85+
```
86+
87+
The `instanceID` value can be found in the `workflow-controller-configmap`. Here’s how to retrieve it:
88+
89+
```shell
90+
kubectl get configmap workflow-controller-configmap -n <namespace> -o yaml
91+
```
92+
93+
Look for the `instanceID` key in the configmap and use that value in your Workflow manifest.
94+
95+
Without this label, the Workflow controller will not be able to reconcile the Workflow.
96+
7397
## Litmusctl
7498

7599
### Does Litmusctl support actions that are currently performed from the portal dashboard?

website/versioned_docs/version-3.10.0/user-guides/construct-experiment.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,24 @@ Here, the template with the name `custom-chaos` will be executed first.
6565
4. **Artifacts** : Artifacts are defined as the files saved by the containers in each step.
6666

6767
```yaml
68-
- name: install-chaos-experiments
69-
inputs:
70-
artifacts:
71-
- name: pod-delete
72-
path: /tmp/pod-delete.yaml
73-
raw:
74-
data: >
75-
apiVersion: litmuschaos.io/v1alpha1
76-
77-
description:
78-
message: |...
68+
- name: install-chaos-experiments
69+
inputs:
70+
artifacts:
71+
- name: pod-delete
72+
path: /tmp/pod-delete.yaml
73+
raw:
74+
data: >
75+
apiVersion: litmuschaos.io/v1alpha1
76+
77+
description:
78+
message: |...
7979
```
8080

81+
### Ensuring Your Workflow is Recognized by the Argo Workflow Controller
82+
83+
When applying a Workflow manually without ChaosCenter, it's crucial to include the `workflows.argoproj.io/controller-instanceid` label in the manifest. This label helps Argo Workflow controller identify and reconcile the Workflow upon its creation.
84+
The instanceID value can be found in the `workflow-controller-configmap` under the instanceID key.
85+
8186
Once the chaos scenario is constructed, it should look like this:
8287

8388
```yaml
@@ -86,6 +91,8 @@ kind: Workflow
8691
metadata:
8792
name: pod-delete-experiment
8893
namespace: litmus
94+
labels:
95+
workflows.argoproj.io/controller-instanceid: 86a4f130-d99b-4e91-b34b-8f9eee22cb63
8996
spec:
9097
arguments:
9198
parameters:

0 commit comments

Comments
 (0)