Skip to content
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
6 changes: 0 additions & 6 deletions api/v1alpha1/release_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -817,15 +817,9 @@ type ValidationConfig struct {
// +optional
LocalOnly bool `json:"localOnly,omitempty"`

// +optional
KubeVersion string `json:"kubeVersion,omitempty"`

// +optional
Skip []string `json:"skip,omitempty"`

// +optional
Schemas []string `json:"schemas,omitempty"`

// +optional
ExtraSchemas []string `json:"extraSchemas,omitempty"`

Expand Down
5 changes: 0 additions & 5 deletions api/v1alpha1/zz_generated.deepcopy.go

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

6 changes: 0 additions & 6 deletions config/crd/bases/nelm.werf.io_releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1184,8 +1184,6 @@ spec:
items:
type: string
type: array
kubeVersion:
type: string
localOnly:
type: boolean
noResourceValidation:
Expand All @@ -1194,10 +1192,6 @@ spec:
type: boolean
schemaCacheLifetime:
type: string
schemas:
items:
type: string
type: array
skip:
items:
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/onsi/ginkgo/v2 v2.28.1
github.com/onsi/gomega v1.39.1
github.com/werf/logboek v0.6.1
github.com/werf/nelm v1.26.2-0.20260714212319-5c9ccecdb898
github.com/werf/nelm v1.26.2-0.20260731170307-2a29517d8d19
k8s.io/api v0.35.3
k8s.io/apiextensions-apiserver v0.35.3
k8s.io/apimachinery v0.35.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ github.com/werf/lockgate v0.1.1 h1:S400JFYjtWfE4i4LY9FA8zx0fMdfui9DPrBiTciCrx4=
github.com/werf/lockgate v0.1.1/go.mod h1:0yIFSLq9ausy6ejNxF5uUBf/Ib6daMAfXuCaTMZJzIE=
github.com/werf/logboek v0.6.1 h1:oEe6FkmlKg0z0n80oZjLplj6sXcBeLleCkjfOOZEL2g=
github.com/werf/logboek v0.6.1/go.mod h1:Gez5J4bxekyr6MxTmIJyId1F61rpO+0/V4vjCIEIZmk=
github.com/werf/nelm v1.26.2-0.20260714212319-5c9ccecdb898 h1:4jZdUnRfoadaBNlVf1F+TxIuJSc78NgcpuKSeW1xSpk=
github.com/werf/nelm v1.26.2-0.20260714212319-5c9ccecdb898/go.mod h1:eI4z6u+zG3t+CLdqRvAxNjoLH/5Jq3wStjUILE4HjFc=
github.com/werf/nelm v1.26.2-0.20260731170307-2a29517d8d19 h1:siwzbEpwFYNC+lNH4DNypAwh3/O6UMifvX4NSxU/ui8=
github.com/werf/nelm v1.26.2-0.20260731170307-2a29517d8d19/go.mod h1:eI4z6u+zG3t+CLdqRvAxNjoLH/5Jq3wStjUILE4HjFc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
Expand Down
6 changes: 0 additions & 6 deletions internal/controller/release_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
EventRecorder record.EventRecorder
}

func (r *ReleaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {

Check failure on line 71 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

cyclomatic complexity 36 of func `(*ReleaseReconciler).Reconcile` is high (> 30) (gocyclo)

Check failure on line 71 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

cyclomatic complexity 36 of func `(*ReleaseReconciler).Reconcile` is high (> 30) (gocyclo)
ctx = logboek.NewContext(ctx, logboek.DefaultLogger())
log := logf.FromContext(ctx)

Expand Down Expand Up @@ -202,7 +202,7 @@
if err != nil {
return r.handleFailure(ctx, &rel, false, fmt.Errorf("create temp directory: %w", err), nil, false)
}
defer os.RemoveAll(tempDir)

Check failure on line 205 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `os.RemoveAll` is not checked (errcheck)

Check failure on line 205 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `os.RemoveAll` is not checked (errcheck)

chartResult, err := source.ResolveChartRef(ctx, r.Client, r.Config.SourceAPIGroup, r.Config.SourceAPIVersion, chartRef, tempDir, r.Config.HTTPRetry, r.Config.HTTPTimeout)
if err != nil {
Expand Down Expand Up @@ -600,7 +600,7 @@
if err != nil {
return ctrl.Result{}, fmt.Errorf("create temp dir: %w", err)
}
defer os.RemoveAll(tempDir)

Check failure on line 603 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `os.RemoveAll` is not checked (errcheck)

Check failure on line 603 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `os.RemoveAll` is not checked (errcheck)

uninstallOpts, err := r.buildUninstallOptions(rel, tempDir)
if err != nil {
Expand Down Expand Up @@ -751,7 +751,7 @@
log.Error(err, "Failed to create temp dir for rollback")
return
}
defer os.RemoveAll(tempDir)

Check failure on line 754 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `os.RemoveAll` is not checked (errcheck)

Check failure on line 754 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `os.RemoveAll` is not checked (errcheck)

rollbackOpts, err := r.buildRollbackOptions(rel, tempDir)
if err != nil {
Expand Down Expand Up @@ -828,8 +828,6 @@

func (r *ReleaseReconciler) buildValidationOptions(rel *nelmv1alpha1.Release) common.ResourceValidationOptions {
opts := common.ResourceValidationOptions{
ValidationKubeVersion: common.DefaultResourceValidationKubeVersion,
ValidationSchemas: common.DefaultResourceValidationSchema,
ValidationSchemaCacheLifetime: common.DefaultResourceValidationCacheLifetime,
}

Expand All @@ -841,11 +839,7 @@
opts.NoResourceValidation = v.NoResourceValidation
opts.NoValuesSchemaValidation = v.NoValuesSchemaValidation
opts.LocalResourceValidation = v.LocalOnly
if v.KubeVersion != "" {
opts.ValidationKubeVersion = v.KubeVersion
}
opts.ValidationSkip = v.Skip
opts.ValidationSchemas = v.Schemas
opts.ValidationExtraSchemas = v.ExtraSchemas
opts.ValidationSchemaCacheLifetime = v.SchemaCacheLifetime.Duration

Expand Down Expand Up @@ -932,7 +926,7 @@
if err != nil {
return "", fmt.Errorf("create temp file: %w", err)
}
defer f.Close()

Check failure on line 929 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `f.Close` is not checked (errcheck)

Check failure on line 929 in internal/controller/release_controller.go

View workflow job for this annotation

GitHub Actions / Run on Ubuntu

Error return value of `f.Close` is not checked (errcheck)

if _, err := f.Write(data); err != nil {
return "", fmt.Errorf("write temp file: %w", err)
Expand Down
Loading