Azure / orkestra

Orkestra is a cloud-native release orchestration and lifecycle management (LCM) platform for the fine-grained orchestration of inter-dependent helm charts and their dependencies
https://azure.github.io/orkestra
Other
104 stars 16 forks source link

Generate a unique prefix instead of initials when naming subcharts being pushed to the staging registry #262

Closed nitishm closed 3 years ago

nitishm commented 3 years ago

We need to generate a unique prefix instead of using the initials when pushing charts to the staging registry. The original reason for doing this was to prevent overwriting the subcharts of one application with the subcharts of another.

The other option is to use the chart version in which case overwriting wouldn't cause any damage as the two charts would (ideally) be the same

__Originally posted by @nitishm in https://github.com/Azure/orkestra/pull/247#discussion_r635433686__

nitishm commented 3 years ago

Let's prioritize this since we could have conflicts when two or more applications start have the same intials.

/cc @jonathan-innis

nitishm commented 3 years ago

Good issue for newcomers looking to contribute in Go

mahalrs commented 3 years ago

@nitishm I will work on this.

I think ToInitials() is being used to name subcharts when pushing to the staging registry. So, we want to update reconcileApplications() to use unique prefix instead of initials. Also, I'm not sure if we need to update generateSubchartHelmRelease() because it is also using ToInitials to name charts.

nitishm commented 3 years ago

I think both will need the up date. You can refactor the method but we will need to generate the uuid using the name of the application rather than a random number. So something like a hash of the name?!