Skip to content

Commit d5fae48

Browse files
author
Konstantinos Livieratos
authored
Merge pull request #34 from koslib/features/security-upgrades
Features/security-upgrades
2 parents 96645bc + 51b63ed commit d5fae48

2 files changed

Lines changed: 13 additions & 21 deletions

File tree

README.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,27 @@ on:
3737
jobs:
3838
deploy:
3939
runs-on: ubuntu-latest
40+
env:
41+
AWS_REGION: us-east-1
42+
CLUSTER_NAME: my-staging
4043
steps:
4144
- uses: actions/checkout@v2
4245

4346
- name: AWS Credentials
4447
uses: aws-actions/configure-aws-credentials@v1
4548
with:
46-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
47-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
48-
aws-region: us-east-1
49+
role-to-assume: arn:aws:iam::<your account id>:role/github-actions
50+
role-session-name: ci-run-${{ github.run_id }}
51+
aws-region: ${{ env.AWS_REGION }}
52+
53+
- name: kubeconfing
54+
run: aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.AWS_REGION }}
4955

5056
- name: helm deploy
5157
uses: koslib/helm-eks-action@master
52-
env:
53-
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
5458
with:
5559
plugins: "https://github.com/jkroepke/helm-secrets" # optional
56-
command: helm upgrade <release name> --install --wait <chart> -f <path to values.yaml>
60+
command: helm secrets upgrade <release name> --install --wait <chart> -f <path to values.yaml>
5761
```
5862
5963
# Response
@@ -75,20 +79,12 @@ Use the output of your command in later steps
7579

7680
```
7781

78-
# Secrets
79-
80-
Create a GitHub Secret for each of the following values:
82+
# Accessing your cluster
8183

82-
* `KUBE_CONFIG_DATA`
83-
Your kube config file in base64-encrypted form. You can do that with
84-
85-
```
86-
cat $HOME/.kube/config | base64
87-
```
84+
> Breaking change from v2.x and onwards
8885
89-
* `AWS_ACCESS_KEY_ID`
86+
From version v2.x and onwards, this action does not require any kube-config data set as a secret to connect to the repo. Instead, by authenticating with your AWS account, it automatically generates a kube-config file for your cluster which is then used to execute any `helm` commands.
9087

91-
* `AWS_SECRET_ACCESS_KEY`
9288

9389
# Contributions
9490

dockerhub/entrypoint.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
set -e
44

5-
echo ${KUBE_CONFIG_DATA} | base64 -d > kubeconfig
6-
export KUBECONFIG="${PWD}/kubeconfig"
7-
chmod 600 ${PWD}/kubeconfig
8-
95
if [[ -n "${INPUT_PLUGINS// /}" ]]
106
then
117
plugins=$(echo $INPUT_PLUGINS | tr ",")

0 commit comments

Comments
 (0)