-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pavel Nikolov <[email protected]>
- Loading branch information
1 parent
ee1c988
commit e34be80
Showing
11 changed files
with
456 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: "Network Terraform Apply" | ||
|
||
on: | ||
## Trigger the workflow manually | ||
workflow_dispatch: | ||
|
||
env: | ||
TF_WORKSPACE: "default" | ||
CONFIG_DIRECTORY: "./terraform" | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
|
||
jobs: | ||
terraform: | ||
name: "Network Terraform Plan & Apply" | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ env.CONFIG_DIRECTORY }} | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Assume AWS Credentials | ||
id: assume | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
role-session-name: ${{ github.actor }} | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | ||
|
||
- uses: hashicorp/setup-terraform@v3 | ||
|
||
- name: Terraform fmt | ||
id: fmt | ||
run: terraform fmt -check | ||
continue-on-error: true | ||
|
||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
|
||
- name: Set terraform output vars | ||
id: vars | ||
run: | | ||
printf "cluster_name=%s\n" $(terraform output -raw cluster_name) >> "$GITHUB_OUTPUT" | ||
- id: install-aws-cli | ||
uses: unfor19/install-aws-cli-action@v1 | ||
with: | ||
version: 2 # default | ||
verbose: false # default | ||
arch: amd64 # allowed values: amd64, arm64 | ||
|
||
- uses: tale/kubectl-action@v1 | ||
with: | ||
base64-kube-config: ${{ secrets.KUBE_CONFIG }} | ||
kubectl-version: v1.30.0 | ||
|
||
- name: configure kubeconfig | ||
run: | | ||
aws eks --region ${{ secrets.AWS_REGION }} update-kubeconfig --name ${{ steps.vars.outputs.cluster_name }} | ||
- name: Kubernetes Apply | ||
run: kubectl apply -k k8s/ |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
paths: | ||
- 'terraform/**' | ||
workflow_dispatch: | ||
|
||
env: | ||
TF_WORKSPACE: "default" | ||
|
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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: zkpauth-client |
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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: zkpauth |
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,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: server | ||
namespace: zkpauth | ||
spec: | ||
ports: | ||
- port: 50051 | ||
targetPort: grpc | ||
selector: | ||
name: server |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.