Skip to content

Commit

Permalink
fix(ci): do not run on main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Morelly authored and FalcoSuessgott committed Jan 12, 2024
1 parent 431421f commit 7e35ce9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 27 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: make bootstrap CI

on:
push:
branches:
- main
pull_request:

jobs:
Expand All @@ -12,6 +9,12 @@ jobs:

steps:
- uses: hashicorp/setup-terraform@v2

- uses: actions/checkout@v3
- name: bootstrap
run: make bootstrap

- uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: make bootstrap
3 changes: 2 additions & 1 deletion .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: mkdocs
on:
push:
branches:
- master
- main

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Terraform

on:
push:
branches:
- main
pull_request:

jobs:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: tflint

on:
push:
branches:
- main
- master
pull_request:

jobs:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: tfsec

on:
push:
branches:
- main
pull_request:

jobs:
Expand Down
22 changes: 11 additions & 11 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Troubleshooting
# Troubleshooting

## `Error: serviceaccounts "sa-validator" already exists` during bootstrap
```bash
$> make bootstrap
....
│ Error: serviceaccounts "sa-validator" already exists
│ with module.vault_k8s[0].kubernetes_service_account.service_account,
│ on vault-k8s/terraform/main.tf line 5, in resource "kubernetes_service_account" "service_account":
│ 5: resource "kubernetes_service_account" "service_account" {
make: *** [Makefile:18: bootstrap] Error 1
```
can be solved by running:
can be solved by running:
```bash
$> terraform import "module.vault_k8s[0].kubernetes_service_account.service_account" default/sa-validator
Expand All @@ -26,15 +26,15 @@ $> make bootstrap
....
│ Error: clusterrolebindings.rbac.authorization.k8s.io "vault-token-reviewer" already exists
│ with module.vault_k8s[0].kubernetes_cluster_role_binding.role_binding,
│ on vault-k8s/terraform/main.tf line 33, in resource "kubernetes_cluster_role_binding" "role_binding":
│ 33: resource "kubernetes_cluster_role_binding" "role_binding" {
```
can be solved by running:
can be solved by running:
```bash
$> terraform import "module.vault_k8s[0].kubernetes_cluster_role_binding.role_binding" vault-token-reviewer
Expand All @@ -46,16 +46,16 @@ $> make bootstrap
....
│ Error: secrets "sa-validator-token-secret" already exists
│ with module.vault_k8s[0].kubernetes_secret.service_account_secret,
│ on vault-k8s/terraform/main.tf line 18, in resource "kubernetes_secret" "service_account_secret":
│ 18: resource "kubernetes_secret" "service_account_secret" {
```
can be solved by running:
can be solved by running:
```bash
$> terraform import "module.vault_k8s[0].kubernetes_secret.service_account_secret" default/sa-validator-token-secret
```
```

0 comments on commit 7e35ce9

Please sign in to comment.