Skip to content

Commit 616ea78

Browse files
authored
Update Kubernetes v1.18.3 dependencies (#272)
Signed-off-by: 1gtm <1gtm@appscode.com>
1 parent b7b0d2b commit 616ea78

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
k8s.io/apimachinery v0.18.3
1313
k8s.io/apiserver v0.18.3
1414
k8s.io/client-go v12.0.0+incompatible
15-
kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624
15+
kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c
1616
kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9
1717
kmodules.xyz/webhook-runtime v0.0.0-20200522123600-ca70a7e28ed0
1818
kubedb.dev/apimachinery v0.14.0-beta.1.0.20200723065505-3b5e9ece8940

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,8 +1338,8 @@ kmodules.xyz/client-go v0.0.0-20200630053911-20d035822d35/go.mod h1:sY/eoe4ktxZE
13381338
kmodules.xyz/client-go v0.0.0-20200714060506-0b57b4060595/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
13391339
kmodules.xyz/client-go v0.0.0-20200723053948-317b6023eb5d h1:fB1AIAPWBMADV+OYF0Vck/FQZRVX5CfkfB3VAaEHKxU=
13401340
kmodules.xyz/client-go v0.0.0-20200723053948-317b6023eb5d/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
1341-
kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624 h1:ZIyizuhoEmGNdrlZTks8smohLJe/UpHqfOSj4yMGL7M=
1342-
kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
1341+
kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c h1:L2S0IoDmESgIs72MKfY2Sb3xjOw1oOrrzgrtzNKcSBg=
1342+
kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
13431343
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72 h1:0sM6nE7aJon/PSdqZTj0bKJlPyzobXkG0wVYKpjcJJE=
13441344
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
13451345
kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95/go.mod h1:jpu8xFsDKd6kAWUAKk8oTu/GQGBWqhrcaDeOJdaCJnk=

vendor/kmodules.xyz/client-go/api/v1/certificates.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ func SetCertificate(certificates []CertificateSpec, newCertificate CertificateSp
123123
return certificates
124124
}
125125

126+
// GetCertificateSecretName returns the name of secret for a certificate alias.
127+
func GetCertificateSecretName(certificates []CertificateSpec, alias string) (string, bool) {
128+
idx, cert := GetCertificate(certificates, alias)
129+
if idx == -1 {
130+
return "", false
131+
}
132+
return cert.SecretName, cert.SecretName != ""
133+
}
134+
126135
// SetMissingSecretNameForCertificate sets the missing secret name for a certificate.
127136
// If the certificate does not exist, it will add a new certificate with the desired secret name.
128137
func SetMissingSecretNameForCertificate(certificates []CertificateSpec, alias, secretName string) []CertificateSpec {
@@ -140,6 +149,22 @@ func SetMissingSecretNameForCertificate(certificates []CertificateSpec, alias, s
140149
return certificates
141150
}
142151

152+
// SetSecretNameForCertificate sets the secret name for a certificate.
153+
// If the certificate does not exist, it will add a new certificate with the desired secret name.
154+
// Otherwise, the secret name will be overwritten.
155+
func SetSecretNameForCertificate(certificates []CertificateSpec, alias, secretName string) []CertificateSpec {
156+
idx, _ := GetCertificate(certificates, alias)
157+
if idx != -1 {
158+
certificates[idx].SecretName = secretName
159+
} else {
160+
certificates = append(certificates, CertificateSpec{
161+
Alias: alias,
162+
SecretName: secretName,
163+
})
164+
}
165+
return certificates
166+
}
167+
143168
// RemoveCertificate remove a certificate from the certificate list referred by "aliaS" parameter.
144169
func RemoveCertificate(certificates []CertificateSpec, alias string) []CertificateSpec {
145170
idx, _ := GetCertificate(certificates, alias)

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ k8s.io/utils/net
934934
k8s.io/utils/path
935935
k8s.io/utils/pointer
936936
k8s.io/utils/trace
937-
# kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624
937+
# kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c
938938
kmodules.xyz/client-go
939939
kmodules.xyz/client-go/admissionregistration/v1beta1
940940
kmodules.xyz/client-go/api/v1

0 commit comments

Comments
 (0)