Merge pull request #74760 from apelisse/add-mangerfield-flag

Add "fieldManager" to flag to PATCH/CREATE/UPDATE
pull/564/head
Kubernetes Prow Robot 2019-03-08 22:27:29 -08:00 committed by GitHub
commit 0b4275b6c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 3124 additions and 208 deletions

File diff suppressed because it is too large Load Diff

View File

@ -68,6 +68,7 @@ type ApplyOptions struct {
ServerSideApply bool ServerSideApply bool
ForceConflicts bool ForceConflicts bool
FieldManager string
Selector string Selector string
DryRun bool DryRun bool
ServerDryRun bool ServerDryRun bool
@ -196,14 +197,15 @@ func NewCmdApply(baseName string, f cmdutil.Factory, ioStreams genericclioptions
func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
o.ServerSideApply = cmdutil.GetServerSideApplyFlag(cmd) o.ServerSideApply = cmdutil.GetServerSideApplyFlag(cmd)
o.ForceConflicts = cmdutil.GetForceConflictsFlag(cmd) o.ForceConflicts = cmdutil.GetForceConflictsFlag(cmd)
o.FieldManager = cmdutil.GetFieldManagerFlag(cmd)
o.DryRun = cmdutil.GetDryRunFlag(cmd) o.DryRun = cmdutil.GetDryRunFlag(cmd)
if o.ForceConflicts && !o.ServerSideApply { if o.ForceConflicts && !o.ServerSideApply {
return fmt.Errorf("--force-conflicts only works with --server-side") return fmt.Errorf("--experimental-force-conflicts only works with --experimental-server-side")
} }
if o.DryRun && o.ServerSideApply { if o.DryRun && o.ServerSideApply {
return fmt.Errorf("--dry-run doesn't work with --server-side") return fmt.Errorf("--dry-run doesn't work with --experimental-server-side (did you mean --server-dry-run instead?)")
} }
if o.DryRun && o.ServerDryRun { if o.DryRun && o.ServerDryRun {
@ -393,7 +395,8 @@ func (o *ApplyOptions) Run() error {
return cmdutil.AddSourceToErr("serverside-apply", info.Source, err) return cmdutil.AddSourceToErr("serverside-apply", info.Source, err)
} }
options := metav1.PatchOptions{ options := metav1.PatchOptions{
Force: &o.ForceConflicts, Force: &o.ForceConflicts,
FieldManager: o.FieldManager,
} }
if o.ServerDryRun { if o.ServerDryRun {
options.DryRun = []string{metav1.DryRunAll} options.DryRun = []string{metav1.DryRunAll}

View File

@ -402,7 +402,7 @@ func (o *DiffOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
o.ServerSideApply = cmdutil.GetServerSideApplyFlag(cmd) o.ServerSideApply = cmdutil.GetServerSideApplyFlag(cmd)
o.ForceConflicts = cmdutil.GetForceConflictsFlag(cmd) o.ForceConflicts = cmdutil.GetForceConflictsFlag(cmd)
if o.ForceConflicts && !o.ServerSideApply { if o.ForceConflicts && !o.ServerSideApply {
return fmt.Errorf("--force-conflicts only works with --server-side") return fmt.Errorf("--experimental-force-conflicts only works with --experimental-server-side")
} }
if !o.ServerSideApply { if !o.ServerSideApply {

View File

@ -406,8 +406,9 @@ func AddDryRunFlag(cmd *cobra.Command) {
} }
func AddServerSideApplyFlags(cmd *cobra.Command) { func AddServerSideApplyFlags(cmd *cobra.Command) {
cmd.Flags().Bool("server-side", false, "If true, apply runs in the server instead of the client. This is an alpha feature and flag.") cmd.Flags().Bool("experimental-server-side", false, "If true, apply runs in the server instead of the client. This is an alpha feature and flag.")
cmd.Flags().Bool("force-conflicts", false, "If true, server-side apply will force the changes against conflicts. This is an alpha feature and flag.") cmd.Flags().Bool("experimental-force-conflicts", false, "If true, server-side apply will force the changes against conflicts. This is an alpha feature and flag.")
cmd.Flags().String("experimental-field-manager", "kubectl", "Name of the manager used to track field ownership. This is an alpha feature and flag.")
} }
func AddIncludeUninitializedFlag(cmd *cobra.Command) { func AddIncludeUninitializedFlag(cmd *cobra.Command) {
@ -484,11 +485,15 @@ func DumpReaderToFile(reader io.Reader, filename string) error {
} }
func GetServerSideApplyFlag(cmd *cobra.Command) bool { func GetServerSideApplyFlag(cmd *cobra.Command) bool {
return GetFlagBool(cmd, "server-side") return GetFlagBool(cmd, "experimental-server-side")
} }
func GetForceConflictsFlag(cmd *cobra.Command) bool { func GetForceConflictsFlag(cmd *cobra.Command) bool {
return GetFlagBool(cmd, "force-conflicts") return GetFlagBool(cmd, "experimental-force-conflicts")
}
func GetFieldManagerFlag(cmd *cobra.Command) string {
return GetFlagString(cmd, "experimental-field-manager")
} }
func GetDryRunFlag(cmd *cobra.Command) bool { func GetDryRunFlag(cmd *cobra.Command) bool {

View File

@ -71,6 +71,7 @@ values:
result, err := rest.Patch(types.ApplyPatchType). result, err := rest.Patch(types.ApplyPatchType).
AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural). AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural).
Name("mytest"). Name("mytest").
Param("fieldManager", "apply_test").
Body(yamlBody). Body(yamlBody).
DoRaw() DoRaw()
if err != nil { if err != nil {
@ -90,6 +91,7 @@ values:
result, err = rest.Patch(types.ApplyPatchType). result, err = rest.Patch(types.ApplyPatchType).
AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural). AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural).
Name("mytest"). Name("mytest").
Param("fieldManager", "apply_test").
Body(yamlBody). Body(yamlBody).
DoRaw() DoRaw()
if err == nil { if err == nil {
@ -108,6 +110,7 @@ values:
AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural). AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural).
Name("mytest"). Name("mytest").
Param("force", "true"). Param("force", "true").
Param("fieldManager", "apply_test").
Body(yamlBody). Body(yamlBody).
DoRaw() DoRaw()
if err != nil { if err != nil {

View File

@ -176,6 +176,9 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name
allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetClusterName(), msg)) allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetClusterName(), msg))
} }
} }
for _, entry := range meta.GetManagedFields() {
allErrs = append(allErrs, v1validation.ValidateFieldManager(entry.Manager, fldPath.Child("fieldManager"))...)
}
allErrs = append(allErrs, ValidateNonnegativeField(meta.GetGeneration(), fldPath.Child("generation"))...) allErrs = append(allErrs, ValidateNonnegativeField(meta.GetGeneration(), fldPath.Child("generation"))...)
allErrs = append(allErrs, v1validation.ValidateLabels(meta.GetLabels(), fldPath.Child("labels"))...) allErrs = append(allErrs, v1validation.ValidateLabels(meta.GetLabels(), fldPath.Child("labels"))...)
allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...) allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...)
@ -239,6 +242,9 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f
allErrs = append(allErrs, field.Invalid(fldPath.Child("generation"), newMeta.GetGeneration(), "must not be decremented")) allErrs = append(allErrs, field.Invalid(fldPath.Child("generation"), newMeta.GetGeneration(), "must not be decremented"))
} }
for _, entry := range newMeta.GetManagedFields() {
allErrs = append(allErrs, v1validation.ValidateFieldManager(entry.Manager, fldPath.Child("fieldManager"))...)
}
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetName(), oldMeta.GetName(), fldPath.Child("name"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetName(), oldMeta.GetName(), fldPath.Child("name"))...)
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetNamespace(), oldMeta.GetNamespace(), fldPath.Child("namespace"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetNamespace(), oldMeta.GetNamespace(), fldPath.Child("namespace"))...)
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetUID(), oldMeta.GetUID(), fldPath.Child("uid"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetUID(), oldMeta.GetUID(), fldPath.Child("uid"))...)

View File

@ -598,6 +598,10 @@ func (m *CreateOptions) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s) i += copy(dAtA[i:], s)
} }
} }
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldManager)))
i += copy(dAtA[i:], m.FieldManager)
return i, nil return i, nil
} }
@ -1559,6 +1563,10 @@ func (m *PatchOptions) MarshalTo(dAtA []byte) (int, error) {
} }
i++ i++
} }
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldManager)))
i += copy(dAtA[i:], m.FieldManager)
return i, nil return i, nil
} }
@ -1855,6 +1863,10 @@ func (m *UpdateOptions) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s) i += copy(dAtA[i:], s)
} }
} }
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldManager)))
i += copy(dAtA[i:], m.FieldManager)
return i, nil return i, nil
} }
@ -2040,6 +2052,8 @@ func (m *CreateOptions) Size() (n int) {
n += 1 + l + sovGenerated(uint64(l)) n += 1 + l + sovGenerated(uint64(l))
} }
} }
l = len(m.FieldManager)
n += 1 + l + sovGenerated(uint64(l))
return n return n
} }
@ -2402,6 +2416,8 @@ func (m *PatchOptions) Size() (n int) {
if m.Force != nil { if m.Force != nil {
n += 2 n += 2
} }
l = len(m.FieldManager)
n += 1 + l + sovGenerated(uint64(l))
return n return n
} }
@ -2516,6 +2532,8 @@ func (m *UpdateOptions) Size() (n int) {
n += 1 + l + sovGenerated(uint64(l)) n += 1 + l + sovGenerated(uint64(l))
} }
} }
l = len(m.FieldManager)
n += 1 + l + sovGenerated(uint64(l))
return n return n
} }
@ -2613,6 +2631,7 @@ func (this *CreateOptions) String() string {
} }
s := strings.Join([]string{`&CreateOptions{`, s := strings.Join([]string{`&CreateOptions{`,
`DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`,
`FieldManager:` + fmt.Sprintf("%v", this.FieldManager) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -2877,6 +2896,7 @@ func (this *PatchOptions) String() string {
s := strings.Join([]string{`&PatchOptions{`, s := strings.Join([]string{`&PatchOptions{`,
`DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`,
`Force:` + valueToStringGenerated(this.Force) + `,`, `Force:` + valueToStringGenerated(this.Force) + `,`,
`FieldManager:` + fmt.Sprintf("%v", this.FieldManager) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -2982,6 +3002,7 @@ func (this *UpdateOptions) String() string {
} }
s := strings.Join([]string{`&UpdateOptions{`, s := strings.Join([]string{`&UpdateOptions{`,
`DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`,
`FieldManager:` + fmt.Sprintf("%v", this.FieldManager) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -3870,6 +3891,35 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
} }
m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FieldManager", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FieldManager = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -7448,6 +7498,35 @@ func (m *PatchOptions) Unmarshal(dAtA []byte) error {
} }
b := bool(v != 0) b := bool(v != 0)
m.Force = &b m.Force = &b
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FieldManager", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FieldManager = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -8562,6 +8641,35 @@ func (m *UpdateOptions) Unmarshal(dAtA []byte) error {
} }
m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FieldManager", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FieldManager = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -8881,171 +8989,172 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 2643 bytes of a gzipped FileDescriptorProto // 2664 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x39, 0x4d, 0x6c, 0x23, 0x49, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x19, 0x4d, 0x6c, 0x23, 0x57,
0xd5, 0x69, 0x3b, 0x76, 0xec, 0xe7, 0x38, 0x3f, 0xb5, 0xb3, 0xdf, 0xe7, 0xb5, 0x44, 0x9c, 0xed, 0x39, 0x63, 0xc7, 0x8e, 0xfd, 0x39, 0xce, 0xcf, 0xeb, 0x16, 0x5c, 0x4b, 0xc4, 0xe9, 0x14, 0x55,
0x45, 0xab, 0x2c, 0xcc, 0xda, 0x24, 0xc3, 0xae, 0x86, 0x01, 0x16, 0xe2, 0x38, 0x99, 0x0d, 0x3b, 0x29, 0x6c, 0x6d, 0x92, 0xd2, 0x6a, 0x59, 0xa0, 0x10, 0xc7, 0xc9, 0x36, 0x74, 0xd3, 0x44, 0x2f,
0xd9, 0x44, 0x95, 0x99, 0x41, 0x0c, 0x23, 0x44, 0xc7, 0x5d, 0x71, 0x9a, 0xd8, 0xdd, 0xbd, 0x55, 0xbb, 0x8b, 0x58, 0x56, 0x88, 0x89, 0xe7, 0xc5, 0x19, 0x62, 0xcf, 0x4c, 0xdf, 0x1b, 0x67, 0x37,
0xed, 0xcc, 0x04, 0x0e, 0xec, 0x01, 0x04, 0x48, 0x08, 0xcd, 0x91, 0x13, 0xda, 0x11, 0x5c, 0xb8, 0x70, 0xa0, 0x07, 0x10, 0x20, 0x01, 0xda, 0x23, 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x8d,
0xd7, 0x9e, 0x94, 0x84, 0x43, 0x91, 0x68, 0x0f, 0xf2, 0x94, 0xb0, 0x7e, 0x37, 0x98, 0xac, 0x44, 0x83, 0xa1, 0x7b, 0x30, 0xc3, 0xeb, 0xae, 0xe3, 0x76, 0x54, 0xed, 0x48, 0x39, 0x33, 0x68, 0x42,
0xec, 0x07, 0x56, 0xd0, 0x67, 0xb2, 0x36, 0x63, 0xc1, 0x8f, 0x95, 0x1c, 0xf3, 0x4f, 0x19, 0x28, 0xe2, 0xef, 0xda, 0x93, 0x92, 0x70, 0x28, 0x12, 0xed, 0x41, 0x9e, 0x12, 0xd6, 0xef, 0x06, 0x93,
0xdf, 0xb2, 0x0e, 0x48, 0x77, 0x9f, 0x74, 0x49, 0x3b, 0xf0, 0x28, 0xfa, 0x01, 0x94, 0x7a, 0x56, 0x95, 0x88, 0xfd, 0xc0, 0x0a, 0xfa, 0x4c, 0xd6, 0x66, 0x2c, 0xf8, 0xb1, 0x92, 0x63, 0xfe, 0x39,
0xd0, 0x3e, 0x12, 0xd0, 0x70, 0xe8, 0x6e, 0xa5, 0x53, 0x94, 0x90, 0x54, 0xdf, 0x89, 0xc5, 0xc8, 0x03, 0xe5, 0x9b, 0xd6, 0x01, 0xe9, 0xee, 0x93, 0x2e, 0x69, 0x07, 0x1e, 0x45, 0x3f, 0x80, 0x52,
0x82, 0xf8, 0x82, 0x3a, 0x58, 0x49, 0xc3, 0x60, 0x5d, 0x9b, 0x78, 0x29, 0x89, 0xef, 0xcd, 0x87, 0xcf, 0x0a, 0xda, 0x47, 0x02, 0x1a, 0x8e, 0xeb, 0xad, 0x74, 0x8a, 0x12, 0x92, 0xea, 0x3b, 0xb1,
0x3e, 0x9f, 0x08, 0x26, 0x7f, 0xa0, 0x25, 0x4c, 0xc0, 0xe4, 0xbd, 0xbe, 0x43, 0x49, 0x8f, 0xb8, 0x18, 0x59, 0x10, 0x9f, 0x53, 0x1f, 0x56, 0xd2, 0x30, 0x58, 0xd7, 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0xbc, 0xf5, 0x6d, 0x90, 0xb6, 0xc1, 0xfd, 0xb1, 0x01, 0x20, 0xb6, 0x19, 0x9b, 0x27, 0xc4,
0x2e, 0x8a, 0xa2, 0x54, 0x95, 0x33, 0x2a, 0x56, 0xc2, 0x9a, 0x2b, 0x4f, 0x9e, 0x2e, 0x4d, 0x7d, 0x0d, 0xb8, 0x1f, 0x78, 0xc0, 0x87, 0xfd, 0x20, 0x4e, 0xad, 0xc0, 0xa0, 0xdb, 0x90, 0xf7, 0xc4,
0xf4, 0x74, 0x69, 0xea, 0xe3, 0xa7, 0x4b, 0x53, 0xef, 0x9f, 0x2d, 0x19, 0x4f, 0xce, 0x96, 0x8c, 0x4c, 0xab, 0x56, 0xaa, 0x13, 0x6e, 0xa7, 0xa2, 0x24, 0x97, 0x83, 0x31, 0x56, 0xc2, 0x9a, 0x2b,
0x8f, 0xce, 0x96, 0x8c, 0x8f, 0xcf, 0x96, 0x8c, 0x4f, 0xce, 0x96, 0x8c, 0x47, 0x7f, 0x59, 0x9a, 0x8f, 0x9f, 0x2c, 0x4d, 0x7d, 0xf8, 0x64, 0x69, 0xea, 0xa3, 0x27, 0x4b, 0x53, 0xef, 0x9d, 0x2d,
0xba, 0x97, 0x39, 0x59, 0xfd, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xb1, 0xa3, 0x81, 0x52, 0x19, 0x8f, 0xcf, 0x96, 0x8c, 0x0f, 0xcf, 0x96, 0x8c, 0x8f, 0xce, 0x96, 0x8c, 0x8f, 0xcf, 0x96,
0x23, 0x00, 0x00, 0x8c, 0x87, 0x7f, 0x5d, 0x9a, 0xba, 0x9b, 0x39, 0x59, 0xfd, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff,
0x1a, 0xd0, 0x3c, 0x48, 0x01, 0x24, 0x00, 0x00,
} }

View File

@ -143,6 +143,13 @@ message CreateOptions {
// - All: all dry run stages will be processed // - All: all dry run stages will be processed
// +optional // +optional
repeated string dryRun = 1; repeated string dryRun = 1;
// fieldManager is a name associated with the actor or entity
// that is making these changes. The value must be less than or
// 128 characters long, and only contain printable characters,
// as defined by https://golang.org/pkg/unicode/#IsPrint.
// +optional
optional string fieldManager = 3;
} }
// DeleteOptions may be provided when deleting an API object. // DeleteOptions may be provided when deleting an API object.
@ -730,6 +737,16 @@ message PatchOptions {
// flag must be unset for non-apply patch requests. // flag must be unset for non-apply patch requests.
// +optional // +optional
optional bool force = 2; optional bool force = 2;
// fieldManager is a name associated with the actor or entity
// that is making these changes. The value must be less than or
// 128 characters long, and only contain printable characters,
// as defined by https://golang.org/pkg/unicode/#IsPrint. This
// field is required for apply requests
// (application/apply-patch) but optional for non-apply patch
// types (JsonPatch, MergePatch, StrategicMergePatch).
// +optional
optional string fieldManager = 3;
} }
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
@ -926,6 +943,13 @@ message UpdateOptions {
// - All: all dry run stages will be processed // - All: all dry run stages will be processed
// +optional // +optional
repeated string dryRun = 1; repeated string dryRun = 1;
// fieldManager is a name associated with the actor or entity
// that is making these changes. The value must be less than or
// 128 characters long, and only contain printable characters,
// as defined by https://golang.org/pkg/unicode/#IsPrint.
// +optional
optional string fieldManager = 2;
} }
// Verbs masks the value so protobuf can generate // Verbs masks the value so protobuf can generate

View File

@ -506,6 +506,13 @@ type CreateOptions struct {
// +optional // +optional
DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"`
// +k8s:deprecated=includeUninitialized,protobuf=2 // +k8s:deprecated=includeUninitialized,protobuf=2
// fieldManager is a name associated with the actor or entity
// that is making these changes. The value must be less than or
// 128 characters long, and only contain printable characters,
// as defined by https://golang.org/pkg/unicode/#IsPrint.
// +optional
FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,3,name=fieldManager"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@ -528,6 +535,16 @@ type PatchOptions struct {
// flag must be unset for non-apply patch requests. // flag must be unset for non-apply patch requests.
// +optional // +optional
Force *bool `json:"force,omitempty" protobuf:"varint,2,opt,name=force"` Force *bool `json:"force,omitempty" protobuf:"varint,2,opt,name=force"`
// fieldManager is a name associated with the actor or entity
// that is making these changes. The value must be less than or
// 128 characters long, and only contain printable characters,
// as defined by https://golang.org/pkg/unicode/#IsPrint. This
// field is required for apply requests
// (application/apply-patch) but optional for non-apply patch
// types (JsonPatch, MergePatch, StrategicMergePatch).
// +optional
FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,3,name=fieldManager"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@ -544,6 +561,13 @@ type UpdateOptions struct {
// - All: all dry run stages will be processed // - All: all dry run stages will be processed
// +optional // +optional
DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"`
// fieldManager is a name associated with the actor or entity
// that is making these changes. The value must be less than or
// 128 characters long, and only contain printable characters,
// as defined by https://golang.org/pkg/unicode/#IsPrint.
// +optional
FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,2,name=fieldManager"`
} }
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

View File

@ -87,8 +87,9 @@ func (APIVersions) SwaggerDoc() map[string]string {
} }
var map_CreateOptions = map[string]string{ var map_CreateOptions = map[string]string{
"": "CreateOptions may be provided when creating an API object.", "": "CreateOptions may be provided when creating an API object.",
"dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.",
} }
func (CreateOptions) SwaggerDoc() map[string]string { func (CreateOptions) SwaggerDoc() map[string]string {
@ -282,9 +283,10 @@ func (Patch) SwaggerDoc() map[string]string {
} }
var map_PatchOptions = map[string]string{ var map_PatchOptions = map[string]string{
"": "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", "": "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.",
"dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"force": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", "force": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.",
"fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).",
} }
func (PatchOptions) SwaggerDoc() map[string]string { func (PatchOptions) SwaggerDoc() map[string]string {
@ -369,8 +371,9 @@ func (TypeMeta) SwaggerDoc() map[string]string {
} }
var map_UpdateOptions = map[string]string{ var map_UpdateOptions = map[string]string{
"": "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", "": "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.",
"dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.",
} }
func (UpdateOptions) SwaggerDoc() map[string]string { func (UpdateOptions) SwaggerDoc() map[string]string {

View File

@ -10,7 +10,11 @@ go_test(
name = "go_default_test", name = "go_default_test",
srcs = ["validation_test.go"], srcs = ["validation_test.go"],
embed = [":go_default_library"], embed = [":go_default_library"],
deps = ["//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"], deps = [
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
],
) )
go_library( go_library(

View File

@ -17,6 +17,9 @@ limitations under the License.
package validation package validation
import ( import (
"fmt"
"unicode"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
@ -91,22 +94,58 @@ func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList {
} }
func ValidateCreateOptions(options *metav1.CreateOptions) field.ErrorList { func ValidateCreateOptions(options *metav1.CreateOptions) field.ErrorList {
return ValidateDryRun(field.NewPath("dryRun"), options.DryRun) return append(
ValidateFieldManager(options.FieldManager, field.NewPath("fieldManager")),
ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...,
)
} }
func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList { func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList {
return ValidateDryRun(field.NewPath("dryRun"), options.DryRun) return append(
ValidateFieldManager(options.FieldManager, field.NewPath("fieldManager")),
ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...,
)
} }
func ValidatePatchOptions(options *metav1.PatchOptions, patchType types.PatchType) field.ErrorList { func ValidatePatchOptions(options *metav1.PatchOptions, patchType types.PatchType) field.ErrorList {
allErrs := field.ErrorList{} allErrs := field.ErrorList{}
if patchType != types.ApplyPatchType && options.Force != nil { if patchType != types.ApplyPatchType {
allErrs = append(allErrs, field.Forbidden(field.NewPath("force"), "may not be specified for non-apply patch")) if options.Force != nil {
allErrs = append(allErrs, field.Forbidden(field.NewPath("force"), "may not be specified for non-apply patch"))
}
} else {
if options.FieldManager == "" {
// This field is defaulted to "kubectl" by kubectl, but HAS TO be explicitly set by controllers.
allErrs = append(allErrs, field.Required(field.NewPath("fieldManager"), "is required for apply patch"))
}
} }
allErrs = append(allErrs, ValidateFieldManager(options.FieldManager, field.NewPath("fieldManager"))...)
allErrs = append(allErrs, ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...) allErrs = append(allErrs, ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...)
return allErrs return allErrs
} }
var FieldManagerMaxLength = 128
// ValidateFieldManager valides that the fieldManager is the proper length and
// only has printable characters.
func ValidateFieldManager(fieldManager string, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
// the field can not be set as a `*string`, so a empty string ("") is
// considered as not set and is defaulted by the rest of the process
// (unless apply is used, in which case it is required).
if len(fieldManager) > FieldManagerMaxLength {
allErrs = append(allErrs, field.TooLong(fldPath, fieldManager, FieldManagerMaxLength))
}
// Verify that all characters are printable.
for i, r := range fieldManager {
if !unicode.IsPrint(r) {
allErrs = append(allErrs, field.Invalid(fldPath, fieldManager, fmt.Sprintf("invalid character %#U (at position %d)", r, i)))
}
}
return allErrs
}
var allowedDryRunValues = sets.NewString(metav1.DryRunAll) var allowedDryRunValues = sets.NewString(metav1.DryRunAll)
// ValidateDryRun validates that a dryRun query param only contains allowed values. // ValidateDryRun validates that a dryRun query param only contains allowed values.

View File

@ -21,6 +21,8 @@ import (
"strings" "strings"
"testing" "testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/validation/field"
) )
@ -125,3 +127,117 @@ func TestInvalidDryRun(t *testing.T) {
} }
} }
func boolPtr(b bool) *bool {
return &b
}
func TestValidPatchOptions(t *testing.T) {
tests := []struct {
opts metav1.PatchOptions
patchType types.PatchType
}{
{
opts: metav1.PatchOptions{
Force: boolPtr(true),
FieldManager: "kubectl",
},
patchType: types.ApplyPatchType,
},
{
opts: metav1.PatchOptions{
FieldManager: "kubectl",
},
patchType: types.ApplyPatchType,
},
{
opts: metav1.PatchOptions{},
patchType: types.MergePatchType,
},
{
opts: metav1.PatchOptions{
FieldManager: "patcher",
},
patchType: types.MergePatchType,
},
}
for _, test := range tests {
t.Run(fmt.Sprintf("%v", test.opts), func(t *testing.T) {
errs := ValidatePatchOptions(&test.opts, test.patchType)
if len(errs) != 0 {
t.Fatalf("Expected no failures, got: %v", errs)
}
})
}
}
func TestInvalidPatchOptions(t *testing.T) {
tests := []struct {
opts metav1.PatchOptions
patchType types.PatchType
}{
// missing manager
{
opts: metav1.PatchOptions{},
patchType: types.ApplyPatchType,
},
// force on non-apply
{
opts: metav1.PatchOptions{
Force: boolPtr(true),
},
patchType: types.MergePatchType,
},
// manager and force on non-apply
{
opts: metav1.PatchOptions{
FieldManager: "kubectl",
Force: boolPtr(false),
},
patchType: types.MergePatchType,
},
}
for _, test := range tests {
t.Run(fmt.Sprintf("%v", test.opts), func(t *testing.T) {
errs := ValidatePatchOptions(&test.opts, test.patchType)
if len(errs) == 0 {
t.Fatal("Expected failures, got none.")
}
})
}
}
func TestValidateFieldManagerValid(t *testing.T) {
tests := []string{
"filedManager",
"你好", // Hello
"🍔",
}
for _, test := range tests {
t.Run(test, func(t *testing.T) {
errs := ValidateFieldManager(test, field.NewPath("fieldManager"))
if len(errs) != 0 {
t.Errorf("Validation failed: %v", errs)
}
})
}
}
func TestValidateFieldManagerInvalid(t *testing.T) {
tests := []string{
"field\nmanager", // Contains invalid character \n
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", // Has 129 chars
}
for _, test := range tests {
t.Run(test, func(t *testing.T) {
errs := ValidateFieldManager(test, field.NewPath("fieldManager"))
if len(errs) == 0 {
t.Errorf("Validation should have failed")
}
})
}
}

View File

@ -9,6 +9,7 @@ load(
go_test( go_test(
name = "go_default_test", name = "go_default_test",
srcs = [ srcs = [
"create_test.go",
"namer_test.go", "namer_test.go",
"rest_test.go", "rest_test.go",
], ],

View File

@ -17,11 +17,14 @@ limitations under the License.
package handlers package handlers
import ( import (
"bytes"
"context" "context"
"fmt" "fmt"
"net/http" "net/http"
"strings" "strings"
"time" "time"
"unicode"
"unicode/utf8"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
@ -141,7 +144,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, admit admission.Inte
return return
} }
obj, err = scope.FieldManager.Update(liveObj, obj, prefixFromUserAgent(req.UserAgent())) obj, err = scope.FieldManager.Update(liveObj, obj, managerOrUserAgent(options.FieldManager, req.UserAgent()))
if err != nil { if err != nil {
scope.err(fmt.Errorf("failed to update object (Create for %v) managed fields: %v", scope.Kind, err), w, req) scope.err(fmt.Errorf("failed to update object (Create for %v) managed fields: %v", scope.Kind, err), w, req)
return return
@ -193,6 +196,31 @@ func (c *namedCreaterAdapter) Create(ctx context.Context, name string, obj runti
return c.Creater.Create(ctx, obj, createValidatingAdmission, options) return c.Creater.Create(ctx, obj, createValidatingAdmission, options)
} }
func prefixFromUserAgent(u string) string { // manager is assumed to be already a valid value, we need to make
return strings.Split(u, "/")[0] // userAgent into a valid value too.
func managerOrUserAgent(manager, userAgent string) string {
if manager != "" {
return manager
}
return prefixFromUserAgent(userAgent)
}
// prefixFromUserAgent takes the characters preceding the first /, quote
// unprintable character and then trim what's beyond the
// FieldManagerMaxLength limit.
func prefixFromUserAgent(u string) string {
m := strings.Split(u, "/")[0]
buf := bytes.NewBuffer(nil)
for _, r := range m {
// Ignore non-printable characters
if !unicode.IsPrint(r) {
continue
}
// Only append if we have room for it
if buf.Len()+utf8.RuneLen(r) > validation.FieldManagerMaxLength {
break
}
buf.WriteRune(r)
}
return buf.String()
} }

View File

@ -0,0 +1,60 @@
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package handlers
import (
"fmt"
"testing"
)
func TestManagerOrUserAgent(t *testing.T) {
tests := []struct {
manager string
userAgent string
expected string
}{
{
manager: "",
userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
expected: "Mozilla",
},
{
manager: "",
userAgent: "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/Something",
expected: "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
},
{
manager: "",
userAgent: "🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔",
expected: "🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔",
},
{
manager: "manager",
userAgent: "userAgent",
expected: "manager",
},
}
for _, test := range tests {
t.Run(fmt.Sprintf("%v-%v", test.manager, test.userAgent), func(t *testing.T) {
got := managerOrUserAgent(test.manager, test.userAgent)
if got != test.expected {
t.Errorf("Wanted %#v, got %#v", test.expected, got)
}
})
}
}

View File

@ -30,8 +30,6 @@ import (
"sigs.k8s.io/structured-merge-diff/merge" "sigs.k8s.io/structured-merge-diff/merge"
) )
const applyManager = "apply"
// FieldManager updates the managed fields and merge applied // FieldManager updates the managed fields and merge applied
// configurations. // configurations.
type FieldManager struct { type FieldManager struct {
@ -141,7 +139,7 @@ func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (r
// Apply is used when server-side apply is called, as it merges the // Apply is used when server-side apply is called, as it merges the
// object and update the managed fields. // object and update the managed fields.
func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, force bool) (runtime.Object, error) { func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, fieldManager string, force bool) (runtime.Object, error) {
// If the object doesn't have metadata, apply isn't allowed. // If the object doesn't have metadata, apply isn't allowed.
if _, err := meta.Accessor(liveObj); err != nil { if _, err := meta.Accessor(liveObj); err != nil {
return nil, fmt.Errorf("couldn't get accessor: %v", err) return nil, fmt.Errorf("couldn't get accessor: %v", err)
@ -168,7 +166,7 @@ func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, force bool) (
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to create typed live object: %v", err) return nil, fmt.Errorf("failed to create typed live object: %v", err)
} }
manager, err := f.buildManagerInfo(applyManager, metav1.ManagedFieldsOperationApply) manager, err := f.buildManagerInfo(fieldManager, metav1.ManagedFieldsOperationApply)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to build manager identifier: %v", err) return nil, fmt.Errorf("failed to build manager identifier: %v", err)
} }

View File

@ -96,7 +96,7 @@ func TestApplyStripsFields(t *testing.T) {
}], }],
"resourceVersion": "b" "resourceVersion": "b"
} }
}`), false) }`), "fieldmanager_test", false)
if err != nil { if err != nil {
t.Fatalf("failed to apply object: %v", err) t.Fatalf("failed to apply object: %v", err)
} }
@ -110,6 +110,7 @@ func TestApplyStripsFields(t *testing.T) {
t.Fatalf("fields did not get stripped on apply: %v", m) t.Fatalf("fields did not get stripped on apply: %v", m)
} }
} }
func TestApplyDoesNotStripLabels(t *testing.T) { func TestApplyDoesNotStripLabels(t *testing.T) {
f := NewTestFieldManager(t) f := NewTestFieldManager(t)
@ -123,7 +124,7 @@ func TestApplyDoesNotStripLabels(t *testing.T) {
"a": "b" "a": "b"
}, },
} }
}`), false) }`), "fieldmanager_test", false)
if err != nil { if err != nil {
t.Fatalf("failed to apply object: %v", err) t.Fatalf("failed to apply object: %v", err)
} }

View File

@ -320,7 +320,7 @@ func (p *jsonPatcher) applyPatchToCurrentObject(currentObject runtime.Object) (r
} }
if p.fieldManager != nil { if p.fieldManager != nil {
if objToUpdate, err = p.fieldManager.Update(currentObject, objToUpdate, prefixFromUserAgent(p.userAgent)); err != nil { if objToUpdate, err = p.fieldManager.Update(currentObject, objToUpdate, managerOrUserAgent(p.options.FieldManager, p.userAgent)); err != nil {
return nil, fmt.Errorf("failed to update object (json PATCH for %v) managed fields: %v", p.kind, err) return nil, fmt.Errorf("failed to update object (json PATCH for %v) managed fields: %v", p.kind, err)
} }
} }
@ -387,7 +387,7 @@ func (p *smpPatcher) applyPatchToCurrentObject(currentObject runtime.Object) (ru
} }
if p.fieldManager != nil { if p.fieldManager != nil {
if newObj, err = p.fieldManager.Update(currentObject, newObj, prefixFromUserAgent(p.userAgent)); err != nil { if newObj, err = p.fieldManager.Update(currentObject, newObj, managerOrUserAgent(p.options.FieldManager, p.userAgent)); err != nil {
return nil, fmt.Errorf("failed to update object (smp PATCH for %v) managed fields: %v", p.kind, err) return nil, fmt.Errorf("failed to update object (smp PATCH for %v) managed fields: %v", p.kind, err)
} }
} }
@ -414,7 +414,7 @@ func (p *applyPatcher) applyPatchToCurrentObject(obj runtime.Object) (runtime.Ob
if p.fieldManager == nil { if p.fieldManager == nil {
panic("FieldManager must be installed to run apply") panic("FieldManager must be installed to run apply")
} }
return p.fieldManager.Apply(obj, p.patch, force) return p.fieldManager.Apply(obj, p.patch, p.options.FieldManager, force)
} }
func (p *applyPatcher) createNewObject() (runtime.Object, error) { func (p *applyPatcher) createNewObject() (runtime.Object, error) {

View File

@ -124,7 +124,7 @@ func UpdateResource(r rest.Updater, scope RequestScope, admit admission.Interfac
transformers := []rest.TransformFunc{} transformers := []rest.TransformFunc{}
if scope.FieldManager != nil { if scope.FieldManager != nil {
transformers = append(transformers, func(_ context.Context, newObj, liveObj runtime.Object) (runtime.Object, error) { transformers = append(transformers, func(_ context.Context, newObj, liveObj runtime.Object) (runtime.Object, error) {
obj, err := scope.FieldManager.Update(liveObj, newObj, prefixFromUserAgent(req.UserAgent())) obj, err := scope.FieldManager.Update(liveObj, newObj, managerOrUserAgent(options.FieldManager, req.UserAgent()))
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to update object (Update for %v) managed fields: %v", scope.Kind, err) return nil, fmt.Errorf("failed to update object (Update for %v) managed fields: %v", scope.Kind, err)
} }

View File

@ -249,12 +249,12 @@ run_kubectl_apply_tests() {
set -o errexit set -o errexit
create_and_use_new_namespace create_and_use_new_namespace
kube::log::status "Testing kubectl apply --server-side" kube::log::status "Testing kubectl apply --experimental-server-side"
## kubectl apply should create the resource that doesn't exist yet ## kubectl apply should create the resource that doesn't exist yet
# Pre-Condition: no POD exists # Pre-Condition: no POD exists
kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" '' kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
# Command: apply a pod "test-pod" (doesn't exist) should create this pod # Command: apply a pod "test-pod" (doesn't exist) should create this pod
kubectl apply --server-side -f hack/testdata/pod.yaml "${kube_flags[@]}" kubectl apply --experimental-server-side -f hack/testdata/pod.yaml "${kube_flags[@]}"
# Post-Condition: pod "test-pod" is created # Post-Condition: pod "test-pod" is created
kube::test::get_object_assert 'pods test-pod' "{{${labels_field}.name}}" 'test-pod-label' kube::test::get_object_assert 'pods test-pod' "{{${labels_field}.name}}" 'test-pod-label'
# Clean up # Clean up
@ -265,13 +265,13 @@ run_kubectl_apply_tests() {
kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" '' kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
# apply dry-run # apply dry-run
kubectl apply --server-side --server-dry-run -f hack/testdata/pod.yaml "${kube_flags[@]}" kubectl apply --experimental-server-side --server-dry-run -f hack/testdata/pod.yaml "${kube_flags[@]}"
# No pod exists # No pod exists
kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" '' kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
# apply non dry-run creates the pod # apply non dry-run creates the pod
kubectl apply --server-side -f hack/testdata/pod.yaml "${kube_flags[@]}" kubectl apply --experimental-server-side -f hack/testdata/pod.yaml "${kube_flags[@]}"
# apply changes # apply changes
kubectl apply --server-side --server-dry-run -f hack/testdata/pod-apply.yaml "${kube_flags[@]}" kubectl apply --experimental-server-side --server-dry-run -f hack/testdata/pod-apply.yaml "${kube_flags[@]}"
# Post-Condition: label still has initial value # Post-Condition: label still has initial value
kube::test::get_object_assert 'pods test-pod' "{{${labels_field}.name}}" 'test-pod-label' kube::test::get_object_assert 'pods test-pod' "{{${labels_field}.name}}" 'test-pod-label'
@ -302,7 +302,7 @@ run_kubectl_apply_tests() {
__EOF__ __EOF__
# Dry-run create the CR # Dry-run create the CR
kubectl "${kube_flags[@]}" apply --server-side --server-dry-run -f hack/testdata/CRD/resource.yaml "${kube_flags[@]}" kubectl "${kube_flags[@]}" apply --experimental-server-side --server-dry-run -f hack/testdata/CRD/resource.yaml "${kube_flags[@]}"
# Make sure that the CR doesn't exist # Make sure that the CR doesn't exist
! kubectl "${kube_flags[@]}" get resource/myobj ! kubectl "${kube_flags[@]}" get resource/myobj

View File

@ -2,10 +2,15 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
go_test( go_test(
name = "go_default_test", name = "go_default_test",
size = "large",
srcs = [ srcs = [
"apply_test.go", "apply_test.go",
"main_test.go", "main_test.go",
], ],
tags = [
"etcd",
"integration",
],
deps = [ deps = [
"//pkg/master:go_default_library", "//pkg/master:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",

View File

@ -106,6 +106,7 @@ func TestApplyAlsoCreates(t *testing.T) {
Namespace("default"). Namespace("default").
Resource(tc.resource). Resource(tc.resource).
Name(tc.name). Name(tc.name).
Param("fieldManager", "apply_test").
Body([]byte(tc.body)). Body([]byte(tc.body)).
Do(). Do().
Get() Get()
@ -132,6 +133,7 @@ func TestCreateOnApplyFailsWithUID(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("pods"). Resource("pods").
Name("test-pod-uid"). Name("test-pod-uid").
Param("fieldManager", "apply_test").
Body([]byte(`{ Body([]byte(`{
"apiVersion": "v1", "apiVersion": "v1",
"kind": "Pod", "kind": "Pod",
@ -194,6 +196,7 @@ func TestApplyUpdateApplyConflictForced(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("deployments"). Resource("deployments").
Name("deployment"). Name("deployment").
Param("fieldManager", "apply_test").
Body(obj).Do().Get() Body(obj).Do().Get()
if err != nil { if err != nil {
t.Fatalf("Failed to create object using Apply patch: %v", err) t.Fatalf("Failed to create object using Apply patch: %v", err)
@ -214,6 +217,7 @@ func TestApplyUpdateApplyConflictForced(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("deployments"). Resource("deployments").
Name("deployment"). Name("deployment").
Param("fieldManager", "apply_test").
Body([]byte(obj)).Do().Get() Body([]byte(obj)).Do().Get()
if err == nil { if err == nil {
t.Fatalf("Expecting to get conflicts when applying object") t.Fatalf("Expecting to get conflicts when applying object")
@ -232,6 +236,7 @@ func TestApplyUpdateApplyConflictForced(t *testing.T) {
Resource("deployments"). Resource("deployments").
Name("deployment"). Name("deployment").
Param("force", "true"). Param("force", "true").
Param("fieldManager", "apply_test").
Body([]byte(obj)).Do().Get() Body([]byte(obj)).Do().Get()
if err != nil { if err != nil {
t.Fatalf("Failed to apply object with force: %v", err) t.Fatalf("Failed to apply object with force: %v", err)
@ -249,6 +254,7 @@ func TestApplyManagedFields(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("configmaps"). Resource("configmaps").
Name("test-cm"). Name("test-cm").
Param("fieldManager", "apply_test").
Body([]byte(`{ Body([]byte(`{
"apiVersion": "v1", "apiVersion": "v1",
"kind": "ConfigMap", "kind": "ConfigMap",
@ -273,6 +279,7 @@ func TestApplyManagedFields(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("configmaps"). Resource("configmaps").
Name("test-cm"). Name("test-cm").
Param("fieldManager", "updater").
Body([]byte(`{"data":{"key": "new value"}}`)).Do().Get() Body([]byte(`{"data":{"key": "new value"}}`)).Do().Get()
if err != nil { if err != nil {
t.Fatalf("Failed to patch object: %v", err) t.Fatalf("Failed to patch object: %v", err)
@ -306,7 +313,7 @@ func TestApplyManagedFields(t *testing.T) {
}, },
"managedFields": [ "managedFields": [
{ {
"manager": "apply", "manager": "apply_test",
"operation": "Apply", "operation": "Apply",
"apiVersion": "v1", "apiVersion": "v1",
"fields": { "fields": {
@ -318,7 +325,7 @@ func TestApplyManagedFields(t *testing.T) {
} }
}, },
{ {
"manager": "` + accessor.GetManagedFields()[1].Manager + `", "manager": "updater",
"operation": "Update", "operation": "Update",
"apiVersion": "v1", "apiVersion": "v1",
"time": "` + accessor.GetManagedFields()[1].Time.UTC().Format(time.RFC3339) + `", "time": "` + accessor.GetManagedFields()[1].Time.UTC().Format(time.RFC3339) + `",
@ -360,6 +367,7 @@ func TestApplyRemovesEmptyManagedFields(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("configmaps"). Resource("configmaps").
Name("test-cm"). Name("test-cm").
Param("fieldManager", "apply_test").
Body(obj). Body(obj).
Do(). Do().
Get() Get()
@ -371,6 +379,7 @@ func TestApplyRemovesEmptyManagedFields(t *testing.T) {
Namespace("default"). Namespace("default").
Resource("configmaps"). Resource("configmaps").
Name("test-cm"). Name("test-cm").
Param("fieldManager", "apply_test").
Body(obj).Do().Get() Body(obj).Do().Get()
if err != nil { if err != nil {
t.Fatalf("Failed to patch object: %v", err) t.Fatalf("Failed to patch object: %v", err)
@ -390,3 +399,42 @@ func TestApplyRemovesEmptyManagedFields(t *testing.T) {
t.Fatalf("Object contains unexpected managedFields: %v", managed) t.Fatalf("Object contains unexpected managedFields: %v", managed)
} }
} }
func TestApplyRequiresFieldManager(t *testing.T) {
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, genericfeatures.ServerSideApply, true)()
_, client, closeFn := setup(t)
defer closeFn()
obj := []byte(`{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "test-cm",
"namespace": "default"
}
}`)
_, err := client.CoreV1().RESTClient().Patch(types.ApplyPatchType).
Namespace("default").
Resource("configmaps").
Name("test-cm").
Body(obj).
Do().
Get()
if err == nil {
t.Fatalf("Apply should fail to create without fieldManager")
}
_, err = client.CoreV1().RESTClient().Patch(types.ApplyPatchType).
Namespace("default").
Resource("configmaps").
Name("test-cm").
Param("fieldManager", "apply_test").
Body(obj).
Do().
Get()
if err != nil {
t.Fatalf("Apply failed to create with fieldManager: %v", err)
}
}

View File

@ -567,6 +567,9 @@ func TestRBAC(t *testing.T) {
if r.verb == "PATCH" { if r.verb == "PATCH" {
// For patch operations, use the apply content type // For patch operations, use the apply content type
req.Header.Add("Content-Type", string(types.ApplyPatchType)) req.Header.Add("Content-Type", string(types.ApplyPatchType))
q := req.URL.Query()
q.Add("fieldManager", "rbac_test")
req.URL.RawQuery = q.Encode()
} }
if err != nil { if err != nil {