Skip to content

Validate that helm chart values exist#138

Merged
patrykkulik-microsoft merged 5 commits intomainfrom
pk5/default_values_story
Jan 30, 2024
Merged

Validate that helm chart values exist#138
patrykkulik-microsoft merged 5 commits intomainfrom
pk5/default_values_story

Conversation

@patrykkulik-microsoft
Copy link
Copy Markdown
Collaborator

This PR is for https://dev.azure.com/msazuredev/AzureForOperators/_sprints/taskboard/Turtle/AzureForOperators/Germanium/CY24Q1/2Wk/2Wk09%20(Jan%2014%20-%20Jan%2027)?workitem=1085390

This story is to make sure that :

  1. whenever the user provided default_values parameter for the helm chart, we use it preferentially over the values.yaml in the chart itself. - as far as I can tell we have already been doing this everywhere other than creating a schema. I fixed this.
  2. we mandate that either a values.yaml exists or a default_values parameter is provided. This was mostly done in our repo in the get_defaults() method. Problem was that this method was called after validation of the helm template. Unfortunately, in the case where the values.yaml file is missing, the helm template command does not provide a particularly good error. I moved some logic around to add a new function to make sure that a value.yaml or default_values exist. Otherwise, it will throw a useful error.
  3. Added some unit tests to test this functionality.  

@patrykkulik-microsoft patrykkulik-microsoft merged commit 02df460 into main Jan 30, 2024
@patrykkulik-microsoft patrykkulik-microsoft deleted the pk5/default_values_story branch January 30, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants