Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ One of `yamlField` or `regex` is required.
| Field | Type | Description | Required |
|-|-|-|-|
| releaseName | string | The release name of helm deployment. By default, the release name is equal to the application name. | No |
| setValues | map[string]string | List of values. | No |
| valueFiles | []string | List of value files should be loaded. Only local files stored under the application directory or remote files served at the http(s) endpoint are allowed. | No |
| setFiles | map[string]string | List of file path for values. | No |
| apiVersions | []string | Kubernetes api versions used for Capabilities.APIVersions. | No |
Expand Down
12 changes: 12 additions & 0 deletions pkg/app/piped/platformprovider/kubernetes/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (h *Helm) TemplateLocalChart(ctx context.Context, appName, appDir, namespac
}

if opts != nil {
for k, v := range opts.SetValues {
args = append(args, "--set", fmt.Sprintf("%s=%s", k, v))
}
for _, v := range opts.ValueFiles {
if err := verifyHelmValueFilePath(appDir, v); err != nil {
h.logger.Error("failed to verify values file path", zap.Error(err))
Expand Down Expand Up @@ -163,6 +166,9 @@ func (h *Helm) TemplateRemoteChart(ctx context.Context, appName, appDir, namespa
}

if opts != nil {
for k, v := range opts.SetValues {
args = append(args, "--set", fmt.Sprintf("%s=%s", k, v))
}
for _, v := range opts.ValueFiles {
if err := verifyHelmValueFilePath(appDir, v); err != nil {
h.logger.Error("failed to verify values file path", zap.Error(err))
Expand Down Expand Up @@ -292,6 +298,9 @@ func (h *Helm) UpgradeLocalChart(ctx context.Context, appName, appDir, namespace
}

if opts != nil {
for k, v := range opts.SetValues {
args = append(args, "--set", fmt.Sprintf("%s=%s", k, v))
}
for _, v := range opts.ValueFiles {
if err := verifyHelmValueFilePath(appDir, v); err != nil {
h.logger.Error("failed to verify values file path", zap.Error(err))
Expand Down Expand Up @@ -365,6 +374,9 @@ func (h *Helm) UpgradeRemoteChart(ctx context.Context, appName, appDir, namespac
}

if opts != nil {
for k, v := range opts.SetValues {
args = append(args, "--set", fmt.Sprintf("%s=%s", k, v))
}
for _, v := range opts.ValueFiles {
if err := verifyHelmValueFilePath(appDir, v); err != nil {
h.logger.Error("failed to verify values file path", zap.Error(err))
Expand Down
4 changes: 3 additions & 1 deletion pkg/config/application_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ type InputHelmOptions struct {
// The release name of helm deployment.
// By default the release name is equal to the application name.
ReleaseName string `json:"releaseName"`
// List of values.
SetValues map[string]string `json:"setValues"`
// List of value files should be loaded.
ValueFiles []string `json:"valueFiles"`
// List of file path for values.
SetFiles map[string]string
SetFiles map[string]string `json:"setFiles"`
// Set of supported Kubernetes API versions.
APIVersions []string `json:"apiVersions"`
// Kubernetes version used for Capabilities.KubeVersion
Expand Down