Argo CD で GitOps してみた

4d78b749c315e21a956053dcbf0508a9?s=47 po3rin
August 25, 2020

Argo CD で GitOps してみた

4d78b749c315e21a956053dcbf0508a9?s=128

po3rin

August 25, 2020
Tweet

Transcript

  1. "SHP$%Ͱ(JU0QTͯ͠Έͨ ,VCFSOFUFT/PWJDF5PLZP"VH CZQPSJO

  2. pon ( @po3rin ) ݕࡧͱ͔΍ΔσʔλΤϯδχΞɻ (PΛΑ͘ॻ͘ɻίϯςφ΋޷͖ɻ

  3. Introduction \

  4. &,4Ͱӡ༻ͯ͠Δϒϩά✌ QPSJODPN

  5. ϒϩάͷΞʔΩςΫνϟ✌

  6. Solution \

  7. (JU0QT͸Ϋϥ΢υωΠςΟϒͳΞϓϦͷ ܧଓతσϓϩΠΛ࣮૷͢Δํ๏ͷҰͭͰ ͢ɻΠϯϑϥετϥΫνϟΛϦϙδτϦ ಺ʹهड़͞Εͨঢ়ଶʹҰகͤ͞ΔࣗಈԽ ϓϩηεΛ࣮ߦ͠·͢ɻ 8IBU`T(JU0QT

  8. ͜Ε͕σϓϩΠͷཧ૝ܗɻ(JU)VCʹLTͷϚχϑΣετΛมߋͯ͠QVTIͨ͠ΒɺͦΕ͕൓ө͞ΕΔɻ (JU0QT  1VTI 8BUDI4ZOD

  9. ͜ͷΑ͏ͳ(JU0QTΛ࣮ݱ͢Δ"SHP$%ͳͲͷΦʔϓϯιʔε͕ଟ਺ଘࡏ͢Δɻ (JU0QT  1VTI 8BUDI 4ZOD

  10. Flux CD ͱ Argo CD ͸ɺGitOps Λ࣮ݱ͢ΔͨΊ ͷΦʔϓϯιʔεͷπʔτοϓͰ͢ɻ (JU0QT 

  11. "SHP$%͸લ৬Ͱ࢖͓ͬͯΓɺࣗ෼Ͱ΋ ઃఆͰ͖ΔΑ͏ʹͳ͓͖͍ͬͯͨͱ͍͏ ҆௚ͳཧ༝Ͱϒϩάʹ"SHP$%Λ࠾༻ɻ "SHP$% 

  12. "SHP$%͸(JU)VCͷϦϙδτϦΛৗʹXBUDI͠ɺݱঢ়ͱͷࠩ෼Λݕ஌͠ɺઃఆΛࣗಈ·ͨ͸खಈͰ ࠶ಉظ͠·͢ɻ͍͢͝ʂʂ "SHP$%  1VTI 8BUDI 4ZOD .BOJGFTUT3FQP

  13. "SHP$%ͷσϞ

  14. (JU0QTͰ͸"QQMJDBUJPO3FQPଆͰΠϝʔδΛϏϧυͨ͠Βͦͷ଍Ͱผ్ɺ:".-Λฤूͯ͠QVTI͢ Δඞཁ͕͋Δɻݸਓ։ൃͳͷͰճQVTI͸໘౗ɻ "SHP$%  1VTI 8BUDI 4ZOD .BOJGFTUT3FQP *NBHF "QQMJDBUJPO3FQP

    1VTI
  15. ຊདྷ͸ZBNMͷߋ৽΋ࣗಈԽ͍ͨ͠ͱ͜ΖɻಛʹݸਓϒϩάͷΑ͏ͳ΋ͷͳΒঘߋɻ࣮ࡍ"SHP$%ʹ ΊͬͪΌཁ๬ग़ͯΔɻ͔͠͠ɺ"SHP$%͸ͦΕ͸(JU0QTͷൣғ֎ͱͯ͋͠·Γ৐Γؾ͡Όͳ͔ͬͨɻ "SHP$%  1VTI 8BUDI 4ZOD .BOJGFTUT3FQP *NBHF ͍͍ײ͡ʹ.BOJGFTUΛ

    ࣗಈͰฤू͍ͨ͠ "QQMJDBUJPO3FQP
  16. ͦ΋ͦ΋"QQMJDBUJPO3FQPͱ.BOJGFTUT3FQPΛ෼͚Δඞཁ͸͋Δͷ͔ɻ͜Ε͸"SHPͷެࣜϒϩ άͰݴٴ͞Ε͍ͯΔ(JU0QT#FTU1SBDUJDFTͷҰͭɻ "SHP$%  IUUQTCMPHBSHPQSPKJPHJUPQTCFTUQSBDUJDFTEDCDCF⒎

  17. "SHP$%*NBHF6QEBUFS "SHP$%Λઃఆͨ࣍͠ͷि͘Β͍ʹNBOJGFTUͷJNBHFߋ৽͢Δ΍ͭͰ͖ͯͨXXX ·ͩϓϨϦϦʔεͳͷͰຊ൪ʹ͸࢖͑ͳ͍ͷͰࠓޙʹظ଴ɻ

  18. ·ͱΊΔͱ"QQMJDBUJPO3FQPͷ$*Ͱ.BOJGFTUT3FQPͷ಺༰Λमਖ਼ͯ͠QVTI͍ͨ͠ɻͯ͞Ͳ͏ ͢Δ͔ɻɻૂͬͨZBNMͷҰ෦Λ؆୯ʹमਖ਼Ͱ͖Δπʔϧ͕ZR ZR  1VTI 8BUDI 4ZOD .BOJGFTUT3FQP *NBHF ͍͍ײ͡ʹ.BOJGFTUΛ

    ࣗಈͰฤू͍ͨ͠ "QQMJDBUJPO3FQP
  19. ZR͸ܰྔͰϙʔλϒϧͳίϚϯυϥΠϯ:".-ϓϩηοαZBNMϑΝΠϧಛԽͷKR·ͨ͸TFEʹͳΔ͜ ͱΛ໨ඪͱ͍ͯ͠Δɻ ZR 

  20. ZR͸ͰZBNMͷૂͬͨϑΟʔϧυΛ؆୯ʹฤ ूͰ͖Δɻ͜ΕΛ(JU)VC"DUJPOTͰߦͳͬ ͯɺฤूͨ͠Βͦͷ··QVTI͢Δɻ ZR 

  21. ZRΛ࢖ͬͯ"QQMJDBUJPO3FQP΁ͷQVTI͔ΒσϓϩΠ·ͰͷࣗಈԽ͕׬੒ͨ͠ɻ ZR  1VTI 8BUDI 4ZOD .BOJGFTUT3FQP *NBHF ZRͰ.BOJGFTUΛ ฤू͍ͨ͠

    "QQMJDBUJPO3FQP
  22. Appendix \

  23. "SHP$%%FDMBSBUJWF4FUVQ "SHP$%ͷઃఆ͸એݴతʹͰ͖ΔɻݸਓϒϩάͰ͸Ҡߦதɻ

  24. (JU0QTͷจ຺Ͱ͸σϓϩΠ͸͍ΘΏΔ1VMMܕWT1VTIܕͷٞ࿦ʹͳΔɻ1VMMܕ͸ݖݶ෼཭΍ɺෳࡶੑഉআʹޮ͍ͯ͘Δɻ ɾ1VMMܕͷํ͸ൿີ৘ใΛ֎෦ʹ౉ͣ͞ʹ,VCFSOFUFT಺Ͱ׬݁Ͱ͖Δɻ ɾ1VMMܕʹ͢Δͱσʔλ֨ೲϦϙδτϦ͕Πϯϑϥʹґଘ͠ͳ͘ͳΔɻ 1VTIܕWT1VMMܕ 1VTI 'FUDI 4ZOD 4ZOD 1VMMܕ 1VTIܕ

    )PDL LT΁ͷ 83*5&͕ඞཁ ϦϙδτϦ΁ͷ 3&"%ݖݶ͚ͩ 1VTI
  25. YDSZQUPTTIJTTVF 44)ΩʔʹΑΔೝূ(PͷYDSZQUPTTIύοέʔδʹ͋Δ1BSTF1SJWBUF,FZ8JUI1BTTQISBTF ؔ਺Ͱ͕͢ɺ"SHP$%͕࢖͍ͬͯΔόʔδϣϯ͸0QFO44)ܗࣜͷύεϑϨʔζ෇͖ൿີ伴ʹର Ԡ͓ͯ͠ΒͣΤϥʔʹͳΔɻɻ https://github.com/argoproj/argo-cd/issues/1894#issuecomment-667014961

  26. Conclusion \

  27. (JU0QT͸Ϋϥ΢υωΠςΟϒͳΞϓϦͷܧଓతσϓϩΠΛ࣮૷͢Δํ๏ͷҰͭɻ (JU0QTΛ࣮ݱ͢ΔͨΊʹ͸"SHP$%΍'MVY$%Λ࢖͏ͷ͕ศརɻ ίϯςφΠϝʔδͷϏϧυ͔ΒϦϦʔε·Ͱ͍ͨ͠ͳΒZRͱ͔࢖͏ɻ 'MVY$%͸ͦ͏͍͏ػೳ͕͋Δɻ"SHP$%͸ϕʔλ൛Ͱ͍ۙػೳ͕͋Δɻ

  28. ໌೔΋ൃද͢ΔXXX

  29. "SHP$%Ͱ(JU0QTͯ͠Έͨ ,VCFSOFUFT/PWJDF5PLZP"VH CZQPSJO