diff --git a/go.mod b/go.mod index 1dfac3aa..eabfc72f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec - github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241209195238-e03b38f0d341 + github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241211170601-b6a1ac55c9e4 github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.32.0 github.com/prometheus/client_golang v1.16.0 diff --git a/go.sum b/go.sum index a33d288e..8274df3a 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec/go.mod h1:3JGfBMIfipAZbbAAesSvKzGmKGAh2Wu6pPGQWMP2f8w= github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d h1:s+zaQp8959Z1KjAo/zRP05CRJUrHTKx2ItbR4C3ffQw= github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d/go.mod h1:oxdwMqfttOF9dabJhqrWlirCnMk8/8eyLMwl+hducjk= -github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241209195238-e03b38f0d341 h1:IM0wlIjsh0AFWs98MOjkaXDohiH3trmeRqdeUAPDdJs= -github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241209195238-e03b38f0d341/go.mod h1:5wXbwDIublnrX22FCHB26PBxMOPY1J78lFh3LBY/vRE= +github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241211170601-b6a1ac55c9e4 h1:+koOgtNA8cXyIjiHOvqTxOGFgFtJiT2p3nZ3718mGk4= +github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241211170601-b6a1ac55c9e4/go.mod h1:5wXbwDIublnrX22FCHB26PBxMOPY1J78lFh3LBY/vRE= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= diff --git a/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_types.go b/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_types.go index 6370606e..89e578db 100644 --- a/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_types.go +++ b/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_types.go @@ -267,7 +267,7 @@ type NnfStorageProfileData struct { // +kubebuilder:default:=false Default bool `json:"default,omitempty"` - // Pinned is true if this instance is an immutable copy + // Pinned is true if this instance is describing an active storage resource // +kubebuilder:default:=false Pinned bool `json:"pinned,omitempty"` diff --git a/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_webhook.go b/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_webhook.go index 54428669..22ad8f7e 100644 --- a/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_webhook.go +++ b/vendor/github.com/NearNodeFlash/nnf-sos/api/v1alpha4/nnfstorageprofile_webhook.go @@ -22,7 +22,6 @@ package v1alpha4 import ( "fmt" "os" - "reflect" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" @@ -76,17 +75,11 @@ func (r *NnfStorageProfile) ValidateUpdate(old runtime.Object) (admission.Warnin nnfstorageprofilelog.Error(err, "invalid") return nil, err } - if obj.Data.Pinned { - // Allow metadata to be updated, for things like finalizers, - // ownerReferences, and labels, but do not allow Data to be - // updated. - if !reflect.DeepEqual(r.Data, obj.Data) { - msg := "update on pinned resource not allowed" - err := fmt.Errorf(msg) - nnfstorageprofilelog.Error(err, "invalid") - return nil, err - } - } + + // WARNING: NnfStorageProfile allows the obj.Data section to be modified. + // This is the place in the webhook where our other profile types, such as + // NnfContainerProfile or NnfDataMovementProfile, would verify that their + // obj.Data has not been modified. if err := r.validateContent(); err != nil { nnfstorageprofilelog.Error(err, "invalid NnfStorageProfile resource") diff --git a/vendor/github.com/NearNodeFlash/nnf-sos/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml b/vendor/github.com/NearNodeFlash/nnf-sos/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml index a7feb109..6c467e5b 100644 --- a/vendor/github.com/NearNodeFlash/nnf-sos/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml +++ b/vendor/github.com/NearNodeFlash/nnf-sos/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml @@ -1784,7 +1784,8 @@ spec: type: object pinned: default: false - description: Pinned is true if this instance is an immutable copy + description: Pinned is true if this instance is describing an active + storage resource type: boolean rawStorage: description: RawStorage defines the Raw-specific configuration diff --git a/vendor/modules.txt b/vendor/modules.txt index 5e24c33d..716bf64b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -10,7 +10,7 @@ github.com/NearNodeFlash/lustre-fs-operator/config/crd/bases # github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d ## explicit; go 1.19 github.com/NearNodeFlash/nnf-ec/pkg/rfsf/pkg/models -# github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241209195238-e03b38f0d341 +# github.com/NearNodeFlash/nnf-sos v0.0.1-0.20241211170601-b6a1ac55c9e4 ## explicit; go 1.21 github.com/NearNodeFlash/nnf-sos/api/v1alpha4 github.com/NearNodeFlash/nnf-sos/config/crd/bases