Closed kaushiksrinivas closed 3 years ago
@kaushiksrinivas, these functions might help: https://github.com/banzaicloud/k8s-objectmatcher/blob/af0ea18f6ccf72e970a35f370ff0a392b3a1ffdc/patch/deletenull.go#L28-L58
@Laci21 I beleive they are looking to ignore the status on the pvc template, which is indeed in the spec.
@kaushiksrinivas there is an option for that as well, please look at: https://github.com/banzaicloud/k8s-objectmatcher/blob/master/patch/deletenull.go#L44
Hi @Laci21 @pepov Thanks it worked fine. We had to add ignore IgnoreVolumeClaimTemplateTypeMetaAndStatus() and not just IgnoreStatusFields() to achieve this.
Thanks for the timely response and support.
We are trying to compare the statefulset instance running on k8s cluster vs a statefulset object spec created via gocode. Once the statefulset is created and exists in the cluster, the library does not exclude fields like Status of PersistantVolumeClaim within statefulset and results in saying that the objects does not match.
how do we avoid such instances ?