mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
vendor updates
This commit is contained in:
4
vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/BUILD
generated
vendored
4
vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/BUILD
generated
vendored
@ -14,6 +14,7 @@ go_library(
|
||||
"//pkg/registry/core/service/ipallocator:go_default_library",
|
||||
"//pkg/util/version:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/bootstrap/token/api:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@ -33,7 +34,6 @@ filegroup(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["constants_test.go"],
|
||||
importpath = "k8s.io/kubernetes/cmd/kubeadm/app/constants",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = ["//pkg/util/version:go_default_library"],
|
||||
)
|
||||
|
71
vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants.go
generated
vendored
71
vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants.go
generated
vendored
@ -25,6 +25,7 @@ import (
|
||||
"time"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
bootstrapapi "k8s.io/client-go/tools/bootstrap/token/api"
|
||||
"k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
|
||||
"k8s.io/kubernetes/pkg/util/version"
|
||||
)
|
||||
@ -64,6 +65,33 @@ const (
|
||||
// APIServerKubeletClientCertCommonName defines kubelet client certificate common name (CN)
|
||||
APIServerKubeletClientCertCommonName = "kube-apiserver-kubelet-client"
|
||||
|
||||
// EtcdServerCertAndKeyBaseName defines etcd's server certificate and key base name
|
||||
EtcdServerCertAndKeyBaseName = "etcd/server"
|
||||
// EtcdServerCertName defines etcd's server certificate name
|
||||
EtcdServerCertName = "etcd/server.crt"
|
||||
// EtcdServerKeyName defines etcd's server key name
|
||||
EtcdServerKeyName = "etcd/server.key"
|
||||
// EtcdServerCertCommonName defines etcd's server certificate common name (CN)
|
||||
EtcdServerCertCommonName = "kube-etcd"
|
||||
|
||||
// EtcdPeerCertAndKeyBaseName defines etcd's peer certificate and key base name
|
||||
EtcdPeerCertAndKeyBaseName = "etcd/peer"
|
||||
// EtcdPeerCertName defines etcd's peer certificate name
|
||||
EtcdPeerCertName = "etcd/peer.crt"
|
||||
// EtcdPeerKeyName defines etcd's peer key name
|
||||
EtcdPeerKeyName = "etcd/peer.key"
|
||||
// EtcdPeerCertCommonName defines etcd's peer certificate common name (CN)
|
||||
EtcdPeerCertCommonName = "kube-etcd-peer"
|
||||
|
||||
// APIServerEtcdClientCertAndKeyBaseName defines etcd client certificate and key base name
|
||||
APIServerEtcdClientCertAndKeyBaseName = "apiserver-etcd-client"
|
||||
// APIServerEtcdClientCertName defines etcd client certificate name
|
||||
APIServerEtcdClientCertName = "apiserver-etcd-client.crt"
|
||||
// APIServerEtcdClientKeyName defines etcd client key name
|
||||
APIServerEtcdClientKeyName = "apiserver-etcd-client.key"
|
||||
// APIServerEtcdClientCertCommonName defines etcd client certificate common name (CN)
|
||||
APIServerEtcdClientCertCommonName = "kube-apiserver-etcd-client"
|
||||
|
||||
// ServiceAccountKeyBaseName defines SA key base name
|
||||
ServiceAccountKeyBaseName = "sa"
|
||||
// ServiceAccountPublicKeyName defines SA public key base name
|
||||
@ -164,10 +192,10 @@ const (
|
||||
KubeletBaseConfigurationFile = "kubelet"
|
||||
|
||||
// MinExternalEtcdVersion indicates minimum external etcd version which kubeadm supports
|
||||
MinExternalEtcdVersion = "3.0.14"
|
||||
MinExternalEtcdVersion = "3.1.11"
|
||||
|
||||
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
|
||||
DefaultEtcdVersion = "3.1.10"
|
||||
DefaultEtcdVersion = "3.2.14"
|
||||
|
||||
// Etcd defines variable used internally when referring to etcd component
|
||||
Etcd = "etcd"
|
||||
@ -199,6 +227,22 @@ const (
|
||||
CoreDNS = "coredns"
|
||||
// KubeDNS defines a variable used internally when referring to the kube-dns addon for a cluster
|
||||
KubeDNS = "kube-dns"
|
||||
|
||||
// CRICtlPackage defines the go package that installs crictl
|
||||
CRICtlPackage = "github.com/kubernetes-incubator/cri-tools/cmd/crictl"
|
||||
|
||||
// KubeAuditPolicyVolumeName is the name of the volume that will contain the audit policy
|
||||
KubeAuditPolicyVolumeName = "audit"
|
||||
// AuditPolicyDir is the directory that will contain the audit policy
|
||||
AuditPolicyDir = "audit"
|
||||
// AuditPolicyFile is the name of the audit policy file itself
|
||||
AuditPolicyFile = "audit.yaml"
|
||||
// AuditPolicyLogFile is the name of the file audit logs get written to
|
||||
AuditPolicyLogFile = "audit.log"
|
||||
// KubeAuditPolicyLogVolumeName is the name of the volume that will contain the audit logs
|
||||
KubeAuditPolicyLogVolumeName = "audit-log"
|
||||
// StaticPodAuditPolicyLogDir is the name of the directory in the static pod that will have the audit logs
|
||||
StaticPodAuditPolicyLogDir = "/var/log/kubernetes/audit"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -220,25 +264,25 @@ var (
|
||||
AuthorizationWebhookConfigPath = filepath.Join(KubernetesDir, "webhook_authz.conf")
|
||||
|
||||
// DefaultTokenUsages specifies the default functions a token will get
|
||||
DefaultTokenUsages = []string{"signing", "authentication"}
|
||||
DefaultTokenUsages = bootstrapapi.KnownTokenUsages
|
||||
|
||||
// DefaultTokenGroups specifies the default groups that this token will authenticate as when used for authentication
|
||||
DefaultTokenGroups = []string{NodeBootstrapTokenAuthGroup}
|
||||
|
||||
// MasterComponents defines the master component names
|
||||
MasterComponents = []string{KubeAPIServer, KubeControllerManager, KubeScheduler}
|
||||
|
||||
// MinimumControlPlaneVersion specifies the minimum control plane version kubeadm can deploy
|
||||
MinimumControlPlaneVersion = version.MustParseSemantic("v1.8.0")
|
||||
MinimumControlPlaneVersion = version.MustParseSemantic("v1.9.0")
|
||||
|
||||
// MinimumKubeletVersion specifies the minimum version of kubelet which kubeadm supports
|
||||
MinimumKubeletVersion = version.MustParseSemantic("v1.8.0")
|
||||
|
||||
// MinimumKubeProxyComponentConfigVersion specifies the minimum version for the kubeProxyComponent
|
||||
MinimumKubeProxyComponentConfigVersion = version.MustParseSemantic("v1.9.0-alpha.3")
|
||||
MinimumKubeletVersion = version.MustParseSemantic("v1.9.0")
|
||||
|
||||
// SupportedEtcdVersion lists officially supported etcd versions with corresponding kubernetes releases
|
||||
SupportedEtcdVersion = map[uint8]string{
|
||||
8: "3.0.17",
|
||||
9: "3.1.10",
|
||||
10: "3.1.10",
|
||||
9: "3.1.11",
|
||||
10: "3.2.14",
|
||||
11: "3.2.14",
|
||||
}
|
||||
)
|
||||
|
||||
@ -310,3 +354,8 @@ func GetDNSIP(svcSubnet string) (net.IP, error) {
|
||||
|
||||
return dnsIP, nil
|
||||
}
|
||||
|
||||
// GetStaticPodAuditPolicyFile returns the path to the audit policy file within a static pod
|
||||
func GetStaticPodAuditPolicyFile() string {
|
||||
return filepath.Join(KubernetesDir, AuditPolicyDir, AuditPolicyFile)
|
||||
}
|
||||
|
29
vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants_test.go
generated
vendored
29
vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants_test.go
generated
vendored
@ -121,44 +121,47 @@ func TestEtcdSupportedVersion(t *testing.T) {
|
||||
expectedError error
|
||||
}{
|
||||
{
|
||||
kubernetesVersion: "1.8.0",
|
||||
expectedVersion: version.MustParseSemantic("3.0.17"),
|
||||
expectedError: nil,
|
||||
},
|
||||
{
|
||||
kubernetesVersion: "1.80.0",
|
||||
kubernetesVersion: "1.99.0",
|
||||
expectedVersion: nil,
|
||||
expectedError: fmt.Errorf("Unsupported or unknown kubernetes version"),
|
||||
},
|
||||
{
|
||||
kubernetesVersion: "1.9.0",
|
||||
expectedVersion: version.MustParseSemantic("3.1.10"),
|
||||
expectedVersion: version.MustParseSemantic("3.1.11"),
|
||||
expectedError: nil,
|
||||
},
|
||||
{
|
||||
kubernetesVersion: "1.9.2",
|
||||
expectedVersion: version.MustParseSemantic("3.1.11"),
|
||||
expectedError: nil,
|
||||
},
|
||||
{
|
||||
kubernetesVersion: "1.10.0",
|
||||
expectedVersion: version.MustParseSemantic("3.1.10"),
|
||||
expectedVersion: version.MustParseSemantic("3.2.14"),
|
||||
expectedError: nil,
|
||||
},
|
||||
{
|
||||
kubernetesVersion: "1.8.6",
|
||||
expectedVersion: version.MustParseSemantic("3.0.17"),
|
||||
kubernetesVersion: "1.10.1",
|
||||
expectedVersion: version.MustParseSemantic("3.2.14"),
|
||||
expectedError: nil,
|
||||
},
|
||||
}
|
||||
for _, rt := range tests {
|
||||
actualVersion, actualError := EtcdSupportedVersion(rt.kubernetesVersion)
|
||||
if actualError != nil {
|
||||
if actualError.Error() != rt.expectedError.Error() {
|
||||
if rt.expectedError == nil {
|
||||
t.Errorf("failed EtcdSupportedVersion:\n\texpected no error, but got: %v", actualError)
|
||||
} else if actualError.Error() != rt.expectedError.Error() {
|
||||
t.Errorf(
|
||||
"failed EtcdSupportedVersion:\n\texpected error: %v\n\t actual error: %v",
|
||||
rt.expectedError,
|
||||
actualError,
|
||||
)
|
||||
}
|
||||
|
||||
} else {
|
||||
if strings.Compare(actualVersion.String(), rt.expectedVersion.String()) != 0 {
|
||||
if rt.expectedError != nil {
|
||||
t.Errorf("failed EtcdSupportedVersion:\n\texpected error: %v, but got no error", rt.expectedError)
|
||||
} else if strings.Compare(actualVersion.String(), rt.expectedVersion.String()) != 0 {
|
||||
t.Errorf(
|
||||
"failed EtcdSupportedVersion:\n\texpected version: %s\n\t actual version: %s",
|
||||
rt.expectedVersion.String(),
|
||||
|
Reference in New Issue
Block a user