From af6cfc4d61521985adae407cbb8dc1c337d97841 Mon Sep 17 00:00:00 2001
From: Stefan Prodan
Date: Thu, 2 May 2024 16:54:42 +0300
Subject: [PATCH] Remove deprecated `valuesFile` from HelmChart v1
Signed-off-by: Stefan Prodan
---
api/v1/helmchart_types.go | 23 +------
api/v1/zz_generated.deepcopy.go | 5 --
.../source.toolkit.fluxcd.io_helmcharts.yaml | 35 -----------
docs/api/v1/source.md | 62 -------------------
4 files changed, 1 insertion(+), 124 deletions(-)
diff --git a/api/v1/helmchart_types.go b/api/v1/helmchart_types.go
index 1527e6bc..137b1645 100644
--- a/api/v1/helmchart_types.go
+++ b/api/v1/helmchart_types.go
@@ -21,7 +21,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/fluxcd/pkg/apis/acl"
"github.com/fluxcd/pkg/apis/meta"
)
@@ -70,14 +69,6 @@ type HelmChartSpec struct {
// +optional
ValuesFiles []string `json:"valuesFiles,omitempty"`
- // ValuesFile is an alternative values file to use as the default chart
- // values, expected to be a relative path in the SourceRef. Deprecated in
- // favor of ValuesFiles, for backwards compatibility the file specified here
- // is merged before the ValuesFiles items. Ignored when omitted.
- // +optional
- // +deprecated
- ValuesFile string `json:"valuesFile,omitempty"`
-
// IgnoreMissingValuesFiles controls whether to silently ignore missing values
// files rather than failing.
// +optional
@@ -88,12 +79,6 @@ type HelmChartSpec struct {
// +optional
Suspend bool `json:"suspend,omitempty"`
- // AccessFrom specifies an Access Control List for allowing cross-namespace
- // references to this object.
- // NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092
- // +optional
- AccessFrom *acl.AccessFrom `json:"accessFrom,omitempty"`
-
// 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.
@@ -203,13 +188,7 @@ func (in *HelmChart) GetArtifact() *Artifact {
// GetValuesFiles returns a merged list of HelmChartSpec.ValuesFiles.
func (in *HelmChart) GetValuesFiles() []string {
- valuesFiles := in.Spec.ValuesFiles
-
- // Prepend the deprecated ValuesFile to the list
- if in.Spec.ValuesFile != "" {
- valuesFiles = append([]string{in.Spec.ValuesFile}, valuesFiles...)
- }
- return valuesFiles
+ return in.Spec.ValuesFiles
}
// +genclient
diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go
index 38f4c41e..0616741d 100644
--- a/api/v1/zz_generated.deepcopy.go
+++ b/api/v1/zz_generated.deepcopy.go
@@ -335,11 +335,6 @@ func (in *HelmChartSpec) DeepCopyInto(out *HelmChartSpec) {
*out = make([]string, len(*in))
copy(*out, *in)
}
- if in.AccessFrom != nil {
- in, out := &in.AccessFrom, &out.AccessFrom
- *out = new(acl.AccessFrom)
- (*in).DeepCopyInto(*out)
- }
if in.Verify != nil {
in, out := &in.Verify, &out.Verify
*out = new(OCIRepositoryVerification)
diff --git a/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml b/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml
index 45591d54..0fd4de45 100644
--- a/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml
+++ b/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml
@@ -63,34 +63,6 @@ spec:
spec:
description: HelmChartSpec specifies the desired state of a Helm chart.
properties:
- accessFrom:
- description: |-
- AccessFrom specifies an Access Control List for allowing cross-namespace
- references to this object.
- NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092
- properties:
- namespaceSelectors:
- description: |-
- NamespaceSelectors is the list of namespace selectors to which this ACL applies.
- Items in this list are evaluated using a logical OR operation.
- items:
- description: |-
- NamespaceSelector selects the namespaces to which this ACL applies.
- An empty map of MatchLabels matches all namespaces in a cluster.
- properties:
- matchLabels:
- additionalProperties:
- type: string
- description: |-
- MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions, whose key field is "key", the
- operator is "In", and the values array contains only "value". The requirements are ANDed.
- type: object
- type: object
- type: array
- required:
- - namespaceSelectors
- type: object
chart:
description: |-
Chart is the name or path the Helm chart is available at in the
@@ -147,13 +119,6 @@ spec:
Suspend tells the controller to suspend the reconciliation of this
source.
type: boolean
- valuesFile:
- description: |-
- ValuesFile is an alternative values file to use as the default chart
- values, expected to be a relative path in the SourceRef. Deprecated in
- favor of ValuesFiles, for backwards compatibility the file specified here
- is merged before the ValuesFiles items. Ignored when omitted.
- type: string
valuesFiles:
description: |-
ValuesFiles is an alternative list of values files to use as the chart
diff --git a/docs/api/v1/source.md b/docs/api/v1/source.md
index 3746ad76..96c42bdf 100644
--- a/docs/api/v1/source.md
+++ b/docs/api/v1/source.md
@@ -393,21 +393,6 @@ overriding the first. Ignored when omitted.
-valuesFile
-
-string
-
- |
-
-(Optional)
- ValuesFile is an alternative values file to use as the default chart
-values, expected to be a relative path in the SourceRef. Deprecated in
-favor of ValuesFiles, for backwards compatibility the file specified here
-is merged before the ValuesFiles items. Ignored when omitted.
- |
-
-
-
ignoreMissingValuesFiles
bool
@@ -434,22 +419,6 @@ source.
|
-accessFrom
-
-
-github.com/fluxcd/pkg/apis/acl.AccessFrom
-
-
- |
-
-(Optional)
- AccessFrom specifies an Access Control List for allowing cross-namespace
-references to this object.
-NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092
- |
-
-
-
verify
@@ -1490,21 +1459,6 @@ overriding the first. Ignored when omitted.
|
-valuesFile
-
-string
-
- |
-
-(Optional)
- ValuesFile is an alternative values file to use as the default chart
-values, expected to be a relative path in the SourceRef. Deprecated in
-favor of ValuesFiles, for backwards compatibility the file specified here
-is merged before the ValuesFiles items. Ignored when omitted.
- |
-
-
-
ignoreMissingValuesFiles
bool
@@ -1531,22 +1485,6 @@ source.
|
-accessFrom
-
-
-github.com/fluxcd/pkg/apis/acl.AccessFrom
-
-
- |
-
-(Optional)
- AccessFrom specifies an Access Control List for allowing cross-namespace
-references to this object.
-NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092
- |
-
-
-
verify
|