mirror of
https://github.com/rancher/rke.git
synced 2025-05-09 08:47:43 +00:00
linting fixes
This commit is contained in:
parent
eed7152d1a
commit
bfae4c15d4
@ -9,15 +9,13 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
ClusterDnsServerIPEnvName = "RKE_DNS_SERVER"
|
||||
ClusterDNSServerIPEnvName = "RKE_DNS_SERVER"
|
||||
ClusterDomainEnvName = "RKE_CLUSTER_DOMAIN"
|
||||
)
|
||||
|
||||
func (c *Cluster) DeployK8sAddOns() error {
|
||||
if err := c.deployKubeDNS(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
err := c.deployKubeDNS()
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Cluster) deployKubeDNS() error {
|
||||
@ -27,7 +25,7 @@ func (c *Cluster) deployKubeDNS() error {
|
||||
|
||||
env := []string{
|
||||
fmt.Sprintf("%s=%s", pki.KubeAdminConfigENVName, c.Certificates[pki.KubeAdminCommonName].Config),
|
||||
fmt.Sprintf("%s=%s", ClusterDnsServerIPEnvName, c.ClusterDnsServer),
|
||||
fmt.Sprintf("%s=%s", ClusterDNSServerIPEnvName, c.ClusterDNSServer),
|
||||
fmt.Sprintf("%s=%s", ClusterDomainEnvName, c.ClusterDomain),
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ type Cluster struct {
|
||||
ClusterDomain string
|
||||
NetworkPlugin string `yaml:"network_plugin"`
|
||||
ClusterCIDR string
|
||||
ClusterDnsServer string
|
||||
ClusterDNSServer string
|
||||
}
|
||||
|
||||
const (
|
||||
@ -69,7 +69,7 @@ func ParseConfig(clusterFile string) (*Cluster, error) {
|
||||
}
|
||||
c.ClusterDomain = c.Services.Kubelet.ClusterDomain
|
||||
c.ClusterCIDR = c.Services.KubeController.ClusterCIDR
|
||||
c.ClusterDnsServer = c.Services.Kubelet.ClusterDnsServer
|
||||
c.ClusterDNSServer = c.Services.Kubelet.ClusterDNSServer
|
||||
return c, nil
|
||||
}
|
||||
|
||||
|
@ -79,12 +79,12 @@ func ClusterUp(clusterFile, authType string) (string, string, string, string, er
|
||||
|
||||
err = kubeCluster.DeployNetworkPlugin()
|
||||
if err != nil {
|
||||
return ApiURL, caCrt, clientCert, clientKey, err
|
||||
return APIURL, caCrt, clientCert, clientKey, err
|
||||
}
|
||||
|
||||
err = kubeCluster.DeployK8sAddOns()
|
||||
if err != nil {
|
||||
return ApiURL, caCrt, clientCert, clientKey, err
|
||||
return APIURL, caCrt, clientCert, clientKey, err
|
||||
}
|
||||
|
||||
err = kubeCluster.SaveClusterState(clusterFile)
|
||||
|
@ -26,7 +26,7 @@ func buildKubeletConfig(host hosts.Host, kubeletService Kubelet, isMaster bool)
|
||||
"--cgroup-driver=cgroupfs",
|
||||
"--cgroups-per-qos=True",
|
||||
"--enforce-node-allocatable=",
|
||||
"--cluster-dns=" + kubeletService.ClusterDnsServer,
|
||||
"--cluster-dns=" + kubeletService.ClusterDNSServer,
|
||||
"--network-plugin=cni",
|
||||
"--cni-conf-dir=/etc/cni/net.d",
|
||||
"--cni-bin-dir=/opt/cni/bin",
|
||||
|
@ -28,7 +28,7 @@ type Kubelet struct {
|
||||
Image string `yaml:"image"`
|
||||
ClusterDomain string `yaml:"cluster_domain"`
|
||||
InfraContainerImage string `yaml:"infra_container_image"`
|
||||
ClusterDnsServer string `yaml:"cluster_dns_server"`
|
||||
ClusterDNSServer string `yaml:"cluster_dns_server"`
|
||||
}
|
||||
|
||||
type Kubeproxy struct {
|
||||
|
Loading…
Reference in New Issue
Block a user