- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for DropDisabledFields (0.22 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go
return generic.ObjectMetaFieldsSet(&obj.ObjectMeta, true) } // dropDisabledFields drops disabled fields that are not used if their associated feature gates // are not enabled. func dropDisabledFields(newCRD *apiextensions.CustomResourceDefinition, oldCRD *apiextensions.CustomResourceDefinition) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 10.3K bytes - Viewed (0) -
pkg/registry/core/node/strategy.go
node := obj.(*api.Node) dropDisabledFields(node, nil) } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (nodeStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newNode := obj.(*api.Node) oldNode := old.(*api.Node) newNode.Status = oldNode.Status dropDisabledFields(newNode, oldNode) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 13 23:06:39 UTC 2024 - 9K bytes - Viewed (0) -
pkg/api/persistentvolumeclaim/util.go
deprecatedStorageClassAnnotationsMsg = `deprecated since v1.8; use "storageClassName" attribute instead` ) // DropDisabledFields removes disabled fields from the pvc spec. // This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a pvc spec. func DropDisabledFields(pvcSpec, oldPVCSpec *core.PersistentVolumeClaimSpec) { // Drop the contents of the volumeAttributesClassName if the VolumeAttributesClass
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 03:18:56 UTC 2023 - 8.3K bytes - Viewed (0) -
pkg/api/pod/util_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 108.8K bytes - Viewed (0) -
pkg/api/persistentvolumeclaim/util_test.go
if !reflect.DeepEqual(newpvc, newpvcInfo.pvc()) { t.Errorf("new pvc changed: %v", cmp.Diff(newpvc, newpvcInfo.pvc())) } }) } } } // TestPVCDataSourceSpecFilter checks to ensure the DropDisabledFields function behaves correctly for PVCDataSource featuregate func TestPVCDataSourceSpecFilter(t *testing.T) { apiGroup := "" validSpec := core.PersistentVolumeClaimSpec{ DataSource: &core.TypedLocalObjectReference{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 27.9K bytes - Viewed (0) -
pkg/api/pod/util.go
oldPodStatus = &oldPod.Status oldPodAnnotations = oldPod.Annotations } dropDisabledFields(podSpec, podAnnotations, oldPodSpec, oldPodAnnotations) dropDisabledPodStatusFields(podStatus, oldPodStatus, podSpec, oldPodSpec) } // dropDisabledFields removes disabled fields from the pod metadata and spec. func dropDisabledFields( podSpec *api.PodSpec, podAnnotations map[string]string,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 41.3K bytes - Viewed (0) -
pkg/registry/policy/poddisruptionbudget/strategy_test.go
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PDBUnhealthyPodEvictionPolicy, tc.enableUnhealthyPodEvictionPolicy) oldSpecBefore := tc.oldSpec.DeepCopy() dropDisabledFields(tc.newSpec, tc.oldSpec) if !reflect.DeepEqual(tc.newSpec, tc.expectNewSpec) { t.Error(cmp.Diff(tc.newSpec, tc.expectNewSpec)) } if !reflect.DeepEqual(tc.oldSpec, oldSpecBefore) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 19.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy_test.go
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, apiextensionsfeatures.CustomResourceFieldSelectors, tc.enableSelectableFields) old := tc.oldCRD.DeepCopy() dropDisabledFields(tc.crd, tc.oldCRD) // old crd should never be changed if diff := cmp.Diff(tc.oldCRD, old); diff != "" { t.Fatalf("old crd changed from %v to %v\n%v", tc.oldCRD, old, diff) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 44.6K bytes - Viewed (0)