Using global parameter in helm without running master chart









up vote
0
down vote

favorite












I have this structure of helm charts:



-chart A- 
-chart A1
-chart A2
-chart B-
-chart B1
-chart B2
-chart C-
-chart C1
-chart C3


What I need is a global parameter or environment variable that I can apply to all charts without having a master chart above all charts.



So when I will run helm install I wouldnt have to pass this parameter using --set to all "main" charts (A,B,C).



Is this possible?










share|improve this question



























    up vote
    0
    down vote

    favorite












    I have this structure of helm charts:



    -chart A- 
    -chart A1
    -chart A2
    -chart B-
    -chart B1
    -chart B2
    -chart C-
    -chart C1
    -chart C3


    What I need is a global parameter or environment variable that I can apply to all charts without having a master chart above all charts.



    So when I will run helm install I wouldnt have to pass this parameter using --set to all "main" charts (A,B,C).



    Is this possible?










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have this structure of helm charts:



      -chart A- 
      -chart A1
      -chart A2
      -chart B-
      -chart B1
      -chart B2
      -chart C-
      -chart C1
      -chart C3


      What I need is a global parameter or environment variable that I can apply to all charts without having a master chart above all charts.



      So when I will run helm install I wouldnt have to pass this parameter using --set to all "main" charts (A,B,C).



      Is this possible?










      share|improve this question















      I have this structure of helm charts:



      -chart A- 
      -chart A1
      -chart A2
      -chart B-
      -chart B1
      -chart B2
      -chart C-
      -chart C1
      -chart C3


      What I need is a global parameter or environment variable that I can apply to all charts without having a master chart above all charts.



      So when I will run helm install I wouldnt have to pass this parameter using --set to all "main" charts (A,B,C).



      Is this possible?







      kubernetes-helm helm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 11 at 9:25

























      asked Nov 9 at 16:47









      Shachar Hamuzim Rajuan

      1,47311941




      1,47311941






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          You can give multiple --set and -f options to helm install, and so the best solution available is to write your "global" settings into a file and always pass a -f global-settings.yaml option to helm install (along with whatever other chart-specific settings and values files you have).



          If everything you're installing is in a single namespace, depending on what the settings actually do, it may work to put them into a shared ConfigMap. This is a little trickier to manage (you probably need to manually run kubectl commands), and there are many things you can do with Helm values that you couldn't with a shared ConfigMap. But, it's "automatic" in the way you suggest in the question; you don't need any Helm options at all to use it.






          share|improve this answer



























            up vote
            1
            down vote













            You might want to consider using a xxx.yaml file to override your charts default properties and template this file with that environment variable. I think that approach is much more maintainable than using --set cli option.



            Another approach is using something like Landscaper, listed on the Helm documentation, to template your charts ins an easy way






            share|improve this answer




















              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53230007%2fusing-global-parameter-in-helm-without-running-master-chart%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote



              accepted










              You can give multiple --set and -f options to helm install, and so the best solution available is to write your "global" settings into a file and always pass a -f global-settings.yaml option to helm install (along with whatever other chart-specific settings and values files you have).



              If everything you're installing is in a single namespace, depending on what the settings actually do, it may work to put them into a shared ConfigMap. This is a little trickier to manage (you probably need to manually run kubectl commands), and there are many things you can do with Helm values that you couldn't with a shared ConfigMap. But, it's "automatic" in the way you suggest in the question; you don't need any Helm options at all to use it.






              share|improve this answer
























                up vote
                1
                down vote



                accepted










                You can give multiple --set and -f options to helm install, and so the best solution available is to write your "global" settings into a file and always pass a -f global-settings.yaml option to helm install (along with whatever other chart-specific settings and values files you have).



                If everything you're installing is in a single namespace, depending on what the settings actually do, it may work to put them into a shared ConfigMap. This is a little trickier to manage (you probably need to manually run kubectl commands), and there are many things you can do with Helm values that you couldn't with a shared ConfigMap. But, it's "automatic" in the way you suggest in the question; you don't need any Helm options at all to use it.






                share|improve this answer






















                  up vote
                  1
                  down vote



                  accepted







                  up vote
                  1
                  down vote



                  accepted






                  You can give multiple --set and -f options to helm install, and so the best solution available is to write your "global" settings into a file and always pass a -f global-settings.yaml option to helm install (along with whatever other chart-specific settings and values files you have).



                  If everything you're installing is in a single namespace, depending on what the settings actually do, it may work to put them into a shared ConfigMap. This is a little trickier to manage (you probably need to manually run kubectl commands), and there are many things you can do with Helm values that you couldn't with a shared ConfigMap. But, it's "automatic" in the way you suggest in the question; you don't need any Helm options at all to use it.






                  share|improve this answer












                  You can give multiple --set and -f options to helm install, and so the best solution available is to write your "global" settings into a file and always pass a -f global-settings.yaml option to helm install (along with whatever other chart-specific settings and values files you have).



                  If everything you're installing is in a single namespace, depending on what the settings actually do, it may work to put them into a shared ConfigMap. This is a little trickier to manage (you probably need to manually run kubectl commands), and there are many things you can do with Helm values that you couldn't with a shared ConfigMap. But, it's "automatic" in the way you suggest in the question; you don't need any Helm options at all to use it.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 11 at 1:43









                  David Maze

                  7,6892820




                  7,6892820






















                      up vote
                      1
                      down vote













                      You might want to consider using a xxx.yaml file to override your charts default properties and template this file with that environment variable. I think that approach is much more maintainable than using --set cli option.



                      Another approach is using something like Landscaper, listed on the Helm documentation, to template your charts ins an easy way






                      share|improve this answer
























                        up vote
                        1
                        down vote













                        You might want to consider using a xxx.yaml file to override your charts default properties and template this file with that environment variable. I think that approach is much more maintainable than using --set cli option.



                        Another approach is using something like Landscaper, listed on the Helm documentation, to template your charts ins an easy way






                        share|improve this answer






















                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          You might want to consider using a xxx.yaml file to override your charts default properties and template this file with that environment variable. I think that approach is much more maintainable than using --set cli option.



                          Another approach is using something like Landscaper, listed on the Helm documentation, to template your charts ins an easy way






                          share|improve this answer












                          You might want to consider using a xxx.yaml file to override your charts default properties and template this file with that environment variable. I think that approach is much more maintainable than using --set cli option.



                          Another approach is using something like Landscaper, listed on the Helm documentation, to template your charts ins an easy way







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 11 at 15:34









                          Carlos

                          211




                          211



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53230007%2fusing-global-parameter-in-helm-without-running-master-chart%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

                              Syphilis

                              Darth Vader #20