Skip to content

[Question] using plugin VS using resource template #3

@zhuwenxing

Description

@zhuwenxing

Hi, I got there from the chaos mesh monthly meetup.
It is an interesting project, and this is my first time knowing that we can build the plugin for Argo workflow.

Argo workflow + Chaos Mesh is also used in my team, but the way we implement is by using the resource template in Argo workflow directly.

example

    - name: deploy-chaos
      resource:
        action: apply
        manifest: |
          kind: StressChaos
          apiVersion: chaos-mesh.org/v1alpha1
          metadata:
            name: memory-stress-{{workflow.parameters.label-instance}}-{{workflow.parameters.label-component}}
            namespace: default
          spec:
            selector:
              namespaces:
                - default
              labelSelectors:
                app.kubernetes.io/name: milvus
                app.kubernetes.io/instance: {{workflow.parameters.label-instance}}
                app.kubernetes.io/component: {{workflow.parameters.label-component}}
            mode: all
            value: "2"
            stressors:
              memory:
                workers: {{workflow.parameters.memory-workers}}
                size: {{workflow.parameters.memory-size}}
            duration: {{workflow.parameters.chaos-duration}}

I roughly went through the demo and code, It seems that you wrap the manifest into a body, parse it, and then use a client to apply it.
It seems to make things more complicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions