Skip to content

GitHub Action for interacting with kubectl-argo-rollouts (k8s)

License

Notifications You must be signed in to change notification settings

atelierdesoftware/kubectl-argo-rollouts

 
 

Repository files navigation

Kubectl argo rollouts

Preview

Tests

GitHub last commit (branch) LICENSE LICENSE 996.icu

GitHub Action for interacting with kubectl-argo-rollouts (argo-rollouts)

Usage

To use kubectl-argo-rollouts put this step into your workflow:

Authorization with config file

- uses: starubiquitous/kubectl-argo-rollouts@master
  env:
    KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
  with:
    args: get rollout

Environment variables

All these variables need to authorize to kubernetes cluster.
I recommend using secrets for this.

KUBECONFIG file

First options its to use kubeconfig file.

For this method KUBE_CONFIG required.
You can find it: cat $HOME/.kube/config | base64 .

Optionally you can switch the context (the cluster) if you have few in kubeconfig file. Passing specific context to KUBE_CONTEXT. To see the list of available contexts do: kubectl config get-contexts.

Variable Type
KUBE_CONFIG string (base64)
KUBE_CONTEXT string

KUBECONFIG file

Another way to authenticate in the cluster is HTTP basic auth.

For this you need to pass:

  • host (IP only, without protocol)
  • username
  • password
  • cluster CA certificate
Variable Type
KUBE_HOST string
KUBE_USERNAME string
KUBE_PASSWORD string
KUBE_CERTIFICATE string

Example

name: Get rollout
on: [ push ]

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - uses: starubiquitous/kubectl-argo-rollouts@main
        env:
          KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
        with:
          args: get rollout

Versions

If you need a specific version of kubectl, make a PR with a specific version number. After accepting PR the new release will be created.
To use a specific version of kubectl use:

- uses: starubiquitous/kubectl-argo-rollouts@main
  env:
    KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
  with:
    args: get rollout

License

The code in this repository, unless otherwise noted, is under the terms of both the Anti 996 License and the Apache License (Version 2.0).

About

GitHub Action for interacting with kubectl-argo-rollouts (k8s)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 76.3%
  • Dockerfile 23.7%