Skip to content

added default value to helm chart values for customPricing.costModel.discount - #381

Open
sof2000 wants to merge 1 commit into
opencost:mainfrom
sof2000:helm-value
Open

added default value to helm chart values for customPricing.costModel.discount#381
sof2000 wants to merge 1 commit into
opencost:mainfrom
sof2000:helm-value

Conversation

@sof2000

@sof2000 sof2000 commented Aug 27, 2026

Copy link
Copy Markdown

Closes: #380
Added default helm value for "customPricing.costModel.discount" at charts/opencost/values.yaml.

Application has logic that use this value as AWS discount which can be used to adjust k8s resources cost. It's just not exposed in values.yaml.

	c, err := aws.Config.GetCustomPricingData()
	if err != nil {
		return nil, err
	}
	if c.Discount == "" {
		c.Discount = "0%"
	}
	if c.NegotiatedDiscount == "" {
		c.NegotiatedDiscount = "0%"
	}

	return c, nil
}

Application code link: https://github.com/opencost/opencost/blob/e977d842ed2ae977726f29637061df0bac352ac6/pkg/cloud/aws/provider.go#L483

Helm values link:

Values example:

customPricing:
    costModel:
      discount: ""

Signed-off-by: Andrii Derevianko <sof2025@gmail.com>
@sof2000 sof2000 changed the title added default value to helm chart values for customPricing.costModel.discount Closes #380; added default value to helm chart values for customPricing.costModel.discount Aug 27, 2026
@sof2000 sof2000 changed the title Closes #380; added default value to helm chart values for customPricing.costModel.discount added default value to helm chart values for customPricing.costModel.discount Aug 27, 2026
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.

add default value to helm chart values for customPricing.costModel.discount

1 participant