Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Upgrade K8s auth API due to deprecation #646

Merged
merged 1 commit into from
Jun 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/e2e-parallel-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- example_path: examples/node-groups/windows-node-groups
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup backend
# Un-comment remote backend for use in workflow
Expand All @@ -57,7 +57,7 @@ jobs:
role-session-name: GithubActions-Session

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-parallel-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- example_path: examples/node-groups/windows-node-groups
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup backend
# Un-comment remote backend for use in workflow
Expand All @@ -57,7 +57,7 @@ jobs:
role-session-name: GithubActions-Session

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.0

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-terratest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.17

Expand All @@ -35,7 +35,7 @@ jobs:
role-session-name: GithubActions-Session

- name: Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.0
terraform_wrapper: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Check Markdown links

on:
pull_request:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change from PR to push - glad you asked!

If you add new docs and new link, your PR will fail - see #407

The link won't be live and available to test properly until after merging and the GH pages are live. We also might want to bake this into the gh-page deploy pipeline and add a badge or something to ensure links are all good on main

push:
branches:
- main
paths:
- "**/*.md"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/plan-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
# Be careful not to change this to explicit checkout from PR ref/code, as below we run a python code that may change from the PR code.
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get Terraform directories for evaluation
id: dirs
Expand All @@ -50,13 +50,13 @@ jobs:
steps:
- name: checkout-merge
if: "contains(github.event_name, 'pull_request')"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge

- name: checkout
if: "!contains(github.event_name, 'pull_request')"
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -67,7 +67,7 @@ jobs:
role-session-name: GithubActions-Session

- name: Terraform Job
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.0

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ jobs:
outputs:
directories: ${{ steps.dirs.outputs.directories }}
steps:
- run: aws --version
Copy link
Contributor Author

@bryantbiggs bryantbiggs Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this jives with the findings - looks like GitHub updated the runners to use the latest awscli which means the aws eks update-kubeconfig --name ... is going to pull v1beta1

aws-cli/2.7.7 Python/3.9.11 Linux/5.13.0-1029-azure exe/x86_64.ubuntu.20 prompt/off

Ref: https://github.com/aws-ia/terraform-aws-eks-blueprints/runs/6942642586?check_suite_focus=true

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get root directories
id: dirs
Expand All @@ -36,7 +37,7 @@ jobs:
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Config Terraform plugin cache
run: mkdir --parents ${{ env.TERRAFORM_DOCS_VERSION }}
Expand Down Expand Up @@ -76,7 +77,7 @@ jobs:
needs: collectInputs
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand Down
4 changes: 2 additions & 2 deletions examples/analytics/emr-on-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/analytics/spark-k8s-operator/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/aws-efs-csi-driver/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/ci-cd/gitlab-ci-cd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -24,7 +24,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/complete-kubernetes-addons/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
6 changes: 3 additions & 3 deletions examples/crossplane/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -35,7 +35,7 @@ provider "kubectl" {
load_config_file = false

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/eks-cluster-with-external-dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/eks-cluster-with-new-vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/fargate-serverless/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
2 changes: 1 addition & 1 deletion examples/fully-private-eks-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/game-tech/agones-game-controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/gitops/argocd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/ingress-controllers/nginx/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
4 changes: 2 additions & 2 deletions examples/ipv6-eks-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand All @@ -20,7 +20,7 @@ provider "helm" {
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1alpha1"
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks_blueprints.eks_cluster_id]
Expand Down
Loading