Code Monkey home page Code Monkey logo

Comments (6)

haarchri avatar haarchri commented on May 25, 2024

we use it like this:
in chart

flux2:

              kustomizecontroller:
                secret:
                  create: true
                  name: netrc
                  data:
                    .netrc: "machine gitlab.com \nlogin git \npassword password" ## multiline via \n
                extraSecretMounts:
                  - name: netrc
                    mountPath: "/home/controller/.netrc"
                    subPath: .netrc
                    secretName: netrc
                    readOnly: true

in flux2-sync:

              secret:
                create: true
                data:
                  username: gitlab-ci-token
                  password: password

from helm-charts.

throwawayaccount0153 avatar throwawayaccount0153 commented on May 25, 2024

we use it like this: in chart

flux2:

              kustomizecontroller:
                secret:
                  create: true
                  name: netrc
                  data:
                    .netrc: "machine gitlab.com \nlogin git \npassword password" ## multiline via \n
                extraSecretMounts:
                  - name: netrc
                    mountPath: "/home/controller/.netrc"
                    subPath: .netrc
                    secretName: netrc
                    readOnly: true

in flux2-sync:

              secret:
                create: true
                data:
                  username: gitlab-ci-token
                  password: password

I'm using ssh so mine needs to look like this:

secret:
  create: true
  data:
    identity: |
    SSH__PRIVATE_KEY
    identity.pub: |
    SSH__PUBLIC_KEY
    known_hosts: "GITHUB_KNOWN_HOSTS_ENTRY"

this is the reason for the bug report, most people use ssh and not https, so we need a mutli line block

from helm-charts.

dwerder avatar dwerder commented on May 25, 2024

When people argue with "most people", I am always interested in getting the link to a statistic or real evidence ;-)

Beside that. I tried your approch and it works for me.

values.yaml:

secret:
  create: true
  data:
    identity: |
      SSH__PRIVATE_KEY
      asdfasdfasdf
    identity.pub: |
      SSH__PUBLIC_KEY
      22222
      4444444
    known_hosts: "GITHUB_KNOWN_HOSTS_ENTRY"

Results in:

data:
  identity: U1NIX19QUklWQVRFX0tFWQphc2RmYXNkZmFzZGYK
  identity.pub: U1NIX19QVUJMSUNfS0VZCjIyMjIyCjQ0NDQ0NDQK
  known_hosts: R0lUSFVCX0tOT1dOX0hPU1RTX0VOVFJZ

Which can be decoded to:

echo "U1NIX19QUklWQVRFX0tFWQphc2RmYXNkZmFzZGYK" | base64 -d
SSH__PRIVATE_KEY
asdfasdfasdf

So it works, I understand that you suggest an "examples" section, which would be a good idea. And we could start with the two examples mentioned here.

from helm-charts.

stefanprodan avatar stefanprodan commented on May 25, 2024

When people argue with "most people", I am always interested in getting the link to a statistic or real evidence

Given that Flux v1 supported only SSH for years and Flux v2 flux bootstrap defaults to SSH deploy keys, I think “most people” is accurate. As for statistics, Flux is a CNCF project and we no longer collect stats from people’s clusters, but we used to do that for v1 and SSH was used by almost everyone.

from helm-charts.

dwerder avatar dwerder commented on May 25, 2024

@stefanprodan Thanks for the information.
@throwawayaccount0153 Do I get it right, that it works, but you suggest to have an examlpe in the repo? (so its not actual bug)

from helm-charts.

throwawayaccount0153 avatar throwawayaccount0153 commented on May 25, 2024

@dwerder you are correct, it works, though via the mechanism I'm executing helm, via terraform, it turns out I needed to wrap these particular values in an indent(6, KEY) function in order to get it to work properly. otherwise outside of terraform this works just as we've tested. Yes, it would be nice to have an example, although a piped multiline value is standard helm so technically we'd be doubling helm documentation, but it would be nice for a quick reference for people who don't want to go search through helm documentation, they could just refer to an example solution here in a commented out block in the values file

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.