Skip to main content

Helm-chart

TypeComponent

Parameters

Parameter
Type
Required
DefaultDescription
chartstringYes

Chart is the name or path the Helm chart is available at in the SourceRef.

intervalstringYes

Interval at which the HelmChart SourceRef is checked for updates. This interval is approximate and may be subject to jitter to ensure efficient use of resources.

sourceRefobjectYes

SourceRef is the reference to the Source the chart is available at.

annotationsmapNo

Annotations for the workload

ignoreMissingValuesFilesbooleanNo

IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing.

labelsmapNo

Labels for the workload

reconcileStrategystringNo

"ChartVersion"

ReconcileStrategy determines what enables the creation of a new artifact. Valid values are ('ChartVersion', 'Revision'). See the documentation of the values for an explanation on their behavior. Defaults to ChartVersion when omitted.

suspendbooleanNo

Suspend tells the controller to suspend the reconciliation of this source.

valuesFilesarrayNo

ValuesFiles is an alternative list of values files to use as the chart values (values.yaml is not included by default), expected to be a relative path in the SourceRef. Values files are merged in the order of this list with the last file overriding the first. Ignored when omitted.

verifyobjectNo

Verify contains the secret name containing the trusted public keys used to verify the signature and specifies which provider to use to check whether OCI image is authentic. This field is only supported when using HelmRepository source with spec.type 'oci'. Chart dependencies, which are not bundled in the umbrella chart artifact, are not verified.

versionstringNo

"*"

Version is the chart version semver expression, ignored for charts from GitRepository and Bucket sources. Defaults to latest when omitted.

Template

The following tabs display the definition's Cue template and the rendered YAML. The rendered YAML is the output of the Cue template when the definition is applied to a cluster.

helmchart: {
type: "component"
description: "HelmChart is the Schema for the helmcharts API."
labels: {
"componentdefinition.spectrocloud.com/type": "application"
"wl.spectrocloud.com/provider": "source.toolkit.fluxcd.io"
"definition.spectrocloud.com/category": "Flux"
}
attributes: {
status: {
healthPolicy: {
ready: {
readyCondition: *false | bool
} & {
if context.output.status.conditions != _|_ {
for condition in context.output.status.conditions {
if condition.type == "Ready" && condition.status == "True" {
readyCondition: true
}
}
}
}
_isHealth: ready.readyCondition
isHealth: *_isHealth | bool
if context.output.metadata.annotations != _|_ {
if context.output.metadata.annotations["wl.spectrocloud.com/disable-health-check"] != _|_ {
isHealth: true
}
}
}
}
}
}

template: {
output: {
apiVersion: "source.toolkit.fluxcd.io/v1"
kind: "HelmChart"
metadata: {
labels: {
if parameter.labels != _|_ {
parameter.labels
}
"wl.spectrocloud.com/name": context.workloadName
"wl.spectrocloud.com/component": context.name
}
if parameter.annotations != _|_ {
annotations: parameter.annotations
}
}
spec: {
chart: parameter.chart
if parameter.ignoreMissingValuesFiles != _|_ {
ignoreMissingValuesFiles: parameter.ignoreMissingValuesFiles
}
interval: parameter.interval
if parameter.reconcileStrategy != _|_ {
reconcileStrategy: parameter.reconcileStrategy
}
sourceRef: parameter.sourceRef
if parameter.suspend != _|_ {
suspend: parameter.suspend
}
if parameter.valuesFiles != _|_ {
valuesFiles: parameter.valuesFiles
}
if parameter.verify != _|_ {
verify: parameter.verify
}
if parameter.version != _|_ {
version: parameter.version
}
}
}

parameter: {
// +usage=Annotations for the workload
annotations?: [string]: string

// +usage=Labels for the workload
labels?: [string]: string

// +usage=Chart is the name or path the Helm chart is available at in the SourceRef.
chart: string

// +usage=IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing.
ignoreMissingValuesFiles?: bool

// +usage=Interval at which the HelmChart SourceRef is checked for updates. This interval is approximate and may be subject to jitter to ensure efficient use of resources.
interval: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"

// +usage=ReconcileStrategy determines what enables the creation of a new artifact. Valid values are ('ChartVersion', 'Revision'). See the documentation of the values for an explanation on their behavior. Defaults to ChartVersion when omitted.
reconcileStrategy?: *"ChartVersion" | "Revision"

// +usage=SourceRef is the reference to the Source the chart is available at.
sourceRef: {

// +usage=APIVersion of the referent.
apiVersion?: string

// +usage=Kind of the referent, valid values are ('HelmRepository', 'GitRepository', 'Bucket').
kind: *"HelmRepository" | "GitRepository" | "Bucket"

// +usage=Name of the referent.
name: string
}

// +usage=Suspend tells the controller to suspend the reconciliation of this source.
suspend?: bool

// +usage=ValuesFiles is an alternative list of values files to use as the chart values (values.yaml is not included by default), expected to be a relative path in the SourceRef. Values files are merged in the order of this list with the last file overriding the first. Ignored when omitted.
valuesFiles?: [...string]

// +usage=Verify contains the secret name containing the trusted public keys used to verify the signature and specifies which provider to use to check whether OCI image is authentic. This field is only supported when using HelmRepository source with spec.type 'oci'. Chart dependencies, which are not bundled in the umbrella chart artifact, are not verified.
verify?: {

// +usage=MatchOIDCIdentity specifies the identity matching criteria to use while verifying an OCI artifact which was signed using Cosign keyless signing. The artifact's identity is deemed to be verified if any of the specified matchers match against the identity.
matchOIDCIdentity?: [...{

// +usage=Issuer specifies the regex pattern to match against to verify the OIDC issuer in the Fulcio certificate. The pattern must be a valid Go regular expression.
issuer: string

// +usage=Subject specifies the regex pattern to match against to verify the identity subject in the Fulcio certificate. The pattern must be a valid Go regular expression.
subject: string
}]

// +usage=Provider specifies the technology used to sign the OCI Artifact.
provider: *"cosign" | "notation"

// +usage=SecretRef specifies the Kubernetes Secret containing the trusted public keys.
secretRef?: {

// +usage=Name of the referent.
name: string
}
}

// +usage=Version is the chart version semver expression, ignored for charts from GitRepository and Bucket sources. Defaults to latest when omitted.
version?: *"*" | string
}
}