Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Helm で実践する Kubernetes マニフェスト管理のシフトダウン_Sao

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Helm で実践する Kubernetes マニフェスト管理のシフトダウン_Sao

Platform Engineering LT会〜開発者体験を支える仕組みと実践〜にてSaoさんが登壇した資料です。
https://supporterz-seminar.connpass.com/event/407059/

More Decks by UPSIDER, Inc. Tech&Product div.

Transcript

  1. 🇨🇿 チェコ / プラハ 株式会社UPSIDER / Processor Team SRE Haruki

    Sao @harusys_ @harusys 中世の街並み 最近の一言 海外旅行にハマっています Processor Team の担当領域 Processing Issuing クレジットカード決済処理 カード発行 Accounting Merchant 会計処理 加盟店管理 ティーン教会 錬金術師の研究所(人体錬成陣のモデルと言われる) Presenter Profile © 2026 UPSIDER.inc
  2. Responsibility Platform と SRE の責任分担  Processor Team(私たち) チーム B

    チーム C … 各チームの Embedded SRE 構成・書き方はチームで決める 責任境界  組織横断の Platform Engineer Kubernetes クラスタ ノード Background ネームスペース © 2026 UPSIDER.inc
  3. Background 管理対象が多く、管理しきれない 2 10+ 150+ GKE クラスタ (環境ごと) Argo CD

    Application ワークロード マニフェストは開発者も含めて、日々追加・変更される 守るべき既定値が一部で欠ける(例:Istio 設定) これらを管理する SRE は 3 名 Background © 2026 UPSIDER.inc
  4. Shift Down SRE がテンプレートを守り、 開発者はパラメータを書くだけ Developer Responsibility 必要な設定の抜けを 開発者とレビュワーが防ぐ シフトダウン

    Platform Responsibility 必要な設定を SRE が既定値として Library Chart に定義し、テストで保証する 出典:Leah Rivers、James Brookbank「How Google does it: Your guide to platform engineering」Google Cloud Blog、2025 年 8 月 https://cloud.google.com/blog/products/application-modernization/a-guide-to-platform-engineering Shift Down © 2026 UPSIDER.inc
  5. Step 1 / Library Charts Helm Library Charts の仕組み 開発者が管理

    各環境の chart cluster-a/example-app/staging/ SRE が管理 Chart.yaml バージョン指定 dependencies: - name: library-chart version: 1.0.0 repository: oci://<region>-docker.pkg.dev/<project>/charts 取り込む Library Chart 共通のテンプレート templates/ 1 行だけ 守るべき既定値 {{- include "library-chart.k8s-deployment" $ -}} パラメータの検証 values.yaml パラメータ base: node: on-demand deployments: - name: example 参考:Helm Docs「Library Charts」https://helm.sh/docs/topics/library_charts/ Shift Down © 2026 UPSIDER.inc
  6. Step 1 / Library Charts Library Chart 導入前後 導入前 導入後

    同じ修正を chart × 環境の数だけ 修正は Library Chart の 1 回だけ chart A · staging + sidecar.istio.io/nativeSidecar: "true" chart A · prod + sidecar.istio.io/nativeSidecar: "true" chart B · staging + sidecar.istio.io/nativeSidecar: "true" Library Chart + sidecar.istio.io/nativeSidecar: "true" CI が更新 PR を自動作成 … chart × 環境の数だけ chart A · staging - version: 1.0.0 + version: 1.1.0 chart A · prod - version: 1.0.0 + version: 1.1.0 chart B · staging - version: 1.0.0 + version: 1.1.0 … chart × 環境の数だけ PR もレビューも chart × 環境の数だけ どの PR も差分はバージョンの 1 行だけ Shift Down © 2026 UPSIDER.inc
  7. Step 2 / helm-unittest helm-unittest で Library Chart をテスト library-chart/

    ← Library Chart ├── Chart.yaml - it: podAnnotations で sidecar.istio.io/nativeSidecar を指定すると拒否する ├── templates/ └── test-chart/ test-chart/tests/native_sidecar_test.yaml set: ← テスト専用の chart ├── Chart.yaml deployments: - name: example file://.. で取り込む podAnnotations: └── tests/ └── native_sidecar_test.yaml   sidecar.istio.io/nativeSidecar: "false" asserts: - failedTemplate: 既定値が付く 許可しない値を拒否する errorMessage: >example: podAnnotations must not set sidecar.istio.io/nativeSidecar, it is fixed by the chart Library Chart の PR ごとに CI で実行 参考:GitHub「helm-unittest/helm-unittest」https://github.com/helm-unittest/helm-unittest Shift Down © 2026 UPSIDER.inc
  8. Step 3 / Schema Files Helm Schema Files で環境ごとの差異を保証 values.yaml

    Library Chart の fail 全環境に共通 values.schema.json 環境ごと 本番環境の values.yaml 本番環境の values.schema.json(抜粋) あるクラスタの本番環境には Spot VM のノードプールがない "base": { "properties": { "node": { "const": "on-demand" } } }, "deployments": { "items": { "properties": { "node": { "const": "on-demand" } } } } base: node: spot deployments: - name: example node: spot PR の CI でエラーになり、マージできない 参考:Helm Docs「Charts」Schema Files https://helm.sh/docs/topics/charts/#schema-files Shift Down © 2026 UPSIDER.inc
  9. Results 仕組みの改善に投資へ 月あたりのマニフェスト変更 PR 以前 2025/4–2026/3 約 50 件 /月

    27% 仕組みの改善 14 件/月 直近 2026/5–9 約 65 件 /月 46% 仕組みの改善 30 件/月 仕組みの改善 それ以外(パラメータ定義の変更など) ※ Kubernetes マニフェスト変更 PR(bot を除く)のうち、テンプレート、スキーマ、テスト、CI/CD、Agent 設定などを変更した PR を「仕組みの改善」として計上。月あたりの平均件数。 Results © 2026 UPSIDER.inc
  10. Tech Book Fest 21 技術書典21 で、今日の話を本にしました UPSIDER 初の技術書を出版 🎉 Git

    リポジトリ統合、Helm 移行、Library Chart 導入、 ガードレール構築など、詳しく紹介しています。 https://techbookfest.org/event/tbf21 Information © 2026 UPSIDER.inc