diff --git a/website/docs/faq.md b/website/docs/faq.md index 3586151c..8b938e12 100644 --- a/website/docs/faq.md +++ b/website/docs/faq.md @@ -70,6 +70,30 @@ To configure a git repo the user must provide the Git URL of the repository and Once GitOps is enabled, any new chaos experiments created will be stored in the configured repo in the path `litmus//.yaml`. +### Why is my Argo Workflow not being picked up by the Workflow controller upon applying it manually? + +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. + +To fix this, ensure the following label is added under `metadata.labels` field in the Workflow manifest: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Workflow +metadata: + labels: + workflows.argoproj.io/controller-instanceid: +``` + +The `instanceID` value can be found in the `workflow-controller-configmap`. Here’s how to retrieve it: + +```shell +kubectl get configmap workflow-controller-configmap -n -o yaml +``` + +Look for the `instanceID` key in the configmap and use that value in your Workflow manifest. + +Without this label, the Workflow controller will not be able to reconcile the Workflow. + ## Litmusctl ### Does Litmusctl support actions that are currently performed from the portal dashboard? diff --git a/website/docs/user-guides/construct-experiment.md b/website/docs/user-guides/construct-experiment.md index 57e1a6d8..bebbbc99 100644 --- a/website/docs/user-guides/construct-experiment.md +++ b/website/docs/user-guides/construct-experiment.md @@ -65,19 +65,24 @@ Here, the template with the name `custom-chaos` will be executed first. 4. **Artifacts** : Artifacts are defined as the files saved by the containers in each step. ```yaml -- name: install-chaos-experiments - inputs: - artifacts: - - name: pod-delete - path: /tmp/pod-delete.yaml - raw: - data: > - apiVersion: litmuschaos.io/v1alpha1 - - description: - message: |... +- name: install-chaos-experiments + inputs: + artifacts: + - name: pod-delete + path: /tmp/pod-delete.yaml + raw: + data: > + apiVersion: litmuschaos.io/v1alpha1 + + description: + message: |... ``` +### Ensuring Your Workflow is Recognized by the Argo Workflow Controller + +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. +The instanceID value can be found in the `workflow-controller-configmap` under the instanceID key. + Once the chaos experiment is constructed, it should look like this: ```yaml @@ -86,6 +91,8 @@ kind: Workflow metadata: name: pod-delete-experiment namespace: litmus + labels: + workflows.argoproj.io/controller-instanceid: 86a4f130-d99b-4e91-b34b-8f9eee22cb63 spec: arguments: parameters: diff --git a/website/versioned_docs/version-3.10.0/faq.md b/website/versioned_docs/version-3.10.0/faq.md index 3586151c..8b938e12 100644 --- a/website/versioned_docs/version-3.10.0/faq.md +++ b/website/versioned_docs/version-3.10.0/faq.md @@ -70,6 +70,30 @@ To configure a git repo the user must provide the Git URL of the repository and Once GitOps is enabled, any new chaos experiments created will be stored in the configured repo in the path `litmus//.yaml`. +### Why is my Argo Workflow not being picked up by the Workflow controller upon applying it manually? + +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. + +To fix this, ensure the following label is added under `metadata.labels` field in the Workflow manifest: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Workflow +metadata: + labels: + workflows.argoproj.io/controller-instanceid: +``` + +The `instanceID` value can be found in the `workflow-controller-configmap`. Here’s how to retrieve it: + +```shell +kubectl get configmap workflow-controller-configmap -n -o yaml +``` + +Look for the `instanceID` key in the configmap and use that value in your Workflow manifest. + +Without this label, the Workflow controller will not be able to reconcile the Workflow. + ## Litmusctl ### Does Litmusctl support actions that are currently performed from the portal dashboard? diff --git a/website/versioned_docs/version-3.10.0/user-guides/construct-experiment.md b/website/versioned_docs/version-3.10.0/user-guides/construct-experiment.md index e6a14802..071fb2b6 100644 --- a/website/versioned_docs/version-3.10.0/user-guides/construct-experiment.md +++ b/website/versioned_docs/version-3.10.0/user-guides/construct-experiment.md @@ -65,19 +65,24 @@ Here, the template with the name `custom-chaos` will be executed first. 4. **Artifacts** : Artifacts are defined as the files saved by the containers in each step. ```yaml -- name: install-chaos-experiments - inputs: - artifacts: - - name: pod-delete - path: /tmp/pod-delete.yaml - raw: - data: > - apiVersion: litmuschaos.io/v1alpha1 - - description: - message: |... +- name: install-chaos-experiments + inputs: + artifacts: + - name: pod-delete + path: /tmp/pod-delete.yaml + raw: + data: > + apiVersion: litmuschaos.io/v1alpha1 + + description: + message: |... ``` +### Ensuring Your Workflow is Recognized by the Argo Workflow Controller + +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. +The instanceID value can be found in the `workflow-controller-configmap` under the instanceID key. + Once the chaos scenario is constructed, it should look like this: ```yaml @@ -86,6 +91,8 @@ kind: Workflow metadata: name: pod-delete-experiment namespace: litmus + labels: + workflows.argoproj.io/controller-instanceid: 86a4f130-d99b-4e91-b34b-8f9eee22cb63 spec: arguments: parameters: