-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Would maintainers consider supporting a scripting language, e.g. Skylark, as a way to provide user with an ability to implement custom generators and transforms?
Here is an example:
# kustomisations.yaml
resources:
- deployment.yaml
scripts:
- include.py
call:
- doGenerateMyObject(1)
- doZeroTransform()
# include.py
def doGenerateMyObject(param):
return {
'kind': 'MyObject',
'apiVersion': 'examples.k8s.io/v1',
'spec': { 'param': param },
}
def doZeroTransform(input):
return input
This example is just a simplest thing I could think of, I'm not saying this is essential to a CRD use-case or anything else.
At this point, all wondering about is whether kustomize authors may support these sort of things in the future or it's considered too harmful?
From my point of view, it seems like at one point users will need all sort of things built-in, and having to add any arbitrary thing upstream won't make sense. Ultimately, being able to leverage a full-blown language helps, and as long as the execution environment is sandboxed, it's ought to be possible to provide certain basic guarantees.