From dbd1d5016dea88da656bfd8deb78079465b87b45 Mon Sep 17 00:00:00 2001 From: Atharva Mulmuley Date: Tue, 11 May 2021 17:35:56 +0530 Subject: [PATCH] readme changes --- .github/workflows/main.yml | 2 +- README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b113be7c..d45d9b08 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: - uses: atharvamulmuley/k8s-set-context@cluster-connect-2 with: - method: 'service-principal' + method: 'service-account' cluster-type: 'arc' cluster-name: arcaction resource-group: atharvatest2 diff --git a/README.md b/README.md index 2a338fd8..ebbe4596 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,17 @@ This action can be used to set cluster context before other actions like [`azure/k8s-deploy`](https://github.com/Azure/k8s-deploy/tree/master), [`azure/k8s-create-secret`](https://github.com/Azure/k8s-create-secret/tree/master) or any kubectl commands (in script) can be run subsequently in the workflow. -There are two approaches for specifying the deployment target: +It is a requirement to use [`azure/login`](https://github.com/Azure/login/tree/master) in your workflow before using this action. + +There are three approaches for specifying the deployment target: - Kubeconfig file provided as input to the action - Service account approach where the secret associated with the service account is provided as input to the action - Service principal approach(only applicable for arc cluster) where service principal provided with 'creds' is used as input to action -If inputs related to both these approaches are provided, kubeconfig approach related inputs are given precedence. +If inputs related to all these approaches are provided, kubeconfig approach related inputs are given precedence. -In both these approaches it is recommended to store these contents (kubeconfig file content or secret content) in a [secret](https://developer.github.com/actions/managing-workflows/storing-secrets/) which could be referenced later in the action. +In all these approaches it is recommended to store these contents (kubeconfig file content or secret content) in a [secret](https://developer.github.com/actions/managing-workflows/storing-secrets/) which could be referenced later in the action. ## Action inputs @@ -131,7 +133,6 @@ kubectl get secret -n -o yaml with: method: service-account cluster-type: 'arc' - creds: '${{ secrets.AZURE_CREDS }}' cluster-name: resource-group: token: '${{ secrets.SA_TOKEN }}' @@ -143,9 +144,8 @@ kubectl get secret -n -o yaml ```yaml - uses: azure/k8s-set-context@v1 with: - method: spn + method: service-principal cluster-type: 'arc' - creds: '${{ secrets.AZURE_CREDS }}' cluster-name: resource-group: id: setcontext