Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crd spec to values.yaml #68

Open
zalsader opened this issue Jan 14, 2023 · 0 comments
Open

Add crd spec to values.yaml #68

zalsader opened this issue Jan 14, 2023 · 0 comments

Comments

@zalsader
Copy link
Contributor

If my yaml file contains an object that is created by a CRD in the same file, it would be nice to add the spec to that object in values.yaml. Alternatively, #67 could be used and the user would have to do it manually.

Here's an example input:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
spec:
  names:
    kind: FooBar
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
          spec:
            properties:
              baz:
                type: boolean
...
---
...
kind: FooBar
metadata:
  name: my-foo-bar
spec:
  baz: true

Desired <chart>/templates/my-foo-bar.yaml:

...
kind: FooBar
metadata:
  name: my-foo-bar
spec:
{{ toYaml .Values.myFooBarSpec | indent 2 }}

Desired <chart>/values.yaml:

...
myFooBarSpec:
  baz: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant