-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Describe the bug
IgnoreVolumeClaimTemplateTypeMetaAndStatus looks not work
Steps to reproduce the issue:
I tried to compare the two statefulsets like this
opts := []patch.CalculateOption{
patch.IgnoreStatusFields(),
patch.IgnoreVolumeClaimTemplateTypeMetaAndStatus(),
}
patchResult, err := patch.DefaultPatchMaker.Calculate(old, new, opts...)
fmt.Printf("==========================%+v\n", patchResult.String())I got this
Patch: {"spec":{"volumeClaimTemplates":[{"metadata":{"name":"emqx-data","namespace":"default"},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"20Mi"}},"storageClassName":"standard"},"status":{"phase":"Pending"}},{"metadata":{"name":"emqx-log","namespace":"default"},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"20Mi"}},"storageClassName":"standard"},"status":{"phase":"Pending"}}]}}
volumeClaimTemplates is not ignored
Expected behavior
volumeClaimTemplates should be ignored
Additional context
k8s-objectmatcher version: v1.7.0
go version: go1.17.3 darwin/amd64
Metadata
Metadata
Assignees
Labels
No labels