1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Reset immutable fields in SyncSpec.

This commit is contained in:
lamai93 2018-12-05 15:26:33 +01:00
parent a438d333d1
commit 5dce377765

View file

@ -89,6 +89,9 @@ func (s *SyncSpec) SetDefaultsFrom(source SyncSpec) {
// Field names are relative to given field prefix.
func (s SyncSpec) ResetImmutableFields(fieldPrefix string, target *SyncSpec) []string {
var resetFields []string
if list := s.ExternalAccess.ResetImmutableFields(fieldPrefix+".externalAccess", &target.ExternalAccess); len(list) > 0 {
resetFields = append(resetFields, list...)
}
if list := s.Authentication.ResetImmutableFields(fieldPrefix+".auth", &target.Authentication); len(list) > 0 {
resetFields = append(resetFields, list...)
}