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

Merpay Tech Fest 2021_The World Is at Your Pull Request How to Make a Dynamic QA Environment on Kubernetes and Istio

Merpay Tech Fest 2021_The World Is at Your Pull Request How to Make a Dynamic QA Environment on Kubernetes and Istio

Merpay Tech Fest 2021は5日間のオンライン技術カンファレンスです。

IT企業で働くソフトウェアエンジニアおよびメルペイの技術スタックに興味がある方々を対象に2021年7月26日(月)から7月30日(金)までの5日間、開催します。 Merpay Tech Festは事業との関わりから技術への興味を深め、プロダクトやサービスを支えるエンジニアリングを知れるお祭りです。 セッションでは事業を支える組織・技術・課題などへの試行錯誤やアプローチを紹介予定です。お楽しみに!

■イベント関連情報
- 公式ウェブサイト:https://events.merpay.com/techfest-2021/
- 申し込みページ:https://mercari.connpass.com/event/215035/
- Twitterハッシュタグ: #MerpayTechFest

■リンク集
- メルカリ・メルペイイベント一覧:https://mercari.connpass.com/
- メルカリキャリアサイト:https://careers.mercari.com/
- メルカリエンジニアリングブログ:https://engineering.mercari.com/blog/
- メルカリエンジニア向けTwitterアカウント:https://twitter.com/mercaridevjp
- 株式会社メルペイ:https://jp.merpay.com/

92cdcff298e89e2fcd2fb705155c2d4b?s=128

mercari
PRO

July 30, 2021
Tweet

Transcript

  1. #MerpayTechFest Session Title The World Is at Your Pull Request!

    - How to Make a Dynamic QA Environment on Kubernetes and Istio - Yuki Ito 株式会社メルペイ Architect
  2. #MerpayTechFest 株式会社メルペイ Architect Yuki Ito 事業立ち上げ時期の 2018 年 3 月にメルペイに参画し、テックリードとしてマイク

    ロサービスの開発に携わる。その後、 2019 年 3 月に現在所属している Architect チームにジョインし、組織横断的な課題を解決するために Kubernetes や Istio、Envoy などの技術動向を追っている。また、 Microservices Platform チームの一員として CI/CD環境の整備にも携わっ ている。
  3. #MerpayTechFest Agenda Introduction Custom Kubernetes Controllers ・ ・ Background ・

    Problem: Insufficient QA Environment ・ Pull Request Replication Controller ・ Service Routing Controller ・
  4. #MerpayTechFest Agenda Introduction Custom Kubernetes Controllers ・ ・ Background ・

    Problem: Insufficient QA Environment ・ Pull Request Replication Controller ・ Service Routing Controller ・
  5. #MerpayTechFest Microservices

  6. #MerpayTechFest Microservices mercari/go-conference-2021-spring-office-hour

  7. #MerpayTechFest Microservices

  8. #MerpayTechFest Kubernetes Kubernetes is a portable, extensible, open-source platform for

    managing containerized workloads and services, that facilitates both declarative configuration and automation. https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
  9. #MerpayTechFest Kubernetes Production Development

  10. #MerpayTechFest Kubernetes Production Development QA

  11. #MerpayTechFest Kubernetes

  12. #MerpayTechFest Kubernetes

  13. #MerpayTechFest Problem Feature Development for a Microservice Feature 1 Feature

    2 Feature 3
  14. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3
  15. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env
  16. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env [PR 2] Deploy
  17. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env [PR 2] Deploy Waiting PR 2 ... Waiting for PR 2 ...
  18. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env Release Merge Merge Merge
  19. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env Release Merge Deploy Merge Merge
  20. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env Release Merge Deploy Merge Merge ✅ ✅ ❌
  21. #MerpayTechFest Problem Feature Development for a Microservice PR 1 PR

    2 PR 3 QA Env Release Merge Deploy Merge Merge ✅ ✅ ❌ We have to … - Wait for PR 2 is ready - Revert RR 2 from Release branch
  22. #MerpayTechFest Goal PR 1 PR 2 PR 3 Provide Dynamic

    QA Environment per Pull Request! QA Env 2 QA Env 1 QA Env 3 💻 💻 💻
  23. #MerpayTechFest Agenda Introduction Custom Kubernetes Controllers ・ ・ Background ・

    Problem: Insufficient QA Environment ・ Pull Request Replication Controller ・ Service Routing Controller ・
  24. #MerpayTechFest Custom Kubernetes Controllers Pull Request Replication Controller Service Routing

    Controller ・ ・
  25. #MerpayTechFest Custom Kubernetes Controllers Pull Request Replication Controller Service Routing

    Controller ・ ・
  26. #MerpayTechFest

  27. #MerpayTechFest

  28. #MerpayTechFest

  29. #MerpayTechFest Annotation

  30. #MerpayTechFest

  31. #MerpayTechFest

  32. #MerpayTechFest Reconcile original Deployment

  33. #MerpayTechFest kubernetes / client-go https://github.com/kubernetes/client-go

  34. #MerpayTechFest

  35. #MerpayTechFest

  36. #MerpayTechFest

  37. #MerpayTechFest Actual and Desired state # 1 Desired Actual

  38. #MerpayTechFest Actual and Desired state # 1 Desired Actual PR

    1 Create
  39. #MerpayTechFest Actual and Desired state # 1 Desired Actual PR

    1 # 2 Create
  40. #MerpayTechFest Actual and Desired state # 1 Desired Actual PR

    1 # 2 PR 2 Create
  41. #MerpayTechFest Actual and Desired state # 1 Desired Actual PR

    1 # 2 PR 2 Merged
  42. #MerpayTechFest Actual and Desired state # 1 Desired Actual PR

    1 # 2 PR 2 Delete
  43. #MerpayTechFest

  44. #MerpayTechFest

  45. #MerpayTechFest Replication based on Pull Request

  46. #MerpayTechFest

  47. #MerpayTechFest Problem

  48. #MerpayTechFest Custom Kubernetes Controllers Pull Request Replication Controller Service Routing

    Controller ・ ・
  49. #MerpayTechFest Custom Kubernetes Controllers Pull Request Replication Controller Service Routing

    Controller ・ ・
  50. #MerpayTechFest

  51. #MerpayTechFest Istio https://istio.io/latest/about/service-mesh/ Istio is an open source service mesh

    that layers transparently onto existing distributed applications. Istio’s powerful features provide a uniform and more efficient way to secure, connect, and monitor services.
  52. #MerpayTechFest Istio Architecture https://istio.io/latest/docs/ops/deployment/architecture/

  53. #MerpayTechFest Without Istio

  54. #MerpayTechFest With Istio

  55. #MerpayTechFest Envoy Envoy is an L7 proxy and communication bus

    designed for large modern service oriented architectures. The project was born out of the belief that: The network should be transparent to applications. When network and application problems do occur it should be easy to determine the source of the problem.
  56. #MerpayTechFest With Istio

  57. #MerpayTechFest

  58. #MerpayTechFest

  59. #MerpayTechFest Istio: Virtual Service

  60. #MerpayTechFest Istio: Virtual Service

  61. #MerpayTechFest Istio: Virtual Service

  62. #MerpayTechFest Istio: Virtual Service

  63. #MerpayTechFest

  64. #MerpayTechFest

  65. #MerpayTechFest

  66. #MerpayTechFest

  67. #MerpayTechFest Annotation Annotation

  68. #MerpayTechFest Annotation

  69. #MerpayTechFest Annotation Annotation

  70. #MerpayTechFest Reconcile Replicated Services

  71. #MerpayTechFest kubernetes-sigs / controller-runtime https://github.com/kubernetes-sigs/controller-runtime

  72. #MerpayTechFest Annotation Annotation

  73. #MerpayTechFest Annotation Annotation

  74. #MerpayTechFest Provision Virtual Service

  75. #MerpayTechFest Virtual Service: Before

  76. #MerpayTechFest Virtual Service: After

  77. #MerpayTechFest Annotation Annotation

  78. #MerpayTechFest

  79. #MerpayTechFest

  80. #MerpayTechFest

  81. #MerpayTechFest Problem: Header Propagation Headers aren’t Propagated

  82. #MerpayTechFest

  83. #MerpayTechFest

  84. #MerpayTechFest JWT Payload

  85. #MerpayTechFest

  86. #MerpayTechFest Custom Envoy Filter

  87. #MerpayTechFest EnvoyFilter

  88. #MerpayTechFest EnvoyFilter

  89. #MerpayTechFest

  90. #MerpayTechFest

  91. #MerpayTechFest

  92. #MerpayTechFest

  93. #MerpayTechFest Agenda Introduction Custom Kubernetes Controllers ・ ・ Background ・

    Problem: Insufficient QA Environment ・ Pull Request Replication Controller ・ Service Routing Controller ・
  94. #MerpayTechFest

  95. #MerpayTechFest

  96. #MerpayTechFest

  97. #MerpayTechFest Goal PR 1 PR 2 PR 3 Provide Dynamic

    QA Environment per Pull Request! QA Env 2 QA Env 1 QA Env 3 💻 💻 💻
  98. None