Repository navigation
refactor(bootstrap): 秘密を値のファイルに入れ、versions.yaml を talos.sops.yaml に畳む - #636
Merged
Merged
Conversation
- <name>-secret-values.sops.yaml を <name>-values.sops.yaml に入れる(argocd・infisical)。 .sops.yaml の encrypted_regex で秘密のキーの値だけ暗号化し、mac_only_encrypted で 平文の部分(Renovate が書き換える `# version:` も)を sops を通さず直せるようにする - infisical-secrets.sops.yaml と cert-manager-cloudflare-secret.sops.yaml は、それぞれ infisical-values.sops.yaml と cert-manager-values.sops.yaml の 2 つめのドキュメントにする。 render.sh が `---` で分けて今までと同じ名前の inlineManifest にする(chart の extraObjects に 入れると machine config が変わるので使わない) - versions.yaml の版と schematic を talos.sops.yaml の先頭のコメントにする(chart と同じ `# renovate:` / `# version:` の形)。render.sh・talos-boot・Renovate・文書をそこに向ける render.sh の生成物は前と 1 バイトも変わらないので、当て直しは要らない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9PbUfqG4pPxus99UeLiJs
|
Claude finished @5ym's task in 33s —— View job レビュー結果結論: 差し戻すほどの問題は見つかりませんでした。 実際に確認した点:
要確認(指摘ではなく運用上の注意)
テストは、このリポジトリに単体テストの枠組みは無く、 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#635 の続き。bootstrap/ のファイルを部品ごとに 1 本へ寄せる。render.sh の生成物は前と 1 バイトも変わらない(
cmpで確認)ので当て直しは要らない。秘密を値のファイルに入れる
argocd-secret-values.sops.yaml→argocd-values.sops.yamlに、infisical-secret-values.sops.yaml→infisical-values.sops.yamlに入れた。.sops.yamlの<name>-values.sops.yamlの規則で、秘密のキー(service.webhook.mattermost・githubAppPrivateKey・password・postgresPassword・ENCRYPTION_KEY・AUTH_SECRET・CLIENT_*_GITHUB_LOGIN・CF_DNS_API_TOKEN)の値だけを暗号化する。mac_only_encrypted: trueなので、平文の部分は sops を通さずに直せる。encrypted_regexに当たらないので平文のまま残る。# version:と平文の値(server.insecure)を sed で書き換えてもsops -dは通る。infisical と cert-manager も同じ。infisical-secrets.sops.yamlはinfisical-values.sops.yamlの 2 つめのドキュメントに、cert-manager-cloudflare-secret.sops.yamlはcert-manager-values.sops.yamlの 2 つめのドキュメントにした。render.shが復号したあと---で分け、今までと同じ名前の inlineManifest(infisical-secrets・cloudflare-secret)にする。extraObjectsには入れなかった。そうすると Secret が chart の inlineManifest に移り、machine config が変わるため。cilium-values.yamlのまま。render.shは<name>-values.sops.yamlがあればそれを、無ければ<name>-values.yamlを読む。ARGOCD_VALUES/INFISICAL_VALUES/CERT_MANAGER_VALUESに、ENC[…]を yq でダミーにしたファイルを丸ごと渡す。外に出すものを抜くのは前と同じ。versions.yaml を talos.sops.yaml に畳む
talos.sops.yamlの先頭のコメントにした。形は chart と同じ# renovate:/# version:で、schematic は# schematic:。render.shと talos-boot は、# renovate:の行の depName でその次の# version:を引く。talos.sops.yamlを見る。Talos のグループ規則(versioning: semverと allowedVersions)はそのまま当たる。確かめたこと
render.shの前後のcontrolplane.yamlをcmpで比べて同一(main の refactor(bootstrap): argocd/repos.yaml を bootstrap/argocd-repos.yaml へ #635 の状態と比べた)。CI と同じ上書きでも通り、SMTP と repo-creds が抜けることを見た。talos.sops.yamlから talos・kubernetes・gateway-api を拾う。versioning: semverが付いている。<name>-values(.sops).yamlから cilium・cert-manager・argo-cd・infisical-standalone と、redis・infisical のイメージを拾う。infisical は 2 ドキュメントのファイルでも helm-values が読む。renovate-config-validator --strictは通る。🤖 Generated with Claude Code
https://claude.ai/code/session_01T9PbUfqG4pPxus99UeLiJs