Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Custom Kubernetes Controllers at Mercari
Yuki Ito
February 21, 2022
Programming
1
300
Custom Kubernetes Controllers at Mercari
Yuki Ito
February 21, 2022
Tweet
Share
More Decks by Yuki Ito
See All by Yuki Ito
What Is the Go Workspace Mode
110y
4
880
What Are We Doing as Merpay Architect
110y
0
1k
Kubernetes Casual Talk
110y
0
36
How to Make Kubernetes Controller Development Happier: mercari.go #17
110y
1
460
メルカリのマイクロサービスをPCで動かそう!
110y
5
1.4k
Tour of Istio
110y
0
420
Cloud Run + Observability
110y
3
12k
Proxyless Service Mesh with gRPC
110y
3
1.3k
Introduce Cloud Run
110y
2
480
Other Decks in Programming
See All in Programming
Yumemi.apk #6 ~ゆめみのAndroidエンジニア 日頃の成果大発表会!~ Session 2
blendthink
1
210
UI State Modeling 어떤게 좋을까?
laco2951
1
220
Loom is Blooming
josepaumard
3
540
CIでAndroidUIテストの様子を録画してみた
mkeeda
0
170
SPA/MPA 議論の俯瞰と 現代における設計のポイント - #tfcon 2022 フロントエンド設計
ahomu
3
1.7k
Android入門
hn410
0
310
mrubyを1300円のボードで動かそう
yuuu
0
180
Monadic Java
mariofusco
4
260
Modern Web Apps with Spring Boot, Angular & TypeScript
toedter
12
14k
コードの解析と言語習得の心得
jinjin33333
0
130
C言語でメモリ管理を考えた話
hkawai
0
190
Enterprise Angular: Frontend Moduliths with Nx and Standalone Components @jax2022
manfredsteyer
PRO
0
290
Featured
See All Featured
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
172
8.3k
Unsuck your backbone
ammeep
659
55k
Navigating Team Friction
lara
175
11k
A Philosophy of Restraint
colly
192
14k
From Idea to $5000 a Month in 5 Months
shpigford
372
44k
Infographics Made Easy
chrislema
233
17k
Embracing the Ebb and Flow
colly
73
3.3k
Testing 201, or: Great Expectations
jmmastey
21
5.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
337
17k
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
212
11k
Making the Leap to Tech Lead
cromwellryan
113
6.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
212
20k
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