mirror of https://github.com/kubernetes/kops.git
Remove references to ClusterSpec.EtcdClusters from nodeup
This commit is contained in:
parent
56a8f46952
commit
9368470fc4
|
@ -36,19 +36,17 @@ func (b *EtcdManagerTLSBuilder) Build(ctx *fi.NodeupModelBuilderContext) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
for _, etcdCluster := range b.Cluster.Spec.EtcdClusters {
|
||||
k := etcdCluster.Name
|
||||
|
||||
d := "/etc/kubernetes/pki/etcd-manager-" + k
|
||||
for _, etcdClusterName := range b.NodeupConfig.EtcdClusterNames {
|
||||
d := "/etc/kubernetes/pki/etcd-manager-" + etcdClusterName
|
||||
|
||||
keys := make(map[string]string)
|
||||
|
||||
keys["etcd-manager-ca"] = "etcd-manager-ca-" + k
|
||||
keys["etcd-peers-ca"] = "etcd-peers-ca-" + k
|
||||
keys["etcd-clients-ca"] = "etcd-clients-ca-" + k
|
||||
keys["etcd-manager-ca"] = "etcd-manager-ca-" + etcdClusterName
|
||||
keys["etcd-peers-ca"] = "etcd-peers-ca-" + etcdClusterName
|
||||
keys["etcd-clients-ca"] = "etcd-clients-ca-" + etcdClusterName
|
||||
|
||||
// Because API server can only have a single client certificate for etcd, we need to share a client CA
|
||||
if k == "main" || k == "events" {
|
||||
if etcdClusterName == "main" || etcdClusterName == "events" {
|
||||
keys["etcd-clients-ca"] = "etcd-clients-ca"
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,9 @@ type Config struct {
|
|||
// Packages specifies additional packages to be installed.
|
||||
Packages []string `json:"packages,omitempty"`
|
||||
|
||||
// Manifests for running etcd
|
||||
// EtcdClusterNames are the names of the etcd clusters.
|
||||
EtcdClusterNames []string `json:",omitempty"`
|
||||
// EtcdManifests are the manifests for running etcd.
|
||||
EtcdManifests []string `json:"etcdManifests,omitempty"`
|
||||
|
||||
// CAs are the CA certificates to trust.
|
||||
|
|
|
@ -1411,6 +1411,7 @@ func (n *nodeUpConfigBuilder) BuildConfig(ig *kops.InstanceGroup, apiserverAddit
|
|||
}
|
||||
|
||||
if isMaster || usesLegacyGossip {
|
||||
config.Channels = n.channels
|
||||
for _, arch := range architectures.GetSupported() {
|
||||
for _, a := range n.protokubeAsset[arch] {
|
||||
config.Assets[arch] = append(config.Assets[arch], a.CompactString())
|
||||
|
@ -1542,8 +1543,13 @@ func (n *nodeUpConfigBuilder) BuildConfig(ig *kops.InstanceGroup, apiserverAddit
|
|||
}
|
||||
|
||||
config.Images = n.images[role]
|
||||
config.Channels = n.channels
|
||||
|
||||
if isMaster {
|
||||
for _, etcdCluster := range cluster.Spec.EtcdClusters {
|
||||
config.EtcdClusterNames = append(config.EtcdClusterNames, etcdCluster.Name)
|
||||
}
|
||||
config.EtcdManifests = n.etcdManifests[ig.Name]
|
||||
}
|
||||
|
||||
if cluster.Spec.CloudProvider.AWS != nil {
|
||||
if ig.Spec.WarmPool != nil || cluster.Spec.CloudProvider.AWS.WarmPool != nil {
|
||||
|
|
Loading…
Reference in New Issue