mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Changed kube-dns-autoscaler's target to Deployment/kube-dns
This commit is contained in:
		@@ -42,7 +42,7 @@ spec:
 | 
				
			|||||||
          - --configmap=kube-dns-autoscaler
 | 
					          - --configmap=kube-dns-autoscaler
 | 
				
			||||||
          - --mode=linear
 | 
					          - --mode=linear
 | 
				
			||||||
          # Should keep target in sync with cluster/addons/dns/skydns-rc.yaml.base
 | 
					          # Should keep target in sync with cluster/addons/dns/skydns-rc.yaml.base
 | 
				
			||||||
          - --target=ReplicationController/kube-dns-v20
 | 
					          - --target=Deployment/kube-dns
 | 
				
			||||||
          # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
 | 
					          # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
 | 
				
			||||||
          # If using small nodes, "nodesPerReplica" should dominate.
 | 
					          # If using small nodes, "nodesPerReplica" should dominate.
 | 
				
			||||||
          - --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":16,"min":1}}
 | 
					          - --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":16,"min":1}}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -180,14 +180,14 @@ func updateDNSScalingConfigMap(c clientset.Interface, configMap *api.ConfigMap)
 | 
				
			|||||||
func getDNSReplicas(c clientset.Interface) (int, error) {
 | 
					func getDNSReplicas(c clientset.Interface) (int, error) {
 | 
				
			||||||
	label := labels.SelectorFromSet(labels.Set(map[string]string{ClusterAddonLabelKey: KubeDNSLabelName}))
 | 
						label := labels.SelectorFromSet(labels.Set(map[string]string{ClusterAddonLabelKey: KubeDNSLabelName}))
 | 
				
			||||||
	listOpts := api.ListOptions{LabelSelector: label}
 | 
						listOpts := api.ListOptions{LabelSelector: label}
 | 
				
			||||||
	rcs, err := c.Core().ReplicationControllers(DNSNamespace).List(listOpts)
 | 
						deployments, err := c.Extensions().Deployments(DNSNamespace).List(listOpts)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return 0, err
 | 
							return 0, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	Expect(len(rcs.Items)).Should(Equal(1))
 | 
						Expect(len(deployments.Items)).Should(Equal(1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rc := rcs.Items[0]
 | 
						deployment := deployments.Items[0]
 | 
				
			||||||
	return int(rc.Spec.Replicas), nil
 | 
						return int(deployment.Spec.Replicas), nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func deleteDNSAutoscalerPod(c clientset.Interface) error {
 | 
					func deleteDNSAutoscalerPod(c clientset.Interface) error {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user