This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
mgoodness
commented
Oct 1, 2020
- Adds annotations from template to rendered Applications
- Makes cluster annotations available for templating (Closes Add support to metadata.annotations in the template #31)
Signed-off-by: Michael Goodness <michael.goodness@mlb.com>
…ting Signed-off-by: Michael Goodness <michael.goodness@mlb.com>
Signed-off-by: Michael Goodness <michael.goodness@mlb.com>
Would it be feasible to add a small unit test just to ensure we keep it working? It looks relatively straightforward to add in to cluster_test.go. If time is an issue we can merge and add later. |
OmerKahani
suggested changes
Oct 2, 2020
pkg/generators/cluster.go
Outdated
@@ -65,9 +64,12 @@ func (g *ClusterGenerator) GenerateParams( | |||
|
|||
res := make([]map[string]string, len(clusterSecretList.Items)) | |||
for i, cluster := range clusterSecretList.Items { | |||
params := make(map[string]string, len(cluster.ObjectMeta.Labels) + 2) | |||
params := make(map[string]string, len(cluster.ObjectMeta.Labels)+2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the length of the map should be: len(cluster.ObjectMeta.Labels) + len(cluster.ObjectMeta.Annotations) + 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
Signed-off-by: Michael Goodness <michael.goodness@mlb.com>
Signed-off-by: Michael Goodness <michael.goodness@mlb.com>
OmerKahani
approved these changes
Nov 1, 2020
xianlubird
approved these changes
Nov 11, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.