cdk8s-core
cdk8s-core copied to clipboard
Yaml Comments
Description of the feature or enhancement:
Make it possible to set comments that are rendered to specific yaml fields, something like:
metadata: {
name: "awesome-deployment",
nameComment: "This is an awesome deployment"
}
should output
metadata:
name: "awesome-deployment" #This is an awesome deployment
Use Case:
Flux has a feature that allows you to automate image update. To enable this you have to mark the field with a yaml comment e.g.
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
namespace: default
spec:
values:
image:
repository: ghcr.io/stefanprodan/podinfo # {"$imagepolicy": "flux-system:podinfo:name"}
tag: 5.0.0 # {"$imagepolicy": "flux-system:podinfo:tag"}
See https://fluxcd.io/flux/guides/image-update/#configure-image-update-for-custom-resources for explanation
Proposed Solution:
Something like mentioned above in the description.
This is a :rocket: Feature Request