gitness icon indicating copy to clipboard operation
gitness copied to clipboard

Configure Allowed-List of platforms, pipelines and nodes

Open bradrydzewski opened this issue 4 years ago • 6 comments

We should have a global option to provide an allowed list of platforms (os, arch), kinds of pipelines (docker, kubernetes, etc) and the node labels. If a manifest tries and uses values not in the allowed-list the pipeline can fail.

This prevents a situation where a user defines criteria in a manifest that we know will never have a matching runner, and will therefore sit in a pending state indefinitely.

bradrydzewski avatar Dec 16 '19 22:12 bradrydzewski

I'm literally in the middle of building a validate plugin to do just this. Would love to see it natively supported.

mach6 avatar Dec 16 '19 22:12 mach6

I would be interested in how we might configure this. It is too complex for environment variables so we would probably need to define the rules in an external file. Any ideas on what the configuration file format might look like?

bradrydzewski avatar Dec 16 '19 22:12 bradrydzewski

Yes, I think an external config file makes sense. How about modeling using Constraint object(s)?

E.g. something like;

pipeline:
  type:
    include:
    - docker
    - kubernetes

platform:
  os: 
    exclude:
    - windows

mach6 avatar Dec 16 '19 23:12 mach6

Generally I like hcl, but with libs like viper this config could get nearly any format.

tboerger avatar Dec 17 '19 15:12 tboerger

store in database is more useful without service restarting.

renothing avatar Jan 15 '20 06:01 renothing

Storing in the database is a pain for devops... Makes infra as code more complicated.

tboerger avatar Jan 15 '20 19:01 tboerger