Skip to content

use of a scripting language #438

@errordeveloper

Description

@errordeveloper

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions