Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Nifi chart has no stable UUID in flow.xml in the ConfigMap #300

Open
lucasfcnunes opened this issue Jun 6, 2023 · 3 comments
Open

Nifi chart has no stable UUID in flow.xml in the ConfigMap #300

lucasfcnunes opened this issue Jun 6, 2023 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lucasfcnunes
Copy link

I expected a stable apply/sync of the chart. The down side is that it creates lots of unnecessary revisions.

Diff (helmfile diff):
image
Template (it's caused by {{ default uuidv4 }} not having a stable result):
image

Thanks!
cetic/helm-charts#6

@banzo
Copy link
Contributor

banzo commented Jun 13, 2023

Would setting the uuids as chart values fix the issue?

Related discussion bits here: https://stackoverflow.com/questions/66143201/reuse-uuid-in-helm-charts

@banzo banzo added bug Something isn't working help wanted Extra attention is needed labels Jun 13, 2023
@lucasfcnunes
Copy link
Author

Would setting the uuids as chart values fix the issue?

Related discussion bits here: https://stackoverflow.com/questions/66143201/reuse-uuid-in-helm-charts

Yes. It would.
At the first apply the uuid would be generated. At the second time it would be regenerated if you didn't set a uuid on your values.

Is helm capable of doing this process automatically (without setting it at values level)?

@lucasfcnunes
Copy link
Author

@banzo

This pattern could work!

{{/* Define the secrets */}}
{{- define "kutt.secrets" -}}
---

apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: kutt-secrets
{{- $kuttprevious := lookup "v1" "Secret" .Release.Namespace "kutt-secrets" }}
{{- $jwt_secret := "" }}
data:
  {{- if $kuttprevious}}
  JWT_SECRET: {{ index $kuttprevious.data "JWT_SECRET" }}
  {{- else }}
  {{- $jwt_secret := randAlphaNum 32 }}
  JWT_SECRET: {{ $jwt_secret | b64enc }}
  {{- end }}

{{- end -}}

Source:
https://github.com/truecharts/charts/blob/2bc5a5656ac62b5078b07360c7ccc4f47c76022e/charts/incubator/kutt/templates/_secrets.tpl#L10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants