Skip to content

Commit

Permalink
[cherry-pick] Update Kubernetes v1.18.9 dependencies (#123) (#124)
Browse files Browse the repository at this point in the history
/cherry-pick

Signed-off-by: 1gtm <1gtm@appscode.com>
  • Loading branch information
1gtm committed Dec 17, 2020
1 parent 2927d77 commit 70d872d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
k8s.io/apimachinery v0.18.9
k8s.io/client-go v12.0.0+incompatible
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6
kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8
kmodules.xyz/client-go v0.0.0-20201208053851-a1d7be95e006
kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4
kmodules.xyz/custom-resources v0.0.0-20201124062543-bd8d35c21b0c
kmodules.xyz/offshoot-api v0.0.0-20201105074700-8675f5f686f2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,8 @@ kmodules.xyz/client-go v0.0.0-20200818171030-24b2ce405feb/go.mod h1:sY/eoe4ktxZE
kmodules.xyz/client-go v0.0.0-20200903033732-dab39b86c81b/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8 h1:zs2+yI/Ola5HjdtfP29XD76Bx5BO4WchC2uN9lkhxQM=
kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw=
kmodules.xyz/client-go v0.0.0-20201208053851-a1d7be95e006 h1:gNrNTwi0jViRqdszsb0W5CQF+ANNVFlvh/LO0A3R7dM=
kmodules.xyz/client-go v0.0.0-20201208053851-a1d7be95e006/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw=
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
kmodules.xyz/constants v0.0.0-20200923054614-6b87dbbae4d6/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95 h1:v0S/+ftzL6Xrs9XevgchAOJyPKlRQXPiZf87xotj3X4=
Expand Down
8 changes: 7 additions & 1 deletion vendor/kmodules.xyz/client-go/core/v1/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ func EnsureContainerDeleted(containers []core.Container, name string) []core.Con
func UpsertContainer(containers []core.Container, upsert core.Container) []core.Container {
for i, container := range containers {
if container.Name == upsert.Name {
err := mergo.MergeWithOverwrite(&container, upsert)
err := mergo.Merge(&container, upsert, mergo.WithOverride)
if err != nil {
panic(err)
}
// mergo does not overwrite "dst (container)" using empty "src (upsert)" values.
// This causes problem we want to remove args or commands (eg, disable TLS).
// TODO: should this be done for all the []string type fields (eg, EnvFrom etc.)?
container.Command = upsert.Command
container.Args = upsert.Args
container.Env = upsert.Env
containers[i] = container
return containers
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ k8s.io/utils/net
k8s.io/utils/path
k8s.io/utils/pointer
k8s.io/utils/trace
# kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8
# kmodules.xyz/client-go v0.0.0-20201208053851-a1d7be95e006
kmodules.xyz/client-go
kmodules.xyz/client-go/api/v1
kmodules.xyz/client-go/apiextensions
Expand Down

0 comments on commit 70d872d

Please sign in to comment.