Skip to content

feat: #704: process template variables in profile values #789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2022

Conversation

jmickey
Copy link
Contributor

@jmickey jmickey commented May 18, 2022

This change allows users to use template variables within profile values. WGE will decode and render the variables before parsing them into the profile HelmRelease.

Closes #704

@jmickey jmickey self-assigned this May 18, 2022
@jmickey jmickey added the enhancement New feature or request label May 18, 2022
@jmickey jmickey force-pushed the feat/704-template-values branch 5 times, most recently from e98d22a to ae98aca Compare May 18, 2022 15:59
@jmickey jmickey force-pushed the feat/704-template-values branch from ae98aca to 293eb07 Compare May 19, 2022 14:42
Copy link
Collaborator

@foot foot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean ✨ , LGTM.

@@ -492,7 +493,7 @@ func createProfileYAML(helmRepo *sourcev1.HelmRepository, helmReleases []*helmv2
// profileValues is what the client will provide to the API.
// It may have > 1 and its values parameter may be empty.
// Assumption: each profile should have a values.yaml that we can treat as the default.
func generateProfileFiles(ctx context.Context, helmRepoName, helmRepoNamespace, helmRepositoryCacheDir, clusterName string, kubeClient client.Client, profileValues []*capiv1_proto.ProfileValues) (*gitprovider.CommitFile, error) {
func generateProfileFiles(ctx context.Context, helmRepoName, helmRepoNamespace, helmRepositoryCacheDir, clusterName string, kubeClient client.Client, profileValues []*capiv1_proto.ProfileValues, parameterValues map[string]string) (*gitprovider.CommitFile, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have to address this here, but this arg list is getting very long innit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think as part of getting rid of the deep viper calls, we'll get structs of config, which will simplify this.

@jmickey jmickey merged commit ff9dae0 into main May 20, 2022
@jmickey jmickey deleted the feat/704-template-values branch May 20, 2022 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template Helm Chart Values for Profiles
3 participants