Git Product home page Git Product logo

Comments (15)

MadsNielsen avatar MadsNielsen commented on July 18, 2024 1

@ewelinawilkosz @ndeloof I think this a good one to start with. I'll start working on this tomorrow.

For the simple version, let's support URI's that can either be a file (locally), or some statically served file (I.E a gist). That should support most usecases i can re-use much from the implementation on Praqma's fork.

from configuration-as-code-plugin.

MadsNielsen avatar MadsNielsen commented on July 18, 2024 1

@ndeloof and @daniel-beck Ok. Let's do this then.

  1. We scrap http and https support.
  2. We instead take a path, it can either be a single file or a folder.
  3. In case of a folder we scan for all .yml|.yaml files in folder and return those to be configured. In case of a file just return that.

Sounds ok?

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

I think it makes perfect sense.

from configuration-as-code-plugin.

ewelinawilkosz avatar ewelinawilkosz commented on July 18, 2024

there are two options then - merge changes from praqma/dev or reimplement manually
for now we want to support with env variable:

  1. location on disk
  2. location in git repository - raw file, or different solution, we can discuss it

in the future we can extend possible locations

from configuration-as-code-plugin.

daniel-beck avatar daniel-beck commented on July 18, 2024

Could we please get this right from the start and at least reject plain HTTP URLs?

from configuration-as-code-plugin.

MadsNielsen avatar MadsNielsen commented on July 18, 2024

@daniel-beck Sure no problem :)

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

I'm not a big fan enforcing https. This would make test/demo environment harder to setup, and for internal use I would expect many user will use plain old http.

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

If we focus on security, I would expect configuration to be stored as a k8s ConfigMap / docker Config / some comparable "injected" content. This "pull" approach is just for basic usage

from configuration-as-code-plugin.

MadsNielsen avatar MadsNielsen commented on July 18, 2024

@daniel-beck and @ndeloof Would a better approach to write some warning if you do use HTTP? Like a statement about that this should not be used in production?

I reckon im mostly gonna be use the path part of this feature, to start c-as-c with a configuration file outside my dev environment.

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

Then maybe we just don't need http* support and should avoid introducing it here.
Also, if we consider the other feature request to have multiple yaml files, better for this variable to point to a configuration folder.

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

see #34

from configuration-as-code-plugin.

MadsNielsen avatar MadsNielsen commented on July 18, 2024

Right i added my stuff for this to work with a very simple test. The big picture case in #34 is a superset of this task. I'll need to look up how k8 config maps etc work before i start comming up with suggestions on how this can be handled in a more generic and extensible way. But for now, it should be outside scope of this case :)

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

docker config = a tmpfs folder mounted inside container:

docker run --config source=jenkins-config,target=/config/jenkins.yml ...

container can then read configuration from /config/jenkins.yaml

k8s config has more option, simplest for us is a volume mount (same as docker)

  containers:
    - name: jenkins
      volumeMounts:
      - name: jenkins-config
        mountPath: /config
  volumes:
    - name: jenkins-config
      configMap:
        name: jenkins-config

from configuration-as-code-plugin.

daniel-beck avatar daniel-beck commented on July 18, 2024

Thanks @ndeloof and @MadsNielsen !

from configuration-as-code-plugin.

MadsNielsen avatar MadsNielsen commented on July 18, 2024

Closing this issue PR merged and accepted

from configuration-as-code-plugin.

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.