From 0bddceafa59a6c5573c0abbc44fed640a478fe93 Mon Sep 17 00:00:00 2001 From: Bogdan Petrea Date: Mon, 16 Mar 2020 10:01:24 +0200 Subject: [PATCH] Override the Deployment PodSpec Affinity when updated --- Gopkg.lock | 6 +++--- Gopkg.toml | 2 +- .../controller-util/mergo/transformers/transformers.go | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index de134e07..24a1403d 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -353,7 +353,7 @@ version = "v0.8.0" [[projects]] - digest = "1:6679ac04c914724cb4680ddb5f58b244eadae467445cab7851155ff4431ad198" + digest = "1:053d573098421bb4793ff0ce5a132c1bb2b75be3544debdd2710c92b1ca6ecd0" name = "github.com/presslabs/controller-util" packages = [ "mergo/transformers", @@ -361,8 +361,8 @@ "syncer", ] pruneopts = "T" - revision = "91b25f35eae842ee06cdc1751121160362993adf" - version = "v0.1.13" + revision = "518c2f5005ed101cc42c8075ff1bc25076275116" + version = "v0.1.14" [[projects]] digest = "1:3b5729e3fc486abc6fc16ce026331c3d196e788c3b973081ecf5d28ae3e1050d" diff --git a/Gopkg.toml b/Gopkg.toml index d4270dbc..da03fc6a 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -28,7 +28,7 @@ required = [ [[constraint]] name="github.com/presslabs/controller-util" - version="v0.1.13" + version="v0.1.14" # STANZAS BELOW ARE GENERATED AND MAY BE WRITTEN - DO NOT MODIFY BELOW THIS LINE. diff --git a/vendor/github.com/presslabs/controller-util/mergo/transformers/transformers.go b/vendor/github.com/presslabs/controller-util/mergo/transformers/transformers.go index 69dc1cb6..c4c29bb3 100644 --- a/vendor/github.com/presslabs/controller-util/mergo/transformers/transformers.go +++ b/vendor/github.com/presslabs/controller-util/mergo/transformers/transformers.go @@ -44,6 +44,7 @@ func init() { reflect.TypeOf([]corev1.LocalObjectReference{}): PodSpec.MergeListByKey("Name", mergo.WithOverride), reflect.TypeOf([]corev1.HostAlias{}): PodSpec.MergeListByKey("IP", mergo.WithOverride), reflect.TypeOf([]corev1.VolumeMount{}): PodSpec.MergeListByKey("MountPath", mergo.WithOverride), + reflect.TypeOf(corev1.Affinity{}): PodSpec.OverrideFields("NodeAffinity", "PodAffinity", "PodAntiAffinity"), } }