From ac0f3b9816fb34cdbe2eb65da2375573942067fc Mon Sep 17 00:00:00 2001 From: kirinnee Date: Sun, 11 Aug 2024 20:39:41 +0800 Subject: [PATCH] feat: upgrade to use infisical --- .envrc | 2 +- infra/root_chart/Chart.lock | 6 +++--- infra/root_chart/Chart.yaml | 2 +- infra/root_chart/README.md | 21 +++++++++++++-------- infra/root_chart/values.lapras.yaml | 3 ++- infra/root_chart/values.pichu.yaml | 2 ++ infra/root_chart/values.pikachu.yaml | 2 ++ infra/root_chart/values.raichu.yaml | 2 ++ infra/root_chart/values.tauros.yaml | 2 ++ infra/root_chart/values.yaml | 17 ++++++++++------- 10 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.envrc b/.envrc index d0b7f4f..44cf712 100755 --- a/.envrc +++ b/.envrc @@ -1,4 +1,4 @@ -nix_direnv_watch_file "./nix/env.nix" "./nix/fmt.nix" "./nix/packages.nix" "./nix/shells.nix" "./nix/pre-commit.nix" "./flake.nix" "./parse.nix" +watch_file "./nix/env.nix" "./nix/fmt.nix" "./nix/packages.nix" "./nix/shells.nix" "./nix/pre-commit.nix" "./flake.nix" "./parse.nix" use flake PATH_add node_modules/.bin pls setup diff --git a/infra/root_chart/Chart.lock b/infra/root_chart/Chart.lock index 7d99043..3f45591 100644 --- a/infra/root_chart/Chart.lock +++ b/infra/root_chart/Chart.lock @@ -1,7 +1,7 @@ dependencies: - name: sulfoxide-bromine repository: oci://ghcr.io/atomicloud/sulfoxide.bromine - version: 1.4.0 + version: 1.6.0 - name: root-chart repository: oci://ghcr.io/atomicloud/nitroso.zinc version: 1.26.0 @@ -14,5 +14,5 @@ dependencies: - name: bun-cron-chart repository: file://../cron_chart version: 0.1.0 -digest: sha256:ca681a809c141337be5549b3853777a04203d07675e27507bc50ce6b961d8c2b -generated: "2024-07-13T22:50:56.162686+08:00" +digest: sha256:48aafdaf15ada64ebd67f1791fe8ccc637bb38c4a28b0e90e2394892f364d3d3 +generated: "2024-08-11T20:36:09.076471+08:00" diff --git a/infra/root_chart/Chart.yaml b/infra/root_chart/Chart.yaml index cbf5fa3..d298b67 100644 --- a/infra/root_chart/Chart.yaml +++ b/infra/root_chart/Chart.yaml @@ -8,7 +8,7 @@ appVersion: "1.16.0" dependencies: - name: sulfoxide-bromine - version: 1.4.0 + version: 1.6.0 condition: bromine.enable alias: bromine repository: oci://ghcr.io/atomicloud/sulfoxide.bromine diff --git a/infra/root_chart/README.md b/infra/root_chart/README.md index d94d65a..387d492 100644 --- a/infra/root_chart/README.md +++ b/infra/root_chart/README.md @@ -12,7 +12,7 @@ Root Chart to a single Service | file://../cron_chart | refunder(bun-cron-chart) | 0.1.0 | | file://../cron_chart | reverter(bun-cron-chart) | 0.1.0 | | oci://ghcr.io/atomicloud/nitroso.zinc | zinc(root-chart) | 1.26.0 | -| oci://ghcr.io/atomicloud/sulfoxide.bromine | bromine(sulfoxide-bromine) | 1.4.0 | +| oci://ghcr.io/atomicloud/sulfoxide.bromine | bromine(sulfoxide-bromine) | 1.6.0 | ## Values @@ -21,15 +21,20 @@ Root Chart to a single Service | appSettings | object | `{}` | | | bromine.annotations."argocd.argoproj.io/sync-wave" | string | `"1"` | | | bromine.enable | bool | `true` | | -| bromine.rootSecret | object | `{"name":"nitroso-helium-doppler","ref":"NITROSO_HELIUM"}` | Secret of Secrets reference | -| bromine.rootSecret.ref | string | `"NITROSO_HELIUM"` | DOPPLER Token Reference | -| bromine.storeName | string | `"nitroso-helium"` | Store name to create | -| bromine.target | string | `"nitroso-helium"` | | +| bromine.rootSecret | object | `{"name":"helium","ref":{"clientId":"NITROSO_HELIUM_CLIENT_ID","clientSecret":"NITROSO_HELIUM_CLIENT_SECRET"}}` | Secret of Secrets reference | +| bromine.rootSecret.ref | object | `{"clientId":"NITROSO_HELIUM_CLIENT_ID","clientSecret":"NITROSO_HELIUM_CLIENT_SECRET"}` | Infisical Token Reference | +| bromine.serviceTree.<<.landscape | string | `"lapras"` | | +| bromine.serviceTree.<<.layer | string | `"2"` | | +| bromine.serviceTree.<<.module | string | `"pollee"` | | +| bromine.serviceTree.<<.platform | string | `"nitroso"` | | +| bromine.serviceTree.<<.service | string | `"helium"` | | +| bromine.storeName | string | `"helium"` | Store name to create | +| bromine.target | string | `"helium"` | | | refunder.command[0] | string | `"bun"` | | | refunder.command[1] | string | `"run"` | | | refunder.command[2] | string | `"index.js"` | | | refunder.command[3] | string | `"refunder"` | | -| refunder.envFromSecret | string | `"nitroso-helium"` | | +| refunder.envFromSecret | string | `"helium"` | | | refunder.restartPolicy | string | `"Never"` | | | refunder.schedule | string | `"30 5-23 * * *"` | | | refunder.serviceTree.<<.landscape | string | `"lapras"` | | @@ -43,7 +48,7 @@ Root Chart to a single Service | reverter.command[1] | string | `"run"` | | | reverter.command[2] | string | `"index.js"` | | | reverter.command[3] | string | `"reverter"` | | -| reverter.envFromSecret | string | `"nitroso-helium"` | | +| reverter.envFromSecret | string | `"helium"` | | | reverter.restartPolicy | string | `"Never"` | | | reverter.schedule | string | `"*/5 * * * *"` | | | reverter.serviceTree.<<.landscape | string | `"lapras"` | | @@ -57,7 +62,7 @@ Root Chart to a single Service | scheduler.command[1] | string | `"run"` | | | scheduler.command[2] | string | `"index.js"` | | | scheduler.command[3] | string | `"schedule"` | | -| scheduler.envFromSecret | string | `"nitroso-helium"` | | +| scheduler.envFromSecret | string | `"helium"` | | | scheduler.restartPolicy | string | `"Never"` | | | scheduler.schedule | string | `"0 16 * * *"` | | | scheduler.serviceTree.<<.landscape | string | `"lapras"` | | diff --git a/infra/root_chart/values.lapras.yaml b/infra/root_chart/values.lapras.yaml index 9620cdc..8c06d83 100644 --- a/infra/root_chart/values.lapras.yaml +++ b/infra/root_chart/values.lapras.yaml @@ -3,7 +3,8 @@ serviceTree: bromine: enable: true - + serviceTree: + landscape: *landscape zinc: enable: true serviceTree: diff --git a/infra/root_chart/values.pichu.yaml b/infra/root_chart/values.pichu.yaml index cf31e98..8c15528 100644 --- a/infra/root_chart/values.pichu.yaml +++ b/infra/root_chart/values.pichu.yaml @@ -21,6 +21,8 @@ securityContext: &securityContext bromine: enable: true + serviceTree: + landscape: *landscape fullnameOverride: "helium-pollee" diff --git a/infra/root_chart/values.pikachu.yaml b/infra/root_chart/values.pikachu.yaml index 7ff7ddd..1de384f 100644 --- a/infra/root_chart/values.pikachu.yaml +++ b/infra/root_chart/values.pikachu.yaml @@ -21,6 +21,8 @@ securityContext: &securityContext bromine: enable: true + serviceTree: + landscape: *landscape fullnameOverride: "helium-pollee" diff --git a/infra/root_chart/values.raichu.yaml b/infra/root_chart/values.raichu.yaml index 6449e2e..4ed0b58 100644 --- a/infra/root_chart/values.raichu.yaml +++ b/infra/root_chart/values.raichu.yaml @@ -21,6 +21,8 @@ securityContext: &securityContext bromine: enable: true + serviceTree: + landscape: *landscape fullnameOverride: "helium-pollee" diff --git a/infra/root_chart/values.tauros.yaml b/infra/root_chart/values.tauros.yaml index e8dd958..a153b28 100644 --- a/infra/root_chart/values.tauros.yaml +++ b/infra/root_chart/values.tauros.yaml @@ -2,6 +2,8 @@ serviceTree: landscape: &landscape tauros bromine: enable: true + serviceTree: + landscape: *landscape zinc: enable: true diff --git a/infra/root_chart/values.yaml b/infra/root_chart/values.yaml index f5d6734..a73257c 100644 --- a/infra/root_chart/values.yaml +++ b/infra/root_chart/values.yaml @@ -1,24 +1,27 @@ serviceTree: &serviceTree landscape: lapras platform: nitroso - service: helium + service: &service helium module: pollee layer: "2" bromine: + serviceTree: + <<: *serviceTree annotations: argocd.argoproj.io/sync-wave: "1" enable: true # -- Store name to create - storeName: nitroso-helium + storeName: *service # -- Secret of Secrets reference rootSecret: - # -- DOPPLER Token Reference - ref: "NITROSO_HELIUM" - - name: "nitroso-helium-doppler" + name: *service + # -- Infisical Token Reference + ref: + clientId: NITROSO_HELIUM_CLIENT_ID + clientSecret: NITROSO_HELIUM_CLIENT_SECRET - target: &target "nitroso-helium" + target: &target helium appSettings: {}