Skip to content

Commit 25e51b3

Browse files
authored
Update Kubernetes v1.18.9 dependencies (#1237)
/cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com>
1 parent 0a6bab0 commit 25e51b3

File tree

9 files changed

+289
-129
lines changed

9 files changed

+289
-129
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ require (
6666
k8s.io/kube-aggregator v0.18.9
6767
k8s.io/kubernetes v1.18.9
6868
k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 // indirect
69-
kmodules.xyz/client-go v0.0.0-20201021051118-03dac1aea508
69+
kmodules.xyz/client-go v0.0.0-20201027113349-01a6d453d836
7070
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72
7171
kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4
7272
kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41
73-
kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab
73+
kmodules.xyz/offshoot-api v0.0.0-20201027212804-f5e6dc573558
7474
kmodules.xyz/openshift v0.0.0-20200922211657-1ece16d36c18
7575
kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e
7676
kmodules.xyz/webhook-runtime v0.0.0-20200922211931-8337935590de

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,8 @@ kmodules.xyz/client-go v0.0.0-20200922200830-63d86b6e5b63 h1:luKlEul8LMhyyftoZN3
10121012
kmodules.xyz/client-go v0.0.0-20200922200830-63d86b6e5b63/go.mod h1:JZN34jqk6ZlR+QOnBPpnUVBab4rmfamqxfSvLaulBMY=
10131013
kmodules.xyz/client-go v0.0.0-20201021051118-03dac1aea508 h1:LjidyEzvw1rSlwRQLWNfElleLJ6vr9Uu5tn5H6JO+QA=
10141014
kmodules.xyz/client-go v0.0.0-20201021051118-03dac1aea508/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM=
1015+
kmodules.xyz/client-go v0.0.0-20201027113349-01a6d453d836 h1:oRtOV4teHgELaRJx+mjkpjlO03S9xl1g020RUoU4FDI=
1016+
kmodules.xyz/client-go v0.0.0-20201027113349-01a6d453d836/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM=
10151017
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72 h1:0sM6nE7aJon/PSdqZTj0bKJlPyzobXkG0wVYKpjcJJE=
10161018
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
10171019
kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4/go.mod h1:WrO3fryNyFCgqqyWnwI89lnzWA7kN072Ehya7ELGfzE=
@@ -1021,6 +1023,8 @@ kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41 h1:BsCSSPoY0uRGy
10211023
kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41/go.mod h1:XAWxC/b1ICoufU6XDV0AOHNQY+y+4/B3Z5uyLnW1B6s=
10221024
kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab h1:d/4AFAN0TfKgwhjbQYzwXXHT/5/vTP7SAAvS4uJX+wQ=
10231025
kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab/go.mod h1:Wy3/mWK2lWQOviKVpBtiCEYtLaYIaSiym8leZNKBUd4=
1026+
kmodules.xyz/offshoot-api v0.0.0-20201027212804-f5e6dc573558 h1:/gk1vlGimdRj3fYS2NUsoV4UKQxW/I2ORXssnz2sBNI=
1027+
kmodules.xyz/offshoot-api v0.0.0-20201027212804-f5e6dc573558/go.mod h1:+tGJRjfzEFm01qWQZcmTkFhB5dWA1jKHXnlUS6O4ZkQ=
10241028
kmodules.xyz/openshift v0.0.0-20200922211657-1ece16d36c18 h1:D1tzbwyrIPJBSmL3W/t2vT2aU3DVEYKf357a392REaY=
10251029
kmodules.xyz/openshift v0.0.0-20200922211657-1ece16d36c18/go.mod h1:kOnEGdrj+DxTYJWHftqEHeYywCgh9tEiBOD5kPhVbCc=
10261030
kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e h1:NASVP0dOE5Zdlq+3Op7Fh2Yc8ei32uf9PxEbuwGLQm0=

vendor/kmodules.xyz/client-go/core/v1/service.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,30 @@ func MergeServicePorts(cur, desired []core.ServicePort) []core.ServicePort {
106106
}
107107

108108
// ports
109-
curPorts := make(map[int32]core.ServicePort)
109+
curPorts := make(map[string]core.ServicePort)
110110
for _, p := range cur {
111-
curPorts[p.Port] = p
111+
curPorts[p.Name] = p
112112
}
113113
for i, dp := range desired {
114-
cp, ok := curPorts[dp.Port]
114+
cp, ok := curPorts[dp.Name]
115115

116116
// svc port not found
117117
if !ok {
118118
continue
119119
}
120120

121+
if dp.Port == 0 {
122+
dp.Port = cp.Port
123+
}
121124
if dp.NodePort == 0 {
122125
dp.NodePort = cp.NodePort // avoid reassigning port
123126
}
124127
if dp.Protocol == "" {
125128
dp.Protocol = cp.Protocol
126129
}
130+
if dp.AppProtocol == nil {
131+
dp.AppProtocol = cp.AppProtocol
132+
}
127133
desired[i] = dp
128134
}
129135
return desired

vendor/kmodules.xyz/offshoot-api/api/v1/generated.pb.go

Lines changed: 220 additions & 120 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/offshoot-api/api/v1/generated.proto

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/offshoot-api/api/v1/types.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,21 @@ type PodSpec struct {
158158
// Cannot be updated.
159159
// +optional
160160
Lifecycle *core.Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,16,opt,name=lifecycle"`
161+
162+
// Set DNS policy for the pod.
163+
// Defaults to "ClusterFirst".
164+
// Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
165+
// DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.
166+
// To have DNS options set along with hostNetwork, you have to specify DNS policy
167+
// explicitly to 'ClusterFirstWithHostNet'.
168+
// +optional
169+
DNSPolicy core.DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,17,opt,name=dnsPolicy,casttype=k8s.io/api/core/v1.DNSPolicy"`
170+
171+
// Specifies the DNS parameters of a pod.
172+
// Parameters specified here will be merged to the generated DNS
173+
// configuration based on DNSPolicy.
174+
// +optional
175+
DNSConfig *core.PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,18,opt,name=dnsConfig"`
161176
}
162177

163178
// ServiceTemplateSpec describes the data a service should have when created from a template
@@ -276,7 +291,9 @@ type ServicePort struct {
276291
NodePort int32 `json:"nodePort,omitempty" protobuf:"varint,3,opt,name=nodePort"`
277292
}
278293

279-
func MergeServicePorts(cur []core.ServicePort, desired []ServicePort) []core.ServicePort {
294+
// Beware of MergeServicePorts
295+
// ref: https://github.com/kmodules/client-go/blob/03dac1aea5084354127990a10d0b0e7529460dd5/core/v1/service.go#L103-L136
296+
func PatchServicePorts(cur []core.ServicePort, desired []ServicePort) []core.ServicePort {
280297
if len(desired) == 0 {
281298
return cur
282299
}

vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ k8s.io/utils/net
11111111
k8s.io/utils/path
11121112
k8s.io/utils/pointer
11131113
k8s.io/utils/trace
1114-
# kmodules.xyz/client-go v0.0.0-20201021051118-03dac1aea508
1114+
# kmodules.xyz/client-go v0.0.0-20201027113349-01a6d453d836
11151115
kmodules.xyz/client-go
11161116
kmodules.xyz/client-go/admissionregistration/v1beta1
11171117
kmodules.xyz/client-go/api/v1
@@ -1151,7 +1151,7 @@ kmodules.xyz/custom-resources/crds
11511151
# kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41
11521152
kmodules.xyz/objectstore-api/api/v1
11531153
kmodules.xyz/objectstore-api/osm
1154-
# kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab
1154+
# kmodules.xyz/offshoot-api v0.0.0-20201027212804-f5e6dc573558
11551155
kmodules.xyz/offshoot-api/api/v1
11561156
kmodules.xyz/offshoot-api/util
11571157
# kmodules.xyz/openshift v0.0.0-20200922211657-1ece16d36c18

0 commit comments

Comments
 (0)