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

Use --profile instead of AWS_PROFILE for kubeconfig #1484

Merged
merged 7 commits into from
Nov 14, 2024
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
25 changes: 0 additions & 25 deletions .github/workflows/eks-cron.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
env:
ALT_AWS_ACCESS_KEY_ID: ${{ secrets.ALT_AWS_ACCESS_KEY_ID }}
ALT_AWS_SECRET_ACCESS_KEY: ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }}
ALT_AWS_PROFILE: ${{ secrets.ALT_AWS_PROFILE }}
AWS_REGION: us-west-2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOLANGCI_LINT_VERSION: v1.61.0
Expand Down Expand Up @@ -256,12 +255,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -367,12 +360,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -478,12 +465,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -573,12 +554,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/eks-record.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
env:
ALT_AWS_ACCESS_KEY_ID: ${{ secrets.ALT_AWS_ACCESS_KEY_ID }}
ALT_AWS_SECRET_ACCESS_KEY: ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }}
ALT_AWS_PROFILE: ${{ secrets.ALT_AWS_PROFILE }}
AWS_REGION: us-west-2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -209,12 +208,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
env:
ALT_AWS_ACCESS_KEY_ID: ${{ secrets.ALT_AWS_ACCESS_KEY_ID }}
ALT_AWS_SECRET_ACCESS_KEY: ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }}
ALT_AWS_PROFILE: ${{ secrets.ALT_AWS_PROFILE }}
AWS_REGION: us-west-2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOLANGCI_LINT_VERSION: v1.61.0
Expand Down Expand Up @@ -272,12 +271,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -383,12 +376,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -495,12 +482,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -590,12 +571,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
env:
ALT_AWS_ACCESS_KEY_ID: ${{ secrets.ALT_AWS_ACCESS_KEY_ID }}
ALT_AWS_SECRET_ACCESS_KEY: ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }}
ALT_AWS_PROFILE: ${{ secrets.ALT_AWS_PROFILE }}
AWS_REGION: us-west-2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOLANGCI_LINT_VERSION: v1.61.0
Expand Down Expand Up @@ -264,12 +263,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -375,12 +368,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -487,12 +474,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -582,12 +563,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
env:
ALT_AWS_ACCESS_KEY_ID: ${{ secrets.ALT_AWS_ACCESS_KEY_ID }}
ALT_AWS_SECRET_ACCESS_KEY: ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }}
ALT_AWS_PROFILE: ${{ secrets.ALT_AWS_PROFILE }}
AWS_REGION: us-west-2
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
GOLANGCI_LINT_VERSION: v1.61.0
Expand Down Expand Up @@ -298,12 +297,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Clear GitHub Actions Ubuntu runner disk space
uses: jlumbroso/[email protected]
with:
Expand Down Expand Up @@ -400,12 +393,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -512,12 +499,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -625,12 +606,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down Expand Up @@ -721,12 +696,6 @@ jobs:
role-duration-seconds: 7200
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Configure AWS CLI
run: |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }}
- name: Link nodejs binary for testing
run: |
cd ${{ github.workspace }}/bin
Expand Down
12 changes: 7 additions & 5 deletions examples/aws-profile-py/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@

project_name = pulumi.get_project()

# For CI testing only: used to set profileName to alternate AWS_PROFILE envvar.
if not os.getenv("ALT_AWS_PROFILE"):
raise Exception("ALT_AWS_PROFILE must be set")
if not os.getenv("AWS_REGION"):
raise Exception("AWS_REGION must be set")

# AWS named profile to use.
profile_name = os.getenv("ALT_AWS_PROFILE")
profile_name = "aws-profile-py"

# Create an AWS provider instance using the named profile creds
# and current region.
aws_provider = aws.Provider("aws-provider",
profile=profile_name,
region=aws.get_region().name)
region=os.getenv("AWS_REGION"))

# Define the AWS provider credential opts to configure the cluster's
# kubeconfig auth.
Expand All @@ -25,6 +24,9 @@
# Create the cluster using the AWS provider and credential opts.
cluster = eks.Cluster(project_name,
provider_credential_opts=kubeconfig_opts,
coredns_addon_options=eks.CoreDnsAddonOptionsArgs(
enabled=False, # Speed up the test.
),
opts=pulumi.ResourceOptions(provider=aws_provider))

# Export the cluster kubeconfig.
Expand Down
2 changes: 1 addition & 1 deletion examples/aws-profile-py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pulumi>=3.0.0,<4.0.0
pulumi-aws>=6.0.0,<7.0.0
pulumi-eks>=2.0.0,<3.0.0
pulumi-eks>=3.0.0,<4.0.0
5 changes: 2 additions & 3 deletions examples/aws-profile/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# examples/cluster

Creates two EKS clusters in the default VPC with two t3.medium nodes.
- One cluster uses the default configuration.
- One cluster uses a non-default configuration.
Creates an EKS cluster in the default VPC with two t3.medium nodes, using a
non-default AWS profile for credentials.
43 changes: 30 additions & 13 deletions examples/aws-profile/index.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,59 @@
import * as aws from "@pulumi/aws";
import * as eks from "@pulumi/eks";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
import * as process from "process";

const projectName = pulumi.getProject();

// For CI testing only: used to set profileName to alternate AWS_PROFILE envvar.
if (!process.env.ALT_AWS_PROFILE) {
throw new Error("ALT_AWS_PROFILE must be set");
}

if (!process.env.AWS_REGION) {
throw new Error("AWS_REGION must be set");
throw new Error("AWS_REGION must be set");
}

// AWS named profile to use.
const profileName = process.env.ALT_AWS_PROFILE;
const profileName = "aws-profile-node";
// AWS region to use.
const region = pulumi.output(process.env.AWS_REGION as aws.types.enums.Region);

// Create an AWS provider instance using the named profile creds
// and current region.
const awsProvider = new aws.Provider("aws-provider", {
profile: profileName,
region: region,
profile: profileName,
region: region,
});

// Define the AWS provider credential opts to configure the cluster's
// kubeconfig auth.
const kubeconfigOpts: eks.KubeconfigOptions = {profileName: profileName};
const kubeconfigOpts: eks.KubeconfigOptions = { profileName: profileName };

// Create the cluster using the AWS provider and credential opts.
const cluster = new eks.Cluster(`${projectName}`, {
const cluster = new eks.Cluster(
`${projectName}`,
{
providerCredentialOpts: kubeconfigOpts,
}, {provider: awsProvider});
corednsAddonOptions: { enabled: false }, // Speed up the test.
},
{ provider: awsProvider }
);

// Export the cluster kubeconfig.
export const kubeconfig = cluster.kubeconfig;

// Export the cluster kubeconfig with the AWS_PROFILE set.
export const kubeconfigWithProfile = cluster.getKubeconfig({profileName: profileName}).result;
export const kubeconfigWithProfile = cluster.getKubeconfig({
profileName: profileName,
}).result;

const k8sProvider = new k8s.Provider("with-kubeconfig", {
kubeconfig: kubeconfigWithProfile,
});

// Deploy something into the cluster so upgrade tests can check for unexpected
// replacements.
new k8s.core.v1.ConfigMap(
"cm",
{
data: { foo: "bar" },
},
{ provider: k8sProvider }
);
Loading
Loading