Giter Site home page Giter Site logo

Comments (5)

minhoryang avatar minhoryang commented on May 18, 2024 1

This is my first attempt of using a golang on production. so my question would be quite silly for maintainers.

I'm getting a circular import error between agent/pkg/crane/config/secret.go and agent/pkg/crane/k8s/secret.go during

  • Create new type in a similar way for achieving similar effects using secrets into crane ConfigFromSecret pkg/crane/config/secret.go
  • The new type setter in crane expects a string (namespace), from env variable: NAMESPACE - also new.
  • In the setter
    • If namespace not provided, attempt to use the dyrectorio namespace
    • GetSecretClient function can be reused from k8s package - expose it
    • Load secret value

What about moving all ConfigFromSecret related codes to agent/cmd/crane/secret.go?

from dyrectorio.

nandor-magyar avatar nandor-magyar commented on May 18, 2024 1

There is nothing silly about asking questions, the most efficient way would be if you could open a draft PR with the changes you have already.
Moving into the cmd directory is not really preferred if it used elsewhere in under pkg, but isolating the common part is the right approach. 👍

from dyrectorio.

minhoryang avatar minhoryang commented on May 18, 2024

Hello @nandor-magyar , I'm interested in this issue.

During the initial investigation of below todo, I have no idea that how to save the output from initContainer's stdout to k8s opaque secret in yaml form.

  1. Save the output to a k8s opaque secret

Do I need to store it directly through the Kube API? or Call kubectl create on Makefile?

from dyrectorio.

minhoryang avatar minhoryang commented on May 18, 2024

The new type setter in crane expects a string (namespace), from env variable: NAMESPACE - also new.

Oh, maybe I need to implement it as first way ("directly through the Kube API" in crane itself.)

from dyrectorio.

nandor-magyar avatar nandor-magyar commented on May 18, 2024

Correct. You can use crane's functions, though I would assume you won't need much of the code, only a secret client that is mentioned in the issue.

from dyrectorio.

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.