Dynamically Setting Timestamps in YAML Manifests with Flux Kustomize #4897
Unanswered
vijayansarathy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Everyone.
I am trying to come up with a solution for dynamically setting the value of a field in a Kubernetes manifest to the timestamp at which Flux Kustomize deploys that manifest. So, I was thinking of doing something like this.
First create a ConfigMap as follows:
Then, I can define the variable
${deployTimestamp}
in K8s manifests that are built by the Flux Kustomize pipeline. Kustomize can then reference this ConfigMap under.spec.postBuild
, as shown below, to perform post-build variable substitution on such manifests.The ConfigMap itself is processed and deployed by the Flux Kustomize pipeline.
The question is how do I dynamically set the value of
deployTimestamp
field at build time?Is there a better solution for doing what I am trying to do?
Beta Was this translation helpful? Give feedback.
All reactions