google-github-actions / get-gke-credentials

A GitHub Action that configure authentication to a GKE cluster.
https://cloud.google.com/gke
Apache License 2.0
100 stars 41 forks source link

Fix kubeconfig permissions #301

Closed vineethvijay7 closed 2 months ago

vineethvijay7 commented 2 months ago

ISSUE

Right now the default kubeconfig file generated has permissions which makes this warning:

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/runner/work/<>/gha-kubeconfig-15623d46f9e36f37

It could include the fixes mentioned over here : https://github.com/helm/helm/issues/9115

Expected behavior

No response

Observed behavior

No response

Action YAML

     - name: Authenticate to GCP
        id: 'auth'
        uses: 'google-github-actions/auth@v2'
        with:
          credentials_json: '${{ env.GCP_TF_SA_CREDS }}'

      - name: Get GKE k8s creds
        id: 'get-credentials'
        uses: 'google-github-actions/get-gke-credentials@v2'
        with:
          cluster_name: '${{ env.GCP_TF_CLUSTER_NAME }}'
          location: '${{ env.GCP_TF_LOCATION }}'
          project_id: '${{ env.GCP_TF_PROJECT_ID }}'

Log output

No response

Additional information

No response

vineethvijay7 commented 1 month ago

sweet, thanks