Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
OPA and cloud resources
Search
Toshinori Sugita
July 07, 2021
Technology
0
13k
OPA and cloud resources
Open Policy Agent Rego Knowledge Sharing Meetup
https://mercari.connpass.com/event/211073/
Toshinori Sugita
July 07, 2021
Tweet
Share
More Decks by Toshinori Sugita
See All by Toshinori Sugita
KompalWeather: Serverless Sauna Service with Cloud Run
toshi0607
0
12k
Knativeで作るDIY FaaS / serverless days fukuoka 2019 knative workshop
toshi0607
0
4.5k
Knativeで作るDIY FaaS / serverless days tokyo 2019 knative workshop
toshi0607
4
10k
Knativeへの誘い / Go Go Knative!
toshi0607
3
5.1k
Build serverless application on top of Kubernetes #sdmel19
toshi0607
1
5.8k
Knativeで実現するKubernetes上のサーバーレスアーキテクチャ #CNDT2019 #1E3 / serverless architecture on the top of K8s with Knative
toshi0607
9
14k
技術書典で高めるせんとう力 #エンジニア銭湯 / Tech book fest loves sauna
toshi0607
1
6.4k
Goで学ぶKnative #mercarigo / learning Knative with Go
toshi0607
5
23k
入門 Knative 〜KubernetesとServerlessとの出会い〜 / getting started with knative
toshi0607
8
8.8k
Other Decks in Technology
See All in Technology
The depthes of profiling Ruby - RubyKaigi 2024
osyoyu
0
100
TailwindCSSでUIライブラリを作る際のハマりどころ
shuta13
0
220
SWC Transformerから見るTypeScript関数記述ベストプラクティス
fujiyamaorange
1
170
PhpStorm超絶技巧40分集中講義 #phpconkagawa
yusuke
4
710
AWSやJAWS-UGとの出会いを振り返る
yoyoyopg
1
210
TanStack Routerで型安全かつ効率的なルーティングを実現
ytaisei
4
760
Observabilityジャーニーを実現するためのAWSサービス:OSS編
o11yfes2023
0
110
[2024년 5월 세미나] 생성형 AI와 함께하는 데이터 분석가 커리어
datarian
0
1.1k
Shinagile 2024
kawaguti
PRO
2
120
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
14
3.8k
類似ロジック実装をiOS/Android間で合わせる道標No.1
fumiyasac0921
1
220
パフォーマンス最適化のベストプラクティス
databricksjapan
0
190
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Infographics Made Easy
chrislema
238
18k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.5k
Clear Off the Table
cherdarchuk
85
310k
Being A Developer After 40
akosma
67
580k
It's Worth the Effort
3n
180
27k
Music & Morning Musume
bryan
41
5.6k
Designing Experiences People Love
moore
136
23k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
What's new in Ruby 2.0
geeforr
338
31k
Transcript
1 OPA & cloud resources July 7th 2021, Open Policy
Agent Rego Knowledge Sharing Meetup @toshi0607
2 Self introduction • Toshinori Sugita ◦ @toshi0607 • Job
◦ 2018 Merpay ▪ microservice development ◦ 2020 Mercari ▪ microservice platform (platform infra) • Books ◦ 『GCPで学ぶTerraform 基礎編/実践編』 ◦ Knative本 × 3
3 OPA in Mercari • Preparing guardrails for Istio at
scale • Enhance Kubernetes Security with Gatekeeper • Open Policy AgentとSpinnakerで実現するマイクロサービ スの安全な継続的デリバリー • Introduce Conftest
4 OPA in Mercari for Kubernetes • Capabilities • Host
namespaces • Host network • Host path • Privileged container • Wildcard torelations • Dedicated node pool access • Liveness/Readiness prove • Memory request/limit • Pre stop • PDB • HPA • VPA • Datadog Metric • Istio config • DNS config • External IP • Service type
5 Example: Capabilities
6 Example: Capabilities
7 OPA for cloud resources • Domain agnostic and general
purpose policy engine • terraform plan and configuration can be converted to JSON • Conftest supports JSON and HCL/HCL2
8 Differences from use cases for Kubernetes • No gatekeeper
◦ Terraform -> GCP API • Conftest ◦ conftest verify ◦ conftest test
9 Differences from existing Terraform tools • terraform fmt ◦
Terraform style convention • terraform validate ◦ Terraform syntax • terraform-linters/tflint ◦ GCP API compatibility • terraform variable (v0.13~) ◦ General context for input via variable • OPA ◦ General context (reliability, security, company convention, etc.)
10 Use cases • Production readiness check ◦ Cloud SQL
backup, auto resize, maintenance window ◦ Cloud Storage multi-regional, versioning • Terraform module guard rail ◦ Allow list ◦ Service company, country, environment ◦ Module version ◦ Unintended combination
11 Example: Terraform module
12 Takeaways • OPA & Conftest support not only Kubernetes
but also a cloud resource (Terraform) use case • OPA & Conftest covers fine-grained use cases that existing tools don’t support