Skip to content

Commit

Permalink
Merge pull request #7 from garutilorenzo/new_features
Browse files Browse the repository at this point in the history
## New features

* Added EFS for persistent storage via [AWS EFS csi driver](https://github.com/kubernetes-sigs/aws-efs-csi-driver).
* Added the possibility to expose the kubeapi server to the internet. Access is granted only from *my_public_ip_cidr* for security reasons.
* Added Lambda funcion to automatically delete removed nodes from k3s cluster (EC2 spot instances)
* Added *null_resource* to fix Lambda orphan ENI. [Ref.](hashicorp/terraform-provider-aws#10329)

## Minor changes

* Fixed resource tags/names
* Renamed *agent* resources to *worker* resources
* Added SSM Policy to access EC2 from AWS console

## Bug fixes

* Added lifecycle on k3s-workers
* Fix allow_strict security group deletion on apply
  • Loading branch information
garutilorenzo authored Oct 14, 2022
2 parents 0ca7f1b + 22000dc commit 9188307
Show file tree
Hide file tree
Showing 31 changed files with 1,363 additions and 325 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Download kubernetes module
run: pip install --target k3s_cluster/lambda/kube_cleaner_src/ kubernetes

- name: create lambda func zip
run: zip -r ../kube_cleaner.zip .
working-directory: k3s_cluster/lambda/kube_cleaner_src/

- name: Run a Terraform init
uses: docker://hashicorp/terraform:light
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ override.tf.json
terraform.rc

*.json
!docs/*

*Pipfile
*Pipfile.lock

k3s_cluster/lambda/kube_cleaner.zip
k3s_cluster/lambda/kube_cleaner_src/*
!k3s_cluster/lambda/kube_cleaner_src/lambda.py
45 changes: 32 additions & 13 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9188307

Please sign in to comment.