Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate terraform from BW to 1pass #3236

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/bulk-merge-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
runs-on: ubuntu-latest
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
33fe0505-5ef3-4d91-8053-b101004a4947 > BOT_USERNAME
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.ONEPASS_SA_TOKEN }}
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY
BOT_USERNAME: op://Kubernetes/github-bot/BOT_USERNAME

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/flux-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ jobs:
outputs:
matrix: ${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down Expand Up @@ -65,13 +70,18 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/flux-hr-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@ jobs:
name: Flux Helm Repository Sync
runs-on: ["gha-runner-scale-set"]
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
1c493889-1e30-4156-a937-b10100433300 > KUBECONFIG
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY
KUBECONFIG: op://Kubernetes/kubernetes/KUBECONFIG_BASE4

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/flux-image-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ jobs:
outputs:
matrix: ${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down Expand Up @@ -66,13 +71,18 @@ jobs:
outputs:
matrix: ${{ steps.extract-images.outputs.images }}
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/flux-ks-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ jobs:
matrix:
cluster: ["utility"]
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
1c493889-1e30-4156-a937-b10100433300 > KUBECONFIG
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY
KUBECONFIG: op://Kubernetes/kubernetes/KUBECONFIG_BASE4

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ jobs:
contents: read
pull-requests: write
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/lychee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ jobs:
name: Lychee
runs-on: ubuntu-latest
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/nas-restart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
cluster: ["main", "utility"]
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
1c493889-1e30-4156-a937-b10100433300 > KUBECONFIG
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.ONEPASS_SA_TOKEN }}
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY
KUBECONFIG: op://Kubernetes/kubernetes/KUBECONFIG_BASE4

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ jobs:
contents: read
packages: write
steps:
- name: Configure 1password
uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }}

- name: Get Secrets
uses: bitwarden/sm-action@v2
uses: 1password/load-secrets-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
d12da64e-d865-4f4b-8ae0-b133013c4251 > CLOUDFLARE_API_KEY
e42be752-82d4-4340-84d2-b133013dc94a > CLOUDFLARE_ACCOUNT_ID
1c493889-1e30-4156-a937-b10100433300 > KUBECONFIG
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
export-env: true
env:
BOT_APP_ID: op://Kubernetes/github-bot/BOT_APP_ID
BOT_APP_PRIVATE_KEY: op://Kubernetes/github-bot/BOT_APP_PRIVATE_KEY
KUBECONFIG: op://Kubernetes/kubernetes/KUBECONFIG_BASE4
CLOUDFLARE_API_KEY: op://Kubernetes/cloudflare/CLOUDFLARE_API_KEY_GHA
CLOUDFLARE_ACCOUNT_ID: op://Kubernetes/cloudflare/CLOUDFLARE_ACCOUNT_TAG

- name: Generate Token
uses: actions/create-github-app-token@v1
Expand Down
Loading