Open samiyaakhtar opened 5 years ago
It seems there are two ways straightforward to do this:
A helm chart can have a replacement variable for the annotations. Then one can call fab set
to change the helm chart replacement variable. This creates a requirement that the Helm chart creator to provide hooks for annotations on each Kubernetes object.
Alternatively annotations can be added to all Kubernetes objects outside of the Helm templating process. Fabrikate could provide a command on a subcomponent/environment that lets you specify a collection of key/values to set at annotations. Fabrikate could determine if annotations already exist and handle appending additional key/values and avoiding duplicates.
Does that sound right?
In the 2nd case perhaps you can define the key values in a config file
subcomponents: my-subcompnent-app: annotations: bedrock/releaseUrl: (REPLACE ME DYNAMICALLY) bedrock/triggeredBy: (REPLACE ME DYNAMICALLY) ... config: image: tag: "20190402.3" replicaCount: "3"
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: my-app annotations: bedrock/releaseUrl: "https://dev.azure.com/abrig/efd47cfd-d35f-40ba-b424-e1ab432fdc68/_release?releaseId=37" bedrock/triggeredBy: "Andre Briggs" ...
Related to #314
As an operator: I'd like to see additional annotations for metadata such as the commit and author that triggered the yaml generation, for example. There's a lot of data that is available in Azure pipelines which we can leverage for better auditing.
Describe the solution you'd like: A possible way to do this is to add comments with author information in the generated yaml as part of the
fab set
command, this will need some investigation into whether it's possible with the existingfab set
command.