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

Helm Chartリポジトリを2年半運用してわかったいろいろな話 - CloudNative Days Spring 2021 ONLINE #CNDO2021

Helm Chartリポジトリを2年半運用してわかったいろいろな話 - CloudNative Days Spring 2021 ONLINE #CNDO2021

Kouta Ozaki

March 12, 2021
Tweet

More Decks by Kouta Ozaki

Other Decks in Programming

Transcript

  1. $-06%/"5*7&%":4413*/(0/-*/&
    )FMN$IBSUϦϙδτϦΛ೥൒ӡ
    ༻ͯ͠Θ͔͍ͬͨΖ͍Ζͳ࿩

    View full-size slide

  2. ొஃऀ঺հ

    ▸ Kouta Ozak
    i

    ▸ Chatwork, YAML Engineer

    View full-size slide

  3. Helm ChartϦϙδτϦ͸͡Ίͯ·͢

    View full-size slide

  4. Helm ChartϦϙδτϦ͸͡Ίͯ·͢

    View full-size slide

  5. Helm ChartϦϙδτϦ͸͡Ίͯ·͢

    View full-size slide

  6. 01
    )FMN$IBSUϦϙδτϦΛ࡞ͬͨཧ༝

    View full-size slide

  7. Helm ChartϦϙδτϦΛ࡞ͬͨཧ༝
    $IBUXPSLͷ,VCFSOFUFTͷ؅ཧϑϩʔ

    View full-size slide

  8. Helm ChartϦϙδτϦΛ࡞ͬͨཧ༝
    )FMN$IBSUϦϙδτϦΛ࡞ͬͨཧ༝
    )FMN$IBSU͕ͳ͍ɺϢʔεέʔε͕߹Θͳ͍ͱ͖͕͋Δ
    ஫ೖͰ͖ͳ͍ઃఆ͕͋Δ
    ,VCFSOFUFTͷؔ৺ͱΞϓϦέʔγϣϯͷؔ৺Λ෼͚͔ͨͬͨ
    ެ։͢Δ͜ͱͰΫΦϦςΟΛίϯτϩʔϧ͔ͨͬͨ͠

    View full-size slide

  9. 02
    )FMN$IBSUϦϙδτϦͷ࡞Γํ

    View full-size slide

  10. Helm ChartϦϙδτϦͷ࡞Γํ
    $*Λ࢖ͬͨ)FMN$IBSUϦϙδτϦͷެ։
    w $IBSUϦϙδτϦͰNBTUFSʹϚʔδͨ͠Β$JSDMF$*ͰδϣϒΛ࣮ߦ
    IFMNQBDLBHFͰύοέʔδΛੜ੒
    IFMNSFQPJOEFYͰJOEFYZBNMΛੜ੒
    HIQBHFTϒϥϯνʹ੒Ռ෺ΛQVTI
    w ࠓͳΒ(JU)VC"DUJPOͰ΋ͬͱ؆୯ʹͰ͖Δ͔΋

    View full-size slide

  11. w ϞϊϨϙߏ੒ͳͷͰࠩ෼͚ͩϏϧυͱ͔΋͍ͯ͠Δ
    w ࠷৽ͷϚʔδίϛοτ͔ΒલճͷϚʔδίϛοτ·Ͱͷࠩ෼Λݕ஌
    w ͜ͷลΓ͸.BLF
    fi
    MFͰ͝Γԡͯ͠Δ
    w ࠓͳΒ(JU)VC"DUJPOͰ΋ͬͱ؆୯ʹͰ͖Δ͔΋
    Helm ChartϦϙδτϦͷ࡞Γํ
    ϞϊϨϙߏ੒Ͱͷෳ਺ͷ$IBSUͷ؅ཧ

    View full-size slide

  12. 03
    )FMN$IBSUϦϙδτϦͰΑ͋͘Δ࡞ۀ

    View full-size slide

  13. ,VCFSOFUFTͷ৽ػೳͰ$IBSUʹೖΕΔͱྑͦ͞͏ͳػೳΛ௥Ճ
    ,VCFSOFUFTͰEFQSFDBUFEʹͳͬͨػೳΛߋ৽
    MJOUͰར༻͍ͯ͠ΔIFMNίϚϯυɺLVCFWBMͷεΩʔϚΛߋ৽
    UFTUͰར༻͍ͯ͠ΔLJOEͷόʔδϣϯΛߋ৽
    ˞جຊతʹ&,4ͷ࠷৽όʔδϣϯʹ௥ैͯ͠ߋ৽
    Helm ChartϦϙδτϦͰΑ͋͘Δ࡞ۀ
    ,VCFSOFUFTΫϥελͷόʔδϣϯΞοϓରԠ

    View full-size slide

  14. w $IBSUͰར༻͍ͯ͠Δύϥϝʔλ͕มΘͬͨΓɺ,VCFSOFUFTͷߏ੒͕มΘΔΑ͏ͳͱ͖͚ͩΞοϓ
    σʔτ
    w ͨͩجຊతʹ͸஫ೖੑΛߴ͘औ͍ͬͯΔͷͰߋ৽͠ͳ͍ͱ͍͚ͳ͍έʔε͸͋Μ·Γͳ͍
    w Ξοϓσʔτࣗମ΋&,4ͷΞοϓσʔτλΠϛϯά͔ؾ͕޲͍ͨ࣌
    Helm ChartϦϙδτϦͰΑ͋͘Δ࡞ۀ
    ΞϓϦέʔγϣϯͷόʔδϣϯΞοϓ

    View full-size slide

  15. 04
    ྑ͍)FMN$IBSUͷॻ͖ํ

    View full-size slide

  16. ΞϓϦέʔγϣϯͷར༻ϢʔεέʔεΛຬ͍ͨͯ͠Δ
    %PDLFS)VCͳͲͷެࣜͰެ։͞Ε͍ͯΔΠϝʔδΛར༻Ͱ͖Δ
    Ұ௨Γͷ஋Λ஫ೖͰ͖Δ
    ΞϓϦέʔγϣϯͷઃఆɺ,VCFSOFUFTͷߏ੒Λ࿈ಈͰ͖Δ
    w ϙʔτͷ஫ೖͰΞϓϦέʔγϣϯͷϙʔτɺίϯςφϙʔτɺ4FSWJDFͷϙʔτɺ*OHSFTTͷϙʔ
    τΛ࿈ಈͰ͖Δͱ͔
    ஫ೖͨ͠஋ΛUQMͰ࠶ల։Ͱ͖Δ
    )FMN$IBSUϦϙδτϦ͕ެ։͞Ε͍ͯΔɺIFMNHJUQMVHJOͰऔಘͰ͖ΔΑ͏ʹ5BHHJOH͞Ε͍ͯΔ
    ྑ͍Helm Chartͷॻ͖ํ
    ར༻ऀͱͯ͠خ͍͠)FMN$IBSU

    View full-size slide

  17. w ઃఆ஋͕ݻఆͳΞϓϦέʔγϣϯͷ)FMN$IBSUͱͯ͠ཧ૝ͱ͢Δઃܭ
    w FHIUUQTHJUIVCDPN%BUB%PHIFMNDIBSUTUSFFNBTUFSDIBSUTEBUBEPH
    w %BUBEPHͷ$IBSU͸ࣾ಺Ͱ͸੟ॻͱݺ͹Ε͍ͯΔ͘Β͍ૉ੖Β͍͠
    w ͨͩ͠ɺΞϓϦέʔγϣϯͷΞοϓσʔτʹ௥ै͠ͳ͚Ε͹͍͚ͳ͍ͨΊҡ࣋͢Δͷ͕େม
    w 044ͳͲͰΞϓϦέʔγϣϯͱ)FMN$IBSUΛಉҰϦϙδτϦͰ؅ཧͰ͖ΔͳΒҡ࣋͠΍͍͔͢΋
    ྑ͍Helm Chartͷॻ͖ํ
    WBMVFTͰશͯͷ஋ΛઃఆͰ͖Δ)FMN$IBSU

    View full-size slide

  18. w ઃఆ஋͕ಈతͳΞϓϦέʔγϣϯͷ)FMN$IBSUͰਪ঑͢Δઃܭ
    w FHIUUQTHJUIVCDPNDIBUXPSLDIBSUTUSFFNBTUFS
    fl
    VFOUE
    w ઃఆϑΝΠϧͷσϑΥϧτ஋ΛWBMVFTZBNMͰఆٛͯ͠ɺσϑΥϧτ஋Ͱ͏·͘Ͱ͖ͳ͍έʔεͰ͸্
    ॻ͖Ͱ͖ΔΑ͏ʹ͢Δ
    w σϑΥϧτͷ஋ͷઃఆϑΝΠϧΛ࢖͏͔͗Γ,VCFSOFUFTͷϦιʔεͱ࿈ಈͰ͖Δ
    ྑ͍Helm Chartͷॻ͖ํ
    ઃఆϑΝΠϧΛ஫ೖͰ͖Δ)FMN$IBSU

    View full-size slide

  19. w ,VCFSOFUFTͷϦιʔεʹ஫໨ͯ͠൚༻తʹѻ͑ΔΑ͏ʹ͢Δઃܭ
    w FHIUUQTHJUIVCDPNIFMNDIBSUTUSFFNBTUFSTUBCMFMBNQ
    w தͰಈ͘ΞϓϦέʔγϣϯʹ͸ґଘ͠ͳ͍
    w ԣల։͕ඞཁͳ΋ͷͱ͔ʹ͔ͳΓޮՌߴ͍
    w Α͋͘Δ8FCΞϓϦέʔγϣϯͱ͔΄΅ಉ͡ߏ੒ʹͳΔ
    w *OHSFTTɺ4FSWJDFɺ%FQMPZNFOUɺ$PO
    fi
    H.BQɺ4FDSFUɺ1%#ɺ)1"ɺ3PMFɺ
    3PMF#JOEJOHTɺ4"
    ྑ͍Helm Chartͷॻ͖ํ
    ൚༻తʹ࢖͍·ΘͤΔ)FMN$IBSU

    View full-size slide

  20. w WBMVFTͷ໊લ͸)FMN$IBSUͰ࢖ΘΕΔҰൠతͳ໊લ͕͍͍
    w BVUPTDBMJOHͰ)1"ɺNFUSJDTͰ1SPNFUIFVTͷ༗ޮԽͱ͔ͱ͔
    w FYUSB999ܥ͸ఆܕ۟
    w FYUSB&OWɺFYUSB7PMVNFTɺFYUSB7PMVNF.PVOUT
    w WBMVFTͰద੾ʹ஫ೖͰ͖ΔΑ͏ʹͯ͠΋૝ఆ֎ͷέʔεͷͨΊʹ༻ҙ͓ͯ͘͠ͱ͍͍
    w $PO
    fi
    H.BQ4FDSFUT࢖͏ͱ͖͸1PEͷBOOPUBUJPOTʹϋογϡΛೖΕΔ
    w UQMల։͸΍Γ͗͢ͳ͍
    w Ұ౓΍Γ͗ͯ͢Έ͚ͨͲେมɻ࿙Ε͕͋ͬͨΓߏ଄ʹΑͬͯUQMల։͠ʹ͔ͬͨ͘Γ
    ྑ͍Helm Chartͷॻ͖ํ
    ͦͷଞͷࡉ͔͍࿩

    View full-size slide

  21. 05
    )FMN$IBSUͷ඼࣭؅ཧ

    View full-size slide

  22. w $IBUXPSLͰҰ൪मਖ਼ͯ͠Δˍࢦఠͯ͠Δ
    w Πϯσϯτ่͕ΕΔͱ:".-ͱͯ͠ෆਖ਼ͳঢ়ଶʹͳΔ͔ɺ,VCFSOFUFTͷ4DIFNBͱζϨΔ
    w \\cOJOEFOUYYY^^ͷॻ͖ํͰͳ͔ͬͨΒ·ͣόάͱٙ͏
    w \\cOJOEFOUYYY^^ͷॻ͖ํͰYYYͱͦͷߦͷΠϯσϯτ͕͋ͬͯΔ͔͸ඞͣνΣοΫ͢Δ
    Helm Chartͷ඼࣭؅ཧ
    )FMN$IBSUͷҰ൪Α͋͘Δϛε͸Πϯσϯτ่͕ΕΔ͜ͱ

    View full-size slide

  23. w $*Ͱ͜ͷΠϯσϯτͷ่Ε͸νΣοΫ͍ͯ͠Δ
    w OJOEFOU࢖͏࣌͸ඞͣ\\^^ͷॻ͖ํʹͳͬͯΔ͔νΣοΫ
    w OJOEFOUͰࢦఆͨ͠Πϯσϯτ਺ͱͦͷߦͷΠϯσϯτ͕Ұக͍ͯ͠Δ͔νΣοΫ
    w γΣϧεΫϦϓτͰΰϦԡ͠
    w IUUQTHJUIVCDPNDIBUXPSLDIBSUTCMPCNBTUFSDJSDMFDJMJOUDIBSUTI
    w (PUFNQMBUF:".-ͷMJOUFS͕ཉ͍͠
    Helm Chartͷ඼࣭؅ཧ
    )FMN$IBSUͷҰ൪Α͋͘Δϛε͸Πϯσϯτ่͕ΕΔ͜ͱ

    View full-size slide

  24. w 13Ͱมߋ͕͋ͬͨ$IBSU͸$IBSUZBNMͷόʔδϣϯ͕มΘ͍ͬͯΔ͔$*ͰνΣοΫ
    w IUUQTHJUIVCDPNDIBUXPSLDIBSUTCMPCNBTUFSDJSDMFDJDIFDLWFSTJPOTI
    w όʔδϣϯΛॻ͖׵͑ͳ͍ͱݹ͍όʔδϣϯ্͕ॻ͖͞Εͯ͠·͏
    w ͜ͷνΣοΫೖΕΔ·Ͱ݁ߏࣄނͬͯͨ
    w IFMNDIBSUTʹ΋ೖ͙ͬͯͨΒ͍େࣄ
    Helm Chartͷ඼࣭؅ཧ
    $IBSUͷόʔδϣϯνΣοΫ

    View full-size slide

  25. w IFMNʹMJOUͷػೳ͕͋ΔͷͰ$*Ͱճ͍ͯ͠Δ
    w IUUQTIFMNTIEPDTIFMNIFMN@MJOU
    w $IBSUZBNMͷඞਢνΣοΫɺόʔδϣϯͷॻࣜνΣοΫ
    w WBMVFTTDIFNBKTPOͰͷWBMVFTZBNMͷνΣοΫ
    w OVMM஋ͷνΣοΫ
    w EFQSFDBUFEͳ,VCFSOFUFT"1*7FSTJPOͷνΣοΫ
    w IUUQTHJUIVCDPNIFMNIFMNCMPC
    GFFFFEDBDBBCFFGDCECQLHMJOUSVMFTEFQSFDBUJPOTHP
    w ର৅ͷ,VCFSOFUFTͷόʔδϣϯ͸IFMNͷόʔδϣϯʹΑͬͯݻఆ͞ΕΔͷͰ஫ҙ
    Helm Chartͷ඼࣭؅ཧ
    IFMNMJOUΛ࢖ͬͨMJOU

    View full-size slide

  26. w LVCFWBMΛ࢖ͬͯ,VCFSOFUFTͷ4DIFNBͱҰக͢Δ͔$*ͰνΣοΫ
    w IUUQTHJUIVCDPNJOTUSVNFOUBLVCFWBM
    w UZQP΍Πϯσϯτ่Εɺܕͷؒҧ͍ΛνΣοΫ
    w LVCFWBMͰར༻͍ͯ͠ΔLVCFSOFUFTKTPOTDIFNB͸શͯͷόʔδϣϯʹରԠ͍ͯ͠ͳ͍
    w IUUQTHJUIVCDPNJOTUSVNFOUBLVCFSOFUFTKTPOTDIFNB
    w 13΋ड͚෇͚ͯͳ͍ঢ়ଶͳͷͰGPSL͍ͯ͠Δ
    w IUUQTHJUIVCDPNDXP[BLJLVCFSOFUFTKTPOTDIFNB
    w ࠷৽ͷόʔδϣϯʹݶΓࣗಈͰεΩʔϚΛੜ੒͢Δ࢓૊Έ͕ೖ͍ͬͯΔ
    Helm Chartͷ඼࣭؅ཧ
    LVCFWBMΛ࢖ͬͨMJOU

    View full-size slide

  27. w $*؀ڥͰLJOEΛཱͯͯIFMNJOTUBMMɺIFMNUFTUΛ࣮ߦ͍ͯ͠Δ
    w ࣮ࡍʹΠϯετʔϧ͠ͳ͍ͱݕ஌Ͱ͖ͳ͍έʔε͕͋Δ
    w MJWFOFTTSFBEJOFTTͷઃఆϛε
    w WPMVNFTɺWPMVNF.PVOUTͷઃఆϛε
    w ࣮ࡍʹςετΛ͠ͳ͍ͱݕ஌Ͱ͖ͳ͍έʔε͕͋Δ
    w *OHSFTT4FSWJDF1PEͷTFMFDUPSܥ
    w ΞϓϦέʔγϣϯͷڍಈ
    w LJOEࣗମ͸෼ඵ͙Β͍Ͱ্ཱ͕ͪΔͷͰૣ͍
    w $JSDMF$*ͩͱ͋·Γ$IBSUΛΠϯετʔϧ͗͢͠Δͱෆ҆ఆʹͳΓ΍͍͢ͷͰ஫ҙ
    Helm Chartͷ඼࣭؅ཧ
    LJOEΛ࢖ͬͨJOTUBMMɺUFTU

    View full-size slide

  28. 06
    )FMN$IBSUϦϙδτϦͰকདྷ΍Γ͍ͨ͜ͱ

    View full-size slide

  29. w $IBSUΛॻ͍͍͕ͯͯ͜͜Ұ൪ͷۤߦ
    w ৽͍͠$IBSU͕࡞ΒΕΔͱ୰͘ਓ͕ग़ͯ͘Δ
    w ஍ຯʹ3&"%.&NEͱWBMVFTZBNMζϨ͍ͯΔέʔε΋͋ͬͯɺ)FMN$IBSUʹ׳ΕΔͱWBMVFTZBNM
    ͱUFNQMBUFT͔͠ಡ·ͳ͍ͷͰ΋͏͍Βͳ͍ͷͰ͸ͱࢥΘͳ͘΋ͳ͍
    Helm ChartϦϙδτϦͰকདྷ΍Γ͍ͨ͜ͱ
    3&"%.&NEͷࣗಈੜ੒

    View full-size slide

  30. w WBMVFTZBNMͱWBMVFTTDIFNBKTPOͱ3&"%.&NEͱಉ͡Α͏ͳ͜ͱΛճॻ͔ͳ͚Ε͹͍͚ͳ͍ۤ
    ߦ
    w WBMVFTTDIFNBKTPOΛॻ͘ͱIFMNMJOUͰWBMVFTZBNMͷݕূͰ͖ΔͷͰ඼࣭Λ޲্Ͱ͖Δ
    w ·ͨ.BOJGFTUϦϙδτϦͰ$IBSUΛར༻͢Δͱ͖ʹ஫ೖ͢Δ஋ͷνΣοΫ΋Ͱ͖ΔͷͰɺ஫ೖϛεΛ
    ݮΒ͢͜ͱ͕Ͱ͖Δ
    w ͋Δͱศར͚ͩͲҡ࣋͢Δͷ͕ਏ͗͢Δ
    Helm ChartϦϙδτϦͰকདྷ΍Γ͍ͨ͜ͱ
    WBMVFTTDIFNBKTPOͷࣗಈੜ੒

    View full-size slide

  31. w ΞϓϦέʔγϣϯͷϦϦʔεʹ߹ΘͤͯBQQ7FSTJPOͱJNBHFͷλάΛࣗಈͰߋ৽ͯ͠13Λ࡞Γ͍ͨ
    w ͦͷͱ͖ʹ(JU)VC3FMFBTFͷ಺༰Λ13ͷຊจʹషΕΔͱྑ͍ײ͡
    w WBSJBOUEFWNPEͰͦ͏͍͏ػೳͷαϙʔτ͕ೖ͍ͬͯΔ
    w IUUQTHJUIVCDPNWBSJBOUEFWNPESFMFBTFTUBHW
    w ಛʹࠔ͍ͬͯΔΘ͚Ͱ͸ͳ͍͚Ͳɺৗʹ࠷৽όʔδϣϯͷ$IBSUΛ४උͰ͖Δͱ࣮ӡ༻࣌ͷ࠷৽όʔ
    δϣϯ΁ͷ௥ै͕΍Γ΍͍͢
    w ͨͩ͠ɺස౓ʹΑͬͯ͸13͕ཷ·Γ͗ͯ͢ࠅ͍͜ͱʹͳΔͷ͕ݟ͍͑ͯΔͷͰ೰·͍͠
    Helm ChartϦϙδτϦͰকདྷ΍Γ͍ͨ͜ͱ
    ΞϓϦέʔγϣϯͷϦϦʔεʹ߹Θͤͨ13ͷࣗಈ࡞੒

    View full-size slide

  32. ·ͱΊ
    ݕࡧʹ͔͔Βͳ͍͚Ͳ)FMN$IBSUϦϙδτϦΛӡ༻͍ͯ͠ΔΑʂ
    )FMN$IBSUϦϙδτϦ࡞Δͷ͸؆୯ͩΑʂʂ
    Ͱ΋ྑ͍)FMN$IBSUΛ࡞Δʹ͸݁ߏ΍Δ͜ͱ͋ΔΑʂʂʂ

    View full-size slide

  33. ಇ͘Λ΋ͬͱָ͘͠ɺ૑଄తʹ

    View full-size slide