mirror of
https://github.com/Azure/k8s-set-context
synced 2025-09-23 03:58:23 +00:00

Some checks failed
* encoding input variable added * encoding input variable added * encoding input variable added * corrected unit tests * corrected unit tests * prettier edits * working on tests * working on tests * working on tests * minor edits * minor edits * better logic structure * added tests for edge cases * edited to enum
43 lines
1.6 KiB
YAML
43 lines
1.6 KiB
YAML
name: 'Kubernetes Set Context'
|
|
description: 'Set the context of a target Kubernetes cluster and export the kubeconfig which is used by subsequent actions'
|
|
inputs:
|
|
# Please ensure you have used azure/login in the workflow before this action
|
|
cluster-type:
|
|
description: 'Acceptable values: generic or arc'
|
|
required: true
|
|
default: 'generic'
|
|
method:
|
|
description: 'Acceptable values: kubeconfig or service-account or service-principal'
|
|
required: true
|
|
default: 'kubeconfig'
|
|
kubeconfig:
|
|
description: 'Contents of kubeconfig file'
|
|
required: false
|
|
kubeconfig-encoding:
|
|
description: 'Encoding of the kubeconfig input. Accepts "plaintext" (default) or "base64".'
|
|
required: false
|
|
default: 'plaintext'
|
|
context:
|
|
description: 'If your kubeconfig has multiple contexts, use this field to use a specific context, otherwise the default one would be chosen'
|
|
required: false
|
|
k8s-url:
|
|
description: 'Cluster Url'
|
|
required: false
|
|
k8s-secret:
|
|
description: 'Service account secret (run kubectl get serviceaccounts <service-account-name> -o yaml and copy the service-account-secret-name)'
|
|
required: false
|
|
token:
|
|
description: 'Token extracted from the secret of service account (should be base 64 decoded)'
|
|
required: false
|
|
resource-group:
|
|
description: 'Azure resource group name'
|
|
required: false
|
|
cluster-name:
|
|
description: 'Azure connected cluster name'
|
|
required: false
|
|
|
|
branding:
|
|
color: 'blue'
|
|
runs:
|
|
using: 'node20'
|
|
main: 'lib/index.js'
|