Skip to content

Commit

Permalink
Merge pull request #1373 from input-output-hk/kubeconfig-improvements
Browse files Browse the repository at this point in the history
chore: remove kubeconfig dependency on ~/.aws/credentials
  • Loading branch information
gytis-ivaskevicius authored Jul 18, 2024
2 parents 16d7d0a + 66a4293 commit 2a46b5d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ source
/.data
/.config
/.local

# Auto generated
.kube
4 changes: 3 additions & 1 deletion nix/local/envs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@

devshell.startup.setup.text = ''
[ -e $PRJ_ROOT/.envrc.local ] && source $PRJ_ROOT/.envrc.local
rm -rf $PRJ_ROOT/.kube
cp -R $PRJ_ROOT/nix/local/kubeconfig $PRJ_ROOT/.kube
chmod 600 $PRJ_ROOT/.kube/*
kubectl config use-context $K8S_USER
kubectl config use-context $K8S_USER --kubeconfig $PRJ_ROOT/.kube/us-east-2
kubectl config use-context $K8S_USER --kubeconfig $PRJ_ROOT/.kube/eu-central-1
chmod 600 $PRJ_ROOT/.kube/*
'';
};
};
Expand Down
16 changes: 4 additions & 12 deletions .kube/eu-central-1 → nix/local/kubeconfig/eu-central-1
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-admin
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: eks-devs
Expand All @@ -62,9 +60,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-devs
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: eks-readonly
Expand All @@ -83,9 +79,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-readonly
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: lace-ci
Expand All @@ -104,8 +98,6 @@ users:
- --role
- arn:aws:iam::926093910549:role/lace-ci
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
16 changes: 4 additions & 12 deletions .kube/us-east-1 → nix/local/kubeconfig/us-east-1
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-admin
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: eks-devs
Expand All @@ -62,9 +60,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-devs
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: eks-readonly
Expand All @@ -83,9 +79,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-readonly
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: lace-ci
Expand All @@ -104,8 +98,6 @@ users:
- --role
- arn:aws:iam::926093910549:role/lace-ci
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
16 changes: 4 additions & 12 deletions .kube/us-east-2 → nix/local/kubeconfig/us-east-2
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-admin
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: eks-devs
Expand All @@ -62,9 +60,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-devs
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: eks-readonly
Expand All @@ -83,9 +79,7 @@ users:
- --role
- arn:aws:iam::926093910549:role/eks-readonly
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
- name: lace-ci
Expand All @@ -104,8 +98,6 @@ users:
- --role
- arn:aws:iam::926093910549:role/lace-ci
command: aws
env:
- name: AWS_PROFILE
value: lw
env: null
interactiveMode: IfAvailable
provideClusterInfo: false

0 comments on commit 2a46b5d

Please sign in to comment.