Skip to content
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

api: ensure backwards compatibility v2beta1 #851

Merged
merged 1 commit into from
Dec 15, 2023
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
25 changes: 25 additions & 0 deletions api/v2beta1/helmrelease_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@ type HelmReleaseSpec struct {
// +optional
PersistentClient *bool `json:"persistentClient,omitempty"`

// DriftDetection holds the configuration for detecting and handling
// differences between the manifest in the Helm storage and the resources
// currently existing in the cluster.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
DriftDetection *v2beta2.DriftDetection `json:"driftDetection,omitempty"`

// Install holds the configuration for Helm install actions for this HelmRelease.
// +optional
Install *Install `json:"install,omitempty"`
Expand Down Expand Up @@ -947,6 +956,22 @@ type HelmReleaseStatus struct {
// by v2beta1 HelmReleases.
// +optional
LastAttemptedReleaseAction string `json:"lastAttemptedReleaseAction,omitempty"`

// LastHandledForceAt holds the value of the most recent force request
// value, so a change of the annotation value can be detected.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastHandledForceAt string `json:"lastHandledForceAt,omitempty"`

// LastHandledResetAt holds the value of the most recent reset request
// value, so a change of the annotation value can be detected.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastHandledResetAt string `json:"lastHandledResetAt,omitempty"`
}

// GetHelmChart returns the namespace and name of the HelmChart.
Expand Down
5 changes: 5 additions & 0 deletions api/v2beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,82 @@ spec:
- name
type: object
type: array
driftDetection:
description: "DriftDetection holds the configuration for detecting
and handling differences between the manifest in the Helm storage
and the resources currently existing in the cluster. \n Note: this
field is provisional to the v2beta2 API, and not actively used by
v2beta1 HelmReleases."
properties:
ignore:
description: Ignore contains a list of rules for specifying which
changes to ignore during diffing.
items:
description: IgnoreRule defines a rule to selectively disregard
specific changes during the drift detection process.
properties:
paths:
description: Paths is a list of JSON Pointer (RFC 6901)
paths to be excluded from consideration in a Kubernetes
object.
items:
type: string
type: array
target:
description: Target is a selector for specifying Kubernetes
objects to which this rule applies. If Target is not set,
the Paths will be ignored for all Kubernetes objects within
the manifest of the Helm release.
properties:
annotationSelector:
description: AnnotationSelector is a string that follows
the label selection expression https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
It matches with the resource annotations.
type: string
group:
description: Group is the API group to select resources
from. Together with Version and Kind it is capable
of unambiguously identifying and/or selecting resources.
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
type: string
kind:
description: Kind of the API Group to select resources
from. Together with Group and Version it is capable
of unambiguously identifying and/or selecting resources.
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
type: string
labelSelector:
description: LabelSelector is a string that follows
the label selection expression https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
It matches with the resource labels.
type: string
name:
description: Name to match resources with.
type: string
namespace:
description: Namespace to select resources from.
type: string
version:
description: Version of the API Group to select resources
from. Together with Group and Kind it is capable of
unambiguously identifying and/or selecting resources.
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
type: string
type: object
required:
- paths
type: object
type: array
mode:
description: Mode defines how differences should be handled between
the Helm manifest and the manifest currently applied to the
cluster. If not explicitly set, it defaults to DiffModeDisabled.
enum:
- enabled
- warn
- disabled
type: string
type: object
install:
description: Install holds the configuration for Helm install actions
for this HelmRelease.
Expand Down Expand Up @@ -1011,11 +1087,23 @@ spec:
description: LastAttemptedValuesChecksum is the SHA1 checksum of the
values of the last reconciliation attempt.
type: string
lastHandledForceAt:
description: "LastHandledForceAt holds the value of the most recent
force request value, so a change of the annotation value can be
detected. \n Note: this field is provisional to the v2beta2 API,
and not actively used by v2beta1 HelmReleases."
type: string
lastHandledReconcileAt:
description: LastHandledReconcileAt holds the value of the most recent
reconcile request value, so a change of the annotation value can
be detected.
type: string
lastHandledResetAt:
description: "LastHandledResetAt holds the value of the most recent
reset request value, so a change of the annotation value can be
detected. \n Note: this field is provisional to the v2beta2 API,
and not actively used by v2beta1 HelmReleases."
type: string
lastReleaseRevision:
description: LastReleaseRevision is the revision of the last successful
Helm release.
Expand Down