Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kubernetes v1.18.3 dependencies #1168

Merged
merged 1 commit into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
k8s.io/client-go v12.0.0+incompatible
k8s.io/kube-aggregator v0.18.3
k8s.io/kubernetes v1.18.3
kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624
kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72
kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9
kmodules.xyz/objectstore-api v0.0.0-20200521103120-92080446e04d
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,8 @@ kmodules.xyz/client-go v0.0.0-20200525195850-2fd180961371 h1:PPawDOMyDHGeDPN8j1e
kmodules.xyz/client-go v0.0.0-20200525195850-2fd180961371/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
kmodules.xyz/client-go v0.0.0-20200630053911-20d035822d35 h1:gDzZWVvgAaEBzo4lxMGhPUWqySgFyFDkcqw3NskZiwQ=
kmodules.xyz/client-go v0.0.0-20200630053911-20d035822d35/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624 h1:ZIyizuhoEmGNdrlZTks8smohLJe/UpHqfOSj4yMGL7M=
kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c h1:L2S0IoDmESgIs72MKfY2Sb3xjOw1oOrrzgrtzNKcSBg=
kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72 h1:0sM6nE7aJon/PSdqZTj0bKJlPyzobXkG0wVYKpjcJJE=
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95/go.mod h1:jpu8xFsDKd6kAWUAKk8oTu/GQGBWqhrcaDeOJdaCJnk=
Expand Down
25 changes: 25 additions & 0 deletions vendor/kmodules.xyz/client-go/api/v1/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ func SetCertificate(certificates []CertificateSpec, newCertificate CertificateSp
return certificates
}

// GetCertificateSecretName returns the name of secret for a certificate alias.
func GetCertificateSecretName(certificates []CertificateSpec, alias string) (string, bool) {
idx, cert := GetCertificate(certificates, alias)
if idx == -1 {
return "", false
}
return cert.SecretName, cert.SecretName != ""
}

// SetMissingSecretNameForCertificate sets the missing secret name for a certificate.
// If the certificate does not exist, it will add a new certificate with the desired secret name.
func SetMissingSecretNameForCertificate(certificates []CertificateSpec, alias, secretName string) []CertificateSpec {
Expand All @@ -140,6 +149,22 @@ func SetMissingSecretNameForCertificate(certificates []CertificateSpec, alias, s
return certificates
}

// SetSecretNameForCertificate sets the secret name for a certificate.
// If the certificate does not exist, it will add a new certificate with the desired secret name.
// Otherwise, the secret name will be overwritten.
func SetSecretNameForCertificate(certificates []CertificateSpec, alias, secretName string) []CertificateSpec {
idx, _ := GetCertificate(certificates, alias)
if idx != -1 {
certificates[idx].SecretName = secretName
} else {
certificates = append(certificates, CertificateSpec{
Alias: alias,
SecretName: secretName,
})
}
return certificates
}

// RemoveCertificate remove a certificate from the certificate list referred by "aliaS" parameter.
func RemoveCertificate(certificates []CertificateSpec, alias string) []CertificateSpec {
idx, _ := GetCertificate(certificates, alias)
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ k8s.io/utils/net
k8s.io/utils/path
k8s.io/utils/pointer
k8s.io/utils/trace
# kmodules.xyz/client-go v0.0.0-20200805154632-5bf10f227624
# kmodules.xyz/client-go v0.0.0-20200807031423-96aa0172979c
kmodules.xyz/client-go
kmodules.xyz/client-go/admissionregistration/v1beta1
kmodules.xyz/client-go/api/v1
Expand Down