mirror of https://github.com/kubernetes/kops.git
fixing nil reference
This commit is contained in:
parent
89a5fa58a4
commit
478f464dfb
|
@ -175,12 +175,12 @@ func (b *BootstrapScript) ResourceNodeUp(ig *kops.InstanceGroup, cluster *kops.C
|
|||
Image: etcdCluster.Image,
|
||||
Version: etcdCluster.Version,
|
||||
}
|
||||
// if the user has not specified memory or cpu alotments for etcd, do not
|
||||
// if the user has not specified memory or cpu allotments for etcd, do not
|
||||
// apply one. Described in PR #6313.
|
||||
if !etcdCluster.CPURequest.IsZero() {
|
||||
if etcdCluster.CPURequest != nil {
|
||||
c.CPURequest = etcdCluster.CPURequest
|
||||
}
|
||||
if !etcdCluster.MemoryRequest.IsZero() {
|
||||
if etcdCluster.MemoryRequest != nil {
|
||||
c.MemoryRequest = etcdCluster.MemoryRequest
|
||||
}
|
||||
spec["etcdClusters"].(map[string]kops.EtcdClusterSpec)[etcdCluster.Name] = c
|
||||
|
|
Loading…
Reference in New Issue