Skip to content

Example actions for onDeploy.after.wait #311

@fingermustache

Description

@fingermustache

** Summary**
You can validate many different types of k8s things, jobs, deployments, pod, custom resources, etc. The limit is really the person's knowledge of k8s and their package. Docs providing guidance could be useful.

Example:

- description: Validate GitLab Package
            maxTotalSeconds: 300
            wait:
              cluster:
                kind: <deployment, pods, job, customer resource, etc.>
                name: <name>
                namespace: <namespace>
                condition: <"'{.status.phase}'=Ready", Available, etc.>

Contents

  • onDeploy.after.wait helpful hints
    • This validation can provide automation to ensure your uds package deploys as expected
    • It can provide additional commands needed after deployments
    • The package deloy command will fail if not working as expected.

Note: This is NOT needed for the *.uds.dev Custom Resources. The UDS Operator handles this through Zarf by default - using kstatus standard checks

Examples:

Restart deployment and validation condition: avaliable

actions:
      onDeploy:
        after:
          - cmd: ./zarf tools kubectl -n mattermost rollout restart deployment
            description: Restart Mattermost Deployment so pods cycle on upgrades
          - cmd: ./zarf tools kubectl -n mattermost rollout status deploy
          - description: Mattermost to be Healthy
            wait:
              cluster:
                kind: Deployment
                name: mattermost-enterprise-edition
                namespace: mattermost
                condition: Available

Wait for nodes to be Ready

    actions:
      - cmd: sleep 30
      - wait:
          cluster:
            kind: nodes
            condition: Ready
            name: kubernetes.io/os=linux

Wait for pod to be Ready

        wait:
          cluster:
            kind: Pod
            name: "k8s-app=kube-dns"
            namespace: kube-system
            condition: Ready
``

**Additional context**
Any other context or information about this request can be added here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new contentContent with no existing documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions