-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: implement new development environment (#628)
Replace the multiple bash scripts used to setup the `csi-driver` test environment with Terraform and Make. --------- Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
- Loading branch information
Showing
24 changed files
with
583 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.terraform* | ||
terraform.tfstate | ||
terraform.tfstate.backup | ||
*.auto.tfvars | ||
|
||
files/* | ||
!files/.gitkeep | ||
|
||
.env |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
SHELL = bash | ||
.ONESHELL: | ||
|
||
ENV ?= dev | ||
K3S_CHANNEL ?= stable | ||
|
||
env.auto.tfvars: | ||
@echo 'name = "$(ENV)"' > "$@" | ||
@echo 'hcloud_token = "$(HCLOUD_TOKEN)"' >> "$@" | ||
@echo 'k3s_channel = "$(K3S_CHANNEL)"' >> "$@" | ||
|
||
.terraform: | ||
tofu init | ||
|
||
up: .terraform env.auto.tfvars | ||
tofu apply -auto-approve | ||
$(MAKE) port-forward | ||
|
||
down: .terraform env.auto.tfvars | ||
tofu destroy -auto-approve | ||
|
||
port-forward: | ||
source files/env.sh | ||
bash files/registry-port-forward.sh | ||
|
||
clean: | ||
rm -Rf files/* .terraform* terraform.tfstate* env.auto.tfvars |
Empty file.
Oops, something went wrong.