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

Yaml Comments #2165

Open
Alwin-Stockinger opened this issue Feb 12, 2024 · 1 comment
Open

Yaml Comments #2165

Alwin-Stockinger opened this issue Feb 12, 2024 · 1 comment
Labels
@component/cdk8s-core Issue related to cdk8s-core effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :)

Comments

@Alwin-Stockinger
Copy link

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 🚀 Feature Request

@Alwin-Stockinger Alwin-Stockinger added feature-request New/Enhanced functionality wanted needs-triage Priority and effort undetermined yet labels Feb 12, 2024
@srgvg
Copy link

srgvg commented Feb 12, 2024

I can confirm this would be a use case for Flux Image Automation.

That is, assuming cdk8s generated yaml is committed to a git repository, which then gets update by Flux.

However, I'm not sure how the workflow would go further from there. When an update is made via cdk8s, how would the last Flux committed change be preserved?

In this sense, this feels like an anti-pattern to me, but that's unrelated to the validity of this feature request.

@iliapolo iliapolo added effort/large 1+ weeks priority/p2 Dependent on community feedback. PR's are welcome :) and removed needs-triage Priority and effort undetermined yet labels Jun 2, 2024
@iliapolo iliapolo transferred this issue from cdk8s-team/cdk8s Jun 2, 2024
@iliapolo iliapolo added the @component/cdk8s-core Issue related to cdk8s-core label Sep 20, 2024
@iliapolo iliapolo transferred this issue from cdk8s-team/cdk8s-core Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@component/cdk8s-core Issue related to cdk8s-core effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :)
Projects
None yet
Development

No branches or pull requests

3 participants