Skip to content

Support for declaring entire resources inline in kustomization.yaml? #5905

Open
@shapirus

Description

@shapirus

Eschewed features

  • This issue is not requesting templating, unstuctured edits, build-time side-effects from args or env vars, or any other eschewed feature.

What would you like to have added?

Just like the support for patches and some other things, it would be nice if kustomize supported declaring entire resources inline.

Why is this needed?

Use case: generating manifests using automation tools (e.g. terraform) without humans ever having to touch the output. It's easier and more convenient to write the generator code to put everything in one file rather than having to deal with multiple files (minimum: kustomization.yaml plus one with resources) with path references in kustomization.yaml.

Example:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

inlineResources:
- |-
  apiVersion: v1
  kind: Namespace
  metadata:
    name: foo
- |-
  apiVersion: v1
  kind: Namespace
  metadata:
    name: bar

Can you accomplish the motivating task without this feature, and if so, how?

n/a

What other solutions have you considered?

n/a

Anything else we should know?

No response

Feature ownership

  • I am interested in contributing this feature myself! 🎉

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions