1package v2
2
3import (
4 "strings"
5 "time"
6)
7
8// HelmRelease is the Schema for the helmreleases API
9#HelmRelease: {
10 _embeddedResource
11
12 // APIVersion defines the versioned schema of this representation of an object.
13 // Servers should convert recognized schemas to the latest internal value, and
14 // may reject unrecognized values.
15 // More info:
16 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
17 apiVersion?: string
18
19 // Kind is a string value representing the REST resource this object represents.
20 // Servers may infer this from the endpoint the client submits requests to.
21 // Cannot be updated.
22 // In CamelCase.
23 // More info:
24 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
25 kind?: string
26 metadata?: {}
27
28 // HelmReleaseSpec defines the desired state of a Helm release.
29 spec?: {
30 // Chart defines the template of the v1.HelmChart that should be created
31 // for this HelmRelease.
32 chart?: {
33 // ObjectMeta holds the template for metadata like labels and annotations.
34 metadata?: {
35 // Annotations is an unstructured key value map stored with a resource that may be
36 // set by external tools to store and retrieve arbitrary metadata. They are not
37 // queryable and should be preserved when modifying objects.
38 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
39 annotations?: [string]: string
40
41 // Map of string keys and values that can be used to organize and categorize
42 // (scope and select) objects.
43 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
44 labels?: [string]: string
45 }
46
47 // Spec holds the template for the v1.HelmChartSpec for this HelmRelease.
48 spec!: {
49 // The name or path the Helm chart is available at in the SourceRef.
50 chart!: strings.MaxRunes(
51 2048,
52 ) & strings.MinRunes(
53 1,
54 )
55
56 // IgnoreMissingValuesFiles controls whether to silently ignore missing values
57 // files rather than failing.
58 ignoreMissingValuesFiles?: bool
59
60 // Interval at which to check the v1.Source for updates. Defaults to
61 // 'HelmReleaseSpec.Interval'.
62 interval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
63
64 // Determines what enables the creation of a new artifact. Valid values are
65 // ('ChartVersion', 'Revision').
66 // See the documentation of the values for an explanation on their behavior.
67 // Defaults to ChartVersion when omitted.
68 reconcileStrategy?: "ChartVersion" | "Revision"
69
70 // The name and namespace of the v1.Source the chart is available at.
71 sourceRef!: {
72 // APIVersion of the referent.
73 apiVersion?: string
74
75 // Kind of the referent.
76 kind!: "HelmRepository" | "GitRepository" | "Bucket"
77
78 // Name of the referent.
79 name!: strings.MaxRunes(
80 253,
81 ) & strings.MinRunes(
82 1,
83 )
84
85 // Namespace of the referent.
86 namespace?: strings.MaxRunes(
87 63,
88 ) & strings.MinRunes(
89 1,
90 )
91 }
92
93 // Alternative list of values files to use as the chart values (values.yaml
94 // is not included by default), expected to be a relative path in the SourceRef.
95 // Values files are merged in the order of this list with the last file overriding
96 // the first. Ignored when omitted.
97 valuesFiles?: [...string]
98
99 // Verify contains the secret name containing the trusted public keys
100 // used to verify the signature and specifies which provider to use to check
101 // whether OCI image is authentic.
102 // This field is only supported for OCI sources.
103 // Chart dependencies, which are not bundled in the umbrella chart artifact,
104 // are not verified.
105 verify?: {
106 // Provider specifies the technology used to sign the OCI Helm chart.
107 provider!: "cosign" | "notation"
108
109 // SecretRef specifies the Kubernetes Secret containing the
110 // trusted public keys.
111 secretRef?: {
112 // Name of the referent.
113 name!: string
114 }
115 }
116
117 // Version semver expression, ignored for charts from v1.GitRepository and
118 // v1beta2.Bucket sources. Defaults to latest when omitted.
119 version?: string
120 }
121 }
122
123 // ChartRef holds a reference to a source controller resource containing the
124 // Helm chart artifact.
125 chartRef?: {
126 // APIVersion of the referent.
127 apiVersion?: string
128
129 // Kind of the referent.
130 kind!: "OCIRepository" | "HelmChart" | "ExternalArtifact"
131
132 // Name of the referent.
133 name!: strings.MaxRunes(
134 253,
135 ) & strings.MinRunes(
136 1,
137 )
138
139 // Namespace of the referent, defaults to the namespace of the Kubernetes
140 // resource object that contains the reference.
141 namespace?: strings.MaxRunes(
142 63,
143 ) & strings.MinRunes(
144 1,
145 )
146 }
147
148 // CommonMetadata specifies the common labels and annotations that are
149 // applied to all resources. Any existing label or annotation will be
150 // overridden if its key matches a common one.
151 commonMetadata?: {
152 // Annotations to be added to the object's metadata.
153 annotations?: [string]: string
154
155 // Labels to be added to the object's metadata.
156 labels?: [string]: string
157 }
158
159 // DependsOn may contain a DependencyReference slice with
160 // references to HelmRelease resources that must be ready before this HelmRelease
161 // can be reconciled.
162 dependsOn?: [...{
163 // Name of the referent.
164 name!: string
165
166 // Namespace of the referent, defaults to the namespace of the resource
167 // object that contains the reference.
168 namespace?: string
169
170 // ReadyExpr is a CEL expression that can be used to assess the readiness
171 // of a dependency. When specified, the built-in readiness check
172 // is replaced by the logic defined in the CEL expression.
173 // To make the CEL expression additive to the built-in readiness check,
174 // the feature gate `AdditiveCELDependencyCheck` must be set to `true`.
175 readyExpr?: string
176 }]
177
178 // DriftDetection holds the configuration for detecting and handling
179 // differences between the manifest in the Helm storage and the resources
180 // currently existing in the cluster.
181 driftDetection?: {
182 // Ignore contains a list of rules for specifying which changes to ignore
183 // during diffing.
184 ignore?: [...{
185 // Paths is a list of JSON Pointer (RFC 6901) paths to be excluded from
186 // consideration in a Kubernetes object.
187 paths!: [...string]
188
189 // Target is a selector for specifying Kubernetes objects to which this
190 // rule applies.
191 // If Target is not set, the Paths will be ignored for all Kubernetes
192 // objects within the manifest of the Helm release.
193 target?: {
194 // AnnotationSelector is a string that follows the label selection expression
195 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
196 // It matches with the resource annotations.
197 annotationSelector?: string
198
199 // Group is the API group to select resources from.
200 // Together with Version and Kind it is capable of unambiguously identifying
201 // and/or selecting resources.
202 // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
203 group?: string
204
205 // Kind of the API Group to select resources from.
206 // Together with Group and Version it is capable of unambiguously
207 // identifying and/or selecting resources.
208 // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
209 kind?: string
210
211 // LabelSelector is a string that follows the label selection expression
212 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
213 // It matches with the resource labels.
214 labelSelector?: string
215
216 // Name to match resources with.
217 name?: string
218
219 // Namespace to select resources from.
220 namespace?: string
221
222 // Version of the API Group to select resources from.
223 // Together with Group and Kind it is capable of unambiguously identifying
224 // and/or selecting resources.
225 // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
226 version?: string
227 }
228 }]
229
230 // Mode defines how differences should be handled between the Helm manifest
231 // and the manifest currently applied to the cluster.
232 // If not explicitly set, it defaults to DiffModeDisabled.
233 mode?: "enabled" | "warn" | "disabled"
234 }
235
236 // HealthCheckExprs is a list of healthcheck expressions for evaluating the
237 // health of custom resources using Common Expression Language (CEL).
238 // The expressions are evaluated only when the specific Helm action
239 // taking place has wait enabled, i.e. DisableWait is false, and the
240 // 'poller' WaitStrategy is used.
241 healthCheckExprs?: [...{
242 // APIVersion of the custom resource under evaluation.
243 apiVersion!: string
244
245 // Current is the CEL expression that determines if the status
246 // of the custom resource has reached the desired state.
247 current!: string
248
249 // Failed is the CEL expression that determines if the status
250 // of the custom resource has failed to reach the desired state.
251 failed?: string
252
253 // InProgress is the CEL expression that determines if the status
254 // of the custom resource has not yet reached the desired state.
255 inProgress?: string
256
257 // Kind of the custom resource under evaluation.
258 kind?: string
259 }]
260
261 // Install holds the configuration for Helm install actions for this HelmRelease.
262 install?: {
263 // CRDs upgrade CRDs from the Helm Chart's crds directory according
264 // to the CRD upgrade policy provided here. Valid values are `Skip`,
265 // `Create` or `CreateReplace`. Default is `Create` and if omitted
266 // CRDs are installed but not updated.
267 //
268 // Skip: do neither install nor replace (update) any CRDs.
269 //
270 // Create: new CRDs are created, existing CRDs are neither updated nor deleted.
271 //
272 // CreateReplace: new CRDs are created, existing CRDs are updated (replaced)
273 // but not deleted.
274 //
275 // By default, CRDs are applied (installed) during Helm install action.
276 // With this option users can opt in to CRD replace existing CRDs on Helm
277 // install actions, which is not (yet) natively supported by Helm.
278 // https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
279 crds?: "Skip" | "Create" | "CreateReplace"
280
281 // CreateNamespace tells the Helm install action to create the
282 // HelmReleaseSpec.TargetNamespace if it does not exist yet.
283 // On uninstall, the namespace will not be garbage collected.
284 createNamespace?: bool
285
286 // DisableHooks prevents hooks from running during the Helm install action.
287 disableHooks?: bool
288
289 // DisableOpenAPIValidation prevents the Helm install action from validating
290 // rendered templates against the Kubernetes OpenAPI Schema.
291 disableOpenAPIValidation?: bool
292
293 // DisableSchemaValidation prevents the Helm install action from validating
294 // the values against the JSON Schema.
295 disableSchemaValidation?: bool
296
297 // DisableTakeOwnership disables taking ownership of existing resources
298 // during the Helm install action. Defaults to false.
299 disableTakeOwnership?: bool
300
301 // DisableWait disables the waiting for resources to be ready after a Helm
302 // install has been performed.
303 disableWait?: bool
304
305 // DisableWaitForJobs disables waiting for jobs to complete after a Helm
306 // install has been performed.
307 disableWaitForJobs?: bool
308
309 // Remediation holds the remediation configuration for when the Helm install
310 // action for the HelmRelease fails. The default is to not perform any action.
311 remediation?: {
312 // IgnoreTestFailures tells the controller to skip remediation when the Helm
313 // tests are run after an install action but fail. Defaults to
314 // 'Test.IgnoreFailures'.
315 ignoreTestFailures?: bool
316
317 // RemediateLastFailure tells the controller to remediate the last failure, when
318 // no retries remain. Defaults to 'false'.
319 remediateLastFailure?: bool
320
321 // Retries is the number of retries that should be attempted on failures before
322 // bailing. Remediation, using an uninstall, is performed between each attempt.
323 // Defaults to '0', a negative integer equals to unlimited retries.
324 retries?: int
325 }
326
327 // Replace tells the Helm install action to re-use the 'ReleaseName', but only
328 // if that name is a deleted release which remains in the history.
329 replace?: bool
330
331 // ServerSideApply enables server-side apply for resources during install.
332 // Defaults to true (or false when UseHelm3Defaults feature gate is enabled).
333 serverSideApply?: bool
334
335 // SkipCRDs tells the Helm install action to not install any CRDs. By default,
336 // CRDs are installed if not already present.
337 //
338 // Deprecated use CRD policy (`crds`) attribute with value `Skip` instead.
339 skipCRDs?: bool
340
341 // Strategy defines the install strategy to use for this HelmRelease.
342 // Defaults to 'RemediateOnFailure', or 'RetryOnFailure' when the
343 // DefaultToRetryOnFailure feature gate is enabled.
344 strategy?: {
345 // Name of the install strategy.
346 name!: "RemediateOnFailure" | "RetryOnFailure"
347
348 // RetryInterval is the interval at which to retry a failed install.
349 // Can be used only when Name is set to RetryOnFailure.
350 // Defaults to '5m'.
351 retryInterval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
352 }
353
354 // Timeout is the time to wait for any individual Kubernetes operation (like
355 // Jobs for hooks) during the performance of a Helm install action. Defaults to
356 // 'HelmReleaseSpec.Timeout'.
357 timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
358 }
359
360 // Interval at which to reconcile the Helm release.
361 interval!: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
362
363 // KubeConfig for reconciling the HelmRelease on a remote cluster.
364 // When used in combination with HelmReleaseSpec.ServiceAccountName,
365 // forces the controller to act on behalf of that Service Account at the
366 // target cluster.
367 // If the --default-service-account flag is set, its value will be used as
368 // a controller level fallback for when HelmReleaseSpec.ServiceAccountName
369 // is empty.
370 kubeConfig?: {
371 // ConfigMapRef holds an optional name of a ConfigMap that contains
372 // the following keys:
373 //
374 // - `provider`: the provider to use. One of `aws`, `azure`, `gcp`, or
375 // `generic`. Required.
376 // - `cluster`: the fully qualified resource name of the Kubernetes
377 // cluster in the cloud provider API. Not used by the `generic`
378 // provider. Required when one of `address` or `ca.crt` is not set.
379 // - `address`: the address of the Kubernetes API server. Required
380 // for `generic`. For the other providers, if not specified, the
381 // first address in the cluster resource will be used, and if
382 // specified, it must match one of the addresses in the cluster
383 // resource.
384 // If audiences is not set, will be used as the audience for the
385 // `generic` provider.
386 // - `ca.crt`: the optional PEM-encoded CA certificate for the
387 // Kubernetes API server. If not set, the controller will use the
388 // CA certificate from the cluster resource.
389 // - `audiences`: the optional audiences as a list of
390 // line-break-separated strings for the Kubernetes ServiceAccount
391 // token. Defaults to the `address` for the `generic` provider, or
392 // to specific values for the other providers depending on the
393 // provider.
394 // - `serviceAccountName`: the optional name of the Kubernetes
395 // ServiceAccount in the same namespace that should be used
396 // for authentication. If not specified, the controller
397 // ServiceAccount will be used.
398 //
399 // Mutually exclusive with SecretRef.
400 configMapRef?: {
401 // Name of the referent.
402 name!: string
403 }
404
405 // SecretRef holds an optional name of a secret that contains a key with
406 // the kubeconfig file as the value. If no key is set, the key will default
407 // to 'value'. Mutually exclusive with ConfigMapRef.
408 // It is recommended that the kubeconfig is self-contained, and the secret
409 // is regularly updated if credentials such as a cloud-access-token expire.
410 // Cloud specific `cmd-path` auth helpers will not function without adding
411 // binaries and credentials to the Pod that is responsible for reconciling
412 // Kubernetes resources. Supported only for the generic provider.
413 secretRef?: {
414 // Key in the Secret, when not specified an implementation-specific default key is used.
415 key?: string
416
417 // Name of the Secret.
418 name!: string
419 }
420 }
421
422 // MaxHistory is the number of revisions saved by Helm for this HelmRelease.
423 // Use '0' for an unlimited number of revisions; defaults to '5'.
424 maxHistory?: int
425
426 // PersistentClient tells the controller to use a persistent Kubernetes
427 // client for this release. When enabled, the client will be reused for the
428 // duration of the reconciliation, instead of being created and destroyed
429 // for each (step of a) Helm action.
430 //
431 // This can improve performance, but may cause issues with some Helm charts
432 // that for example do create Custom Resource Definitions during installation
433 // outside Helm's CRD lifecycle hooks, which are then not observed to be
434 // available by e.g. post-install hooks.
435 //
436 // If not set, it defaults to true.
437 persistentClient?: bool
438
439 // PostRenderStrategy defines the strategy for sending hooks to post-renderers.
440 // Valid values are 'nohooks' (hooks not sent to post-renderers, Helm 3 behavior),
441 // 'combined' (hooks and templates sent together, Helm 4 default), and 'separate'
442 // (hooks and templates sent in separate streams, Helm 4.2 opt-in).
443 // Defaults to 'combined', or 'nohooks' when the UseHelm3Defaults feature gate is enabled.
444 postRenderStrategy?: "nohooks" | "combined" | "separate"
445
446 // PostRenderers holds an array of Helm PostRenderers, which will be applied in order
447 // of their definition.
448 postRenderers?: [...{
449 // Kustomization to apply as PostRenderer.
450 kustomize?: {
451 // Images is a list of (image name, new name, new tag or digest)
452 // for changing image names, tags or digests. This can also be achieved with a
453 // patch, but this operator is simpler to specify.
454 images?: [...{
455 // Digest is the value used to replace the original image tag.
456 // If digest is present NewTag value is ignored.
457 digest?: string
458
459 // Name is a tag-less image name.
460 name!: string
461
462 // NewName is the value used to replace the original name.
463 newName?: string
464
465 // NewTag is the value used to replace the original tag.
466 newTag?: string
467 }]
468
469 // Strategic merge and JSON patches, defined as inline YAML objects,
470 // capable of targeting objects based on kind, label and annotation selectors.
471 patches?: [...{
472 // Patch contains an inline StrategicMerge patch or an inline JSON6902 patch with
473 // an array of operation objects.
474 patch!: string
475
476 // Target points to the resources that the patch document should be applied to.
477 target?: {
478 // AnnotationSelector is a string that follows the label selection expression
479 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
480 // It matches with the resource annotations.
481 annotationSelector?: string
482
483 // Group is the API group to select resources from.
484 // Together with Version and Kind it is capable of unambiguously identifying
485 // and/or selecting resources.
486 // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
487 group?: string
488
489 // Kind of the API Group to select resources from.
490 // Together with Group and Version it is capable of unambiguously
491 // identifying and/or selecting resources.
492 // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
493 kind?: string
494
495 // LabelSelector is a string that follows the label selection expression
496 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
497 // It matches with the resource labels.
498 labelSelector?: string
499
500 // Name to match resources with.
501 name?: string
502
503 // Namespace to select resources from.
504 namespace?: string
505
506 // Version of the API Group to select resources from.
507 // Together with Group and Kind it is capable of unambiguously identifying
508 // and/or selecting resources.
509 // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
510 version?: string
511 }
512 }]
513 }
514 }]
515
516 // ReleaseName used for the Helm release. Defaults to a composition of
517 // '[TargetNamespace-]Name'.
518 releaseName?: strings.MaxRunes(
519 53,
520 ) & strings.MinRunes(
521 1,
522 )
523
524 // Rollback holds the configuration for Helm rollback actions for this HelmRelease.
525 rollback?: {
526 // CleanupOnFail allows deletion of new resources created during the Helm
527 // rollback action when it fails.
528 cleanupOnFail?: bool
529
530 // DisableHooks prevents hooks from running during the Helm rollback action.
531 disableHooks?: bool
532
533 // DisableWait disables the waiting for resources to be ready after a Helm
534 // rollback has been performed.
535 disableWait?: bool
536
537 // DisableWaitForJobs disables waiting for jobs to complete after a Helm
538 // rollback has been performed.
539 disableWaitForJobs?: bool
540
541 // Force forces resource updates through a replacement strategy
542 // that avoids 3-way merge conflicts on client-side apply.
543 // This field is ignored for server-side apply (which always
544 // forces conflicts with other field managers).
545 force?: bool
546
547 // Recreate performs pod restarts for any managed workloads.
548 //
549 // Deprecated: This behavior was deprecated in Helm 3:
550 // - Deprecation: https://github.com/helm/helm/pull/6463
551 // - Removal: https://github.com/helm/helm/pull/31023
552 // After helm-controller was upgraded to the Helm 4 SDK,
553 // this field is no longer functional and will print a
554 // warning if set to true. It will also be removed in a
555 // future release.
556 recreate?: bool
557
558 // ServerSideApply enables server-side apply for resources during rollback.
559 // Can be "enabled", "disabled", or "auto".
560 // When "auto", server-side apply usage will be based on the release's previous usage.
561 // Defaults to "auto".
562 serverSideApply?: "enabled" | "disabled" | "auto"
563
564 // Timeout is the time to wait for any individual Kubernetes operation (like
565 // Jobs for hooks) during the performance of a Helm rollback action. Defaults to
566 // 'HelmReleaseSpec.Timeout'.
567 timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
568 }
569
570 // The name of the Kubernetes service account to impersonate
571 // when reconciling this HelmRelease.
572 serviceAccountName?: strings.MaxRunes(
573 253,
574 ) & strings.MinRunes(
575 1,
576 )
577
578 // StorageNamespace used for the Helm storage.
579 // Defaults to the namespace of the HelmRelease.
580 storageNamespace?: strings.MaxRunes(
581 63,
582 ) & strings.MinRunes(
583 1,
584 )
585
586 // Suspend tells the controller to suspend reconciliation for this HelmRelease,
587 // it does not apply to already started reconciliations. Defaults to false.
588 suspend?: bool
589
590 // TargetNamespace to target when performing operations for the HelmRelease.
591 // Defaults to the namespace of the HelmRelease.
592 targetNamespace?: strings.MaxRunes(
593 63,
594 ) & strings.MinRunes(
595 1,
596 )
597
598 // Test holds the configuration for Helm test actions for this HelmRelease.
599 test?: {
600 // Enable enables Helm test actions for this HelmRelease after an Helm install
601 // or upgrade action has been performed.
602 enable?: bool
603
604 // Filters is a list of tests to run or exclude from running.
605 filters?: [...{
606 // Exclude specifies whether the named test should be excluded.
607 exclude?: bool
608
609 // Name is the name of the test.
610 name!: strings.MaxRunes(
611 253,
612 ) & strings.MinRunes(
613 1,
614 )
615 }]
616
617 // IgnoreFailures tells the controller to skip remediation when the Helm tests
618 // are run but fail. Can be overwritten for tests run after install or upgrade
619 // actions in 'Install.IgnoreTestFailures' and 'Upgrade.IgnoreTestFailures'.
620 ignoreFailures?: bool
621
622 // Timeout is the time to wait for any individual Kubernetes operation during
623 // the performance of a Helm test action. Defaults to 'HelmReleaseSpec.Timeout'.
624 timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
625 }
626
627 // Timeout is the time to wait for any individual Kubernetes operation (like Jobs
628 // for hooks) during the performance of a Helm action. Defaults to '5m0s'.
629 timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
630
631 // Uninstall holds the configuration for Helm uninstall actions for this HelmRelease.
632 uninstall?: {
633 // DeletionPropagation specifies the deletion propagation policy when
634 // a Helm uninstall is performed.
635 deletionPropagation?: "background" | "foreground" | "orphan"
636
637 // DisableHooks prevents hooks from running during the Helm rollback action.
638 disableHooks?: bool
639
640 // DisableWait disables waiting for all the resources to be deleted after
641 // a Helm uninstall is performed.
642 disableWait?: bool
643
644 // KeepHistory tells Helm to remove all associated resources and mark the
645 // release as deleted, but retain the release history.
646 keepHistory?: bool
647
648 // Timeout is the time to wait for any individual Kubernetes operation (like
649 // Jobs for hooks) during the performance of a Helm uninstall action. Defaults
650 // to 'HelmReleaseSpec.Timeout'.
651 timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
652 }
653
654 // Upgrade holds the configuration for Helm upgrade actions for this HelmRelease.
655 upgrade?: {
656 // ChartNameChangeStrategy defines the strategy to use when a Helm chart name changes.
657 // Valid values are 'Reinstall' or 'InPlaceUpdate'. Defaults to 'Reinstall' if omitted.
658 //
659 // Reinstall: Reinstall the Helm release, uninstalling the existing Helm release.
660 //
661 // InPlaceUpdate: Update the Helm release in place.
662 chartNameChangeStrategy?: "InPlaceUpdate" | "Reinstall"
663
664 // CleanupOnFail allows deletion of new resources created during the Helm
665 // upgrade action when it fails.
666 cleanupOnFail?: bool
667
668 // CRDs upgrade CRDs from the Helm Chart's crds directory according
669 // to the CRD upgrade policy provided here. Valid values are `Skip`,
670 // `Create` or `CreateReplace`. Default is `Skip` and if omitted
671 // CRDs are neither installed nor upgraded.
672 //
673 // Skip: do neither install nor replace (update) any CRDs.
674 //
675 // Create: new CRDs are created, existing CRDs are neither updated nor deleted.
676 //
677 // CreateReplace: new CRDs are created, existing CRDs are updated (replaced)
678 // but not deleted.
679 //
680 // By default, CRDs are not applied during Helm upgrade action. With this
681 // option users can opt-in to CRD upgrade, which is not (yet) natively supported by Helm.
682 // https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
683 crds?: "Skip" | "Create" | "CreateReplace"
684
685 // DisableHooks prevents hooks from running during the Helm upgrade action.
686 disableHooks?: bool
687
688 // DisableOpenAPIValidation prevents the Helm upgrade action from validating
689 // rendered templates against the Kubernetes OpenAPI Schema.
690 disableOpenAPIValidation?: bool
691
692 // DisableSchemaValidation prevents the Helm upgrade action from validating
693 // the values against the JSON Schema.
694 disableSchemaValidation?: bool
695
696 // DisableTakeOwnership disables taking ownership of existing resources
697 // during the Helm upgrade action. Defaults to false.
698 disableTakeOwnership?: bool
699
700 // DisableWait disables the waiting for resources to be ready after a Helm
701 // upgrade has been performed.
702 disableWait?: bool
703
704 // DisableWaitForJobs disables waiting for jobs to complete after a Helm
705 // upgrade has been performed.
706 disableWaitForJobs?: bool
707
708 // Force forces resource updates through a replacement strategy
709 // that avoids 3-way merge conflicts on client-side apply.
710 // This field is ignored for server-side apply (which always
711 // forces conflicts with other field managers).
712 force?: bool
713
714 // PreserveValues will make Helm reuse the last release's values and merge in
715 // overrides from 'Values'. Setting this flag makes the HelmRelease
716 // non-declarative.
717 preserveValues?: bool
718
719 // Remediation holds the remediation configuration for when the Helm upgrade
720 // action for the HelmRelease fails. The default is to not perform any action.
721 remediation?: {
722 // IgnoreTestFailures tells the controller to skip remediation when the Helm
723 // tests are run after an upgrade action but fail.
724 // Defaults to 'Test.IgnoreFailures'.
725 ignoreTestFailures?: bool
726
727 // RemediateLastFailure tells the controller to remediate the last failure, when
728 // no retries remain. Defaults to 'false' unless 'Retries' is greater than 0.
729 remediateLastFailure?: bool
730
731 // Retries is the number of retries that should be attempted on failures before
732 // bailing. Remediation, using 'Strategy', is performed between each attempt.
733 // Defaults to '0', a negative integer equals to unlimited retries.
734 retries?: int
735
736 // Strategy to use for failure remediation. Defaults to 'rollback'.
737 strategy?: "rollback" | "uninstall"
738 }
739
740 // ServerSideApply enables server-side apply for resources during upgrade.
741 // Can be "enabled", "disabled", or "auto".
742 // When "auto", server-side apply usage will be based on the release's previous usage.
743 // Defaults to "auto".
744 serverSideApply?: "enabled" | "disabled" | "auto"
745
746 // Strategy defines the upgrade strategy to use for this HelmRelease.
747 // Defaults to 'RemediateOnFailure', or 'RetryOnFailure' when the
748 // DefaultToRetryOnFailure feature gate is enabled.
749 strategy?: {
750 // Name of the upgrade strategy.
751 name!: "RemediateOnFailure" | "RetryOnFailure"
752
753 // RetryInterval is the interval at which to retry a failed upgrade.
754 // Can be used only when Name is set to RetryOnFailure.
755 // Defaults to '5m'.
756 retryInterval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
757 }
758
759 // Timeout is the time to wait for any individual Kubernetes operation (like
760 // Jobs for hooks) during the performance of a Helm upgrade action. Defaults to
761 // 'HelmReleaseSpec.Timeout'.
762 timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
763 }
764
765 // Values holds the values for this Helm release.
766 values?: null | bool | number | string | [...] | {...}
767
768 // ValuesFrom holds references to resources containing Helm values for this HelmRelease,
769 // and information about how they should be merged.
770 valuesFrom?: [...{
771 // Kind of the values referent, valid values are ('Secret', 'ConfigMap').
772 kind!: "Secret" | "ConfigMap"
773
774 // Literal marks this ValuesReference as a literal value. When set in
775 // combination with TargetPath, the referenced value is merged at the target
776 // path without interpreting Helm's `--set` syntax (commas, brackets, dots,
777 // equal signs, etc.), mirroring the behavior of `helm --set-literal`. This
778 // is the only safe way to inject arbitrary file content (config files, JSON
779 // blobs, multi-line strings containing special characters) through
780 // `valuesFrom`. Has no effect when TargetPath is empty: in that mode the
781 // referenced value is always YAML-merged at the root.
782 literal?: bool
783
784 // Name of the values referent. Should reside in the same namespace as the
785 // referring resource.
786 name!: strings.MaxRunes(
787 253,
788 ) & strings.MinRunes(
789 1,
790 )
791
792 // Optional marks this ValuesReference as optional. When set, a not found error
793 // for the values reference is ignored, but any ValuesKey, TargetPath or
794 // transient error will still result in a reconciliation failure.
795 optional?: bool
796
797 // TargetPath is the YAML dot notation path the value should be merged at. When
798 // set, the ValuesKey is expected to be a single flat value. Defaults to 'None',
799 // which results in the values getting merged at the root.
800 targetPath?: strings.MaxRunes(
801 250,
802 ) &
803 =~"^([a-zA-Z0-9_\\-.\\\\\\/]|\\[[0-9]{1,5}\\])+$"
804
805 // ValuesKey is the data key where the values.yaml or a specific value can be
806 // found at. Defaults to 'values.yaml'.
807 valuesKey?: strings.MaxRunes(
808 253,
809 ) &
810 =~"^[\\-._a-zA-Z0-9]+$"
811 }]
812
813 // WaitStrategy defines Helm's wait strategy for waiting for applied
814 // resources to become ready.
815 waitStrategy?: {
816 // Name is Helm's wait strategy for waiting for applied resources to
817 // become ready. One of 'poller' or 'legacy'. The 'poller' strategy uses
818 // kstatus to poll resource statuses, while the 'legacy' strategy uses
819 // Helm v3's waiting logic.
820 // Defaults to 'poller', or to 'legacy' when UseHelm3Defaults feature
821 // gate is enabled.
822 name!: "poller" | "legacy"
823 }
824 }
825
826 // HelmReleaseStatus defines the observed state of a HelmRelease.
827 status?: {
828 // Conditions holds the conditions for the HelmRelease.
829 conditions?: [...{
830 // lastTransitionTime is the last time the condition transitioned from one status to another.
831 // This should be when the underlying condition changed. If that is not known,
832 // then using the time when the API field changed is acceptable.
833 lastTransitionTime!: time.Time
834
835 // message is a human readable message indicating details about the transition.
836 // This may be an empty string.
837 message!: strings.MaxRunes(
838 32768,
839 )
840
841 // observedGeneration represents the .metadata.generation that the condition was set based upon.
842 // For instance, if .metadata.generation is currently 12, but the
843 // .status.conditions[x].observedGeneration is 9, the condition is out of date
844 // with respect to the current state of the instance.
845 observedGeneration?: int64 & int & >=0
846
847 // reason contains a programmatic identifier indicating the reason for the
848 // condition's last transition.
849 // Producers of specific condition types may define expected values and meanings for this field,
850 // and whether the values are considered a guaranteed API.
851 // The value should be a CamelCase string.
852 // This field may not be empty.
853 reason!: strings.MaxRunes(
854 1024,
855 ) &
856 strings.MinRunes(
857 1,
858 ) &
859 =~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"
860
861 // status of the condition, one of True, False, Unknown.
862 status!: "True" | "False" | "Unknown"
863
864 // type of condition in CamelCase or in foo.example.com/CamelCase.
865 type!: strings.MaxRunes(
866 316,
867 ) &
868 =~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
869 }]
870
871 // Failures is the reconciliation failure count against the latest desired
872 // state. It is reset after a successful reconciliation.
873 failures?: int64 & int
874
875 // HelmChart is the namespaced name of the HelmChart resource created by
876 // the controller for the HelmRelease.
877 helmChart?: string
878
879 // History holds the history of Helm releases performed for this HelmRelease
880 // up to the last successfully completed release.
881 history?: [...{
882 // Action is the action that resulted in this snapshot being created.
883 action?: string
884
885 // APIVersion is the API version of the Snapshot.
886 // When the calculation method of the Digest field is changed, this
887 // field will be used to distinguish between the old and new methods.
888 apiVersion?: string
889
890 // AppVersion is the chart app version of the release object in storage.
891 appVersion?: string
892
893 // ChartName is the chart name of the release object in storage.
894 chartName!: string
895
896 // ChartVersion is the chart version of the release object in
897 // storage.
898 chartVersion!: string
899
900 // ConfigDigest is the checksum of the config (better known as
901 // "values") of the release object in storage.
902 // It has the format of `<algo>:<checksum>`.
903 configDigest!: string
904
905 // Deleted is when the release was deleted.
906 deleted?: time.Time
907
908 // Digest is the checksum of the release object in storage.
909 // It has the format of `<algo>:<checksum>`.
910 digest!: string
911
912 // FirstDeployed is when the release was first deployed.
913 firstDeployed!: time.Time
914
915 // LastDeployed is when the release was last deployed.
916 lastDeployed!: time.Time
917
918 // Name is the name of the release.
919 name!: string
920
921 // Namespace is the namespace the release is deployed to.
922 namespace!: string
923
924 // OCIDigest is the digest of the OCI artifact associated with the release.
925 ociDigest?: string
926
927 // Status is the current state of the release.
928 status!: string
929
930 // TestHooks is the list of test hooks for the release as observed to be
931 // run by the controller.
932 testHooks?: [string]: {
933 // LastCompleted is the time the test hook last completed.
934 lastCompleted?: time.Time
935
936 // LastStarted is the time the test hook was last started.
937 lastStarted?: time.Time
938
939 // Phase the test hook was observed to be in.
940 phase?: string
941 }
942
943 // Version is the version of the release object in storage.
944 version!: int
945 }]
946
947 // InstallFailures is the install failure count against the latest desired
948 // state. It is reset after a successful reconciliation.
949 installFailures?: int64 & int
950
951 // Inventory contains the list of Kubernetes resource object references
952 // that have been applied for this release.
953 inventory?: {
954 // Entries of Kubernetes resource object references.
955 entries!: [...{
956 // ID is the string representation of the Kubernetes resource object's metadata,
957 // in the format '<namespace>_<name>_<group>_<kind>'.
958 id!: string
959
960 // Version is the API version of the Kubernetes resource object's kind.
961 v!: string
962 }]
963 }
964
965 // LastAttemptedConfigDigest is the digest for the config (better known as
966 // "values") of the last reconciliation attempt.
967 lastAttemptedConfigDigest?: string
968
969 // LastAttemptedGeneration is the last generation the controller attempted
970 // to reconcile.
971 lastAttemptedGeneration?: int64 & int
972
973 // LastAttemptedReleaseAction is the last release action performed for this
974 // HelmRelease. It is used to determine the active retry or remediation
975 // strategy.
976 lastAttemptedReleaseAction?: "install" | "upgrade"
977
978 // LastAttemptedReleaseActionDuration is the duration of the last
979 // release action performed for this HelmRelease.
980 lastAttemptedReleaseActionDuration?: string
981
982 // LastAttemptedRevision is the Source revision of the last reconciliation
983 // attempt. For OCIRepository sources, the 12 first characters of the digest are
984 // appended to the chart version e.g. "1.2.3+1234567890ab".
985 lastAttemptedRevision?: string
986
987 // LastAttemptedRevisionDigest is the digest of the last reconciliation attempt.
988 // This is only set for OCIRepository sources.
989 lastAttemptedRevisionDigest?: string
990
991 // LastAttemptedValuesChecksum is the SHA1 checksum for the values of the last
992 // reconciliation attempt.
993 //
994 // Deprecated: Use LastAttemptedConfigDigest instead.
995 lastAttemptedValuesChecksum?: string
996
997 // LastHandledForceAt holds the value of the most recent
998 // force request value, so a change of the annotation value
999 // can be detected.
1000 lastHandledForceAt?: string
1001
1002 // LastHandledReconcileAt holds the value of the most recent
1003 // reconcile request value, so a change of the annotation value
1004 // can be detected.
1005 lastHandledReconcileAt?: string
1006
1007 // LastHandledResetAt holds the value of the most recent reset request
1008 // value, so a change of the annotation value can be detected.
1009 lastHandledResetAt?: string
1010
1011 // LastReleaseRevision is the revision of the last successful Helm release.
1012 //
1013 // Deprecated: Use History instead.
1014 lastReleaseRevision?: int
1015
1016 // ObservedCommonMetadataDigest is the digest for the common metadata of
1017 // the last successful reconciliation attempt.
1018 observedCommonMetadataDigest?: string
1019
1020 // ObservedGeneration is the last observed generation.
1021 observedGeneration?: int64 & int
1022
1023 // ObservedPostRenderersDigest is the digest for the post-renderers of
1024 // the last successful reconciliation attempt.
1025 observedPostRenderersDigest?: string
1026
1027 // StorageNamespace is the namespace of the Helm release storage for the
1028 // current release.
1029 storageNamespace?: strings.MaxRunes(
1030 63,
1031 ) & strings.MinRunes(
1032 1,
1033 )
1034
1035 // UpgradeFailures is the upgrade failure count against the latest desired
1036 // state. It is reset after a successful reconciliation.
1037 upgradeFailures?: int64 & int
1038 }
1039
1040 _embeddedResource: {
1041 apiVersion!: string
1042 kind!: string
1043 metadata?: {...}
1044 }
1045 apiVersion: "helm.toolkit.fluxcd.io/v2"
1046 kind: "HelmRelease"
1047 metadata!: {
1048 name!: string
1049 namespace!: string
1050 labels?: [string]: string
1051 annotations?: [string]: string
1052 ...
1053 }
1054}