gitness
gitness copied to clipboard
Configure Allowed-List of platforms, pipelines and nodes
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.
I'm literally in the middle of building a validate
plugin to do just this. Would love to see it natively supported.
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?
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
Generally I like hcl, but with libs like viper this config could get nearly any format.
store in database is more useful without service restarting.
Storing in the database is a pain for devops... Makes infra as code more complicated.