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
Custom Kubernetes Controllers at Mercari
Search
Yuki Ito
February 21, 2022
Programming
880
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Custom Kubernetes Controllers at Mercari
Yuki Ito
February 21, 2022
More Decks by Yuki Ito
See All by Yuki Ito
newmo の創業を支える Software Architecture と Platform Engineering
110y
5
3.6k
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
1.1k
Modular Monolith + Go @ newmo
110y
1
1.3k
Go + GraphQL @ newmo
110y
3
990
Architect / Platform Team at KAUCHE
110y
1
710
Cloud Run + Observability / Reliability @ KAUCHE
110y
0
680
Cloud Run CI/CD + QA @ KAUCHE
110y
1
680
Microservices on Cloud Run @ KAUCHE
110y
0
320
KAUCHE Loves Go
110y
0
540
Other Decks in Programming
See All in Programming
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
170
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
0
150
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
330
5分で問診!Composer セキュリティ健康診断
codmoninc
0
850
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
200
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
240
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
310
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
4
1.3k
Android CLI
fornewid
0
210
その節約、円になってますか?
isamumumu
1
680
テーブルをDELETEした
yuzneri
0
130
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
550
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
KATA
mclloyd
PRO
35
15k
How to train your dragon (web standard)
notwaldorf
97
6.7k
First, design no harm
axbom
PRO
2
1.2k
Believing is Seeing
oripsolob
1
180
Chasing Engaging Ingredients in Design
codingconduct
0
260
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Unsuck your backbone
ammeep
672
58k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Transcript
Custom Kubernetes Controllers at Mercari Yuki Ito (@mrno110) Kubernetes Casual
Talk
Merpay / Mercoin Architect Mercari Microservices Platform CI/CD Yuki Ito
@mrno110
Agenda ɾCustom Kubernetes Controllers ɾCode Generation
Agenda ɾCustom Kubernetes Controllers ɾCode Generation
spanner-autoscaler Autoscaler for the Google Cloud Spanner Instances
spanner-autoscaler apiVersion: spanner.mercari.com/v1alpha1 kind: SpannerAutoscaler metadata: name: spannerautoscaler-sample namespace: your-namespace
spec: scaleTargetRef: projectId: your-gcp-project-id instanceId: your-spanner-instance-id minNodes: 1 maxNodes: 4 maxScaleDownNodes: 1 targetCPUUtilization: highPriority: 60 Autoscaler for the Google Cloud Spanner Instances
spanner-autoscaler Google Cloud Day 2020 https://cloudonair.withgoogle.com/events/google-cloud-day-digital?talk=d3-da07
Bootes Bootes Namespace: a Namespace: b app: foo app: bar
app: foo app: bar app: foo app: bar Namespace: c xDS Control Plane Kubernetes Controller
Bootes xDS Control Plane Kubernetes Controller apiVersion: bootes.io/v1 kind: Cluster
metadata: name: example-cluster namespace: foo spec: config: name: example-cluster connect_timeout: 1s type: EDS lb_policy: ROUND_ROBIN http2_protocol_options: {} eds_cluster_config: eds_config: ads: {}
Bootes Envoy Meetup Tokyo #2 https://envoytokyo.connpass.com/event/175256/
Pull Request Replication Controller
Service Routing Controller
Service Routing Controller Merpay Tech Fest 2021 https://events.merpay.com/techfest-2021/
Agenda ɾCustom Kubernetes Controllers ɾCode Generation
Agenda ɾCustom Kubernetes Controllers ɾCode Generation
De fi ne CRDs as Protocol Buffers message Repository {
string owner = 1; string repository = 2; } type Repository struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Owner string `protobuf:...` Repository string `protobuf:...` } Protocol Buffers func (in *Repository) DeepCopyInto(out *Repository) { p := proto.Clone(in).(*Repository) *out = *p } func (in *Repository) DeepCopy() *Repository { if in == nil { return nil } out := new(Repository) in.DeepCopyInto(out) return out } protoc-gen-go protoc-gen-deepcopy
istio / tools / protoc-gen-deepcopy https://github.com/istio/tools/tree/master/cmd/protoc-gen-deepcopy
Generic protoc-gen-deepcopy https://github.com/protobuf-tools/protoc-gen-deepcopy
De fi ne CRDs as Protocol Buffers type Repository struct
{ state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Owner string `protobuf:...` Repository string `protobuf:...` } Protocol Buffers protoc-gen-go type Repository struct { v1.TypeMeta v1.ObjectMeta // Proto Buffer Struct Spec apisv1alpha1.Repository } kubetype-gen
istio / tools / kubetype-gen https://github.com/istio/tools/tree/master/cmd/kubetype-gen
Generic kubetype-gen https://github.com/110y/kubetype-gen
De fi ne CRDs as Protocol Buffers Protocol Buffers protoc-gen-go
/ protoc-gen-deepcopy Protocol Buffer Go Struct (+ DeepCopy) Kubernetes Go Types Custom Resource De fi nitions (YAML) kubetype-gen controller-gen
De fi ne CRDs as Protocol Buffers Protocol Buffers Advanced
Custom Resource De fi nitions (YAML) istio /tools / cue-gen