Skip to content

Draft: scripts/k8s-access: setup multiple clusters at once

Ghost User requested to merge k8s-access-single into master

This has different advantages:

  • because there is only one task it's more easy to depend on it

    eg:

    pre_tasks: foo: exec.#Run & {
      $after: pre_tasks.k8s_access
      cmd: ["kubectl", "..."]
      env: KUBECONFIG: pre_tasks.k8s_access.stdout
    }

    This design would allow to build higher level definitions for kubectl, eg:

    #KubectlApply: {
      data: {
          apiVersion: string
          kind: string
          ...
      }
    
      exec.#Run
      $after: pre_tasks.k8s_access
      cmd: ["kubectl", "apply", "-f", "-"]
      stdin: json.Marshal(data)
      env: KUBECONFIG: pre_tasks.k8s_access.stdout
    }
  • no lock handling

  • less tasks to generate

Edited by Ghost User

Merge request reports

Loading