mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-02 03:56:07 -04:00
Remove autoscaling from CLI and bootstrapper
This commit is contained in:
parent
e301f575df
commit
88d200232a
14 changed files with 99 additions and 225 deletions
|
@ -422,7 +422,7 @@ func NewDefaultAutoscalerDeployment(extraVolumes []k8s.Volume, extraVolumeMounts
|
|||
Namespace: "kube-system",
|
||||
},
|
||||
Spec: apps.DeploymentSpec{
|
||||
Replicas: proto.Int32(1),
|
||||
Replicas: proto.Int32(0),
|
||||
Selector: &v1.LabelSelector{
|
||||
MatchLabels: map[string]string{
|
||||
"app.kubernetes.io/instance": "constellation",
|
||||
|
@ -494,20 +494,3 @@ func NewDefaultAutoscalerDeployment(extraVolumes []k8s.Volume, extraVolumeMounts
|
|||
func (a *autoscalerDeployment) Marshal() ([]byte, error) {
|
||||
return kubernetes.MarshalK8SResources(a)
|
||||
}
|
||||
|
||||
func (a *autoscalerDeployment) SetAutoscalerCommand(cloudprovider string, autoscalingNodeGroups []string) {
|
||||
command := []string{
|
||||
"./cluster-autoscaler",
|
||||
"--cloud-provider",
|
||||
cloudprovider,
|
||||
"--logtostderr=true",
|
||||
"--stderrthreshold=info",
|
||||
"--v=2",
|
||||
"--namespace=kube-system",
|
||||
}
|
||||
for _, autoscalingNodeGroup := range autoscalingNodeGroups {
|
||||
command = append(command, "--nodes", autoscalingNodeGroup)
|
||||
}
|
||||
|
||||
a.Deployment.Spec.Template.Spec.Containers[0].Command = command
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ func TestAutoscalerDeploymentWithCommandMarshalUnmarshal(t *testing.T) {
|
|||
assert := assert.New(t)
|
||||
|
||||
autoscalerDepl := NewDefaultAutoscalerDeployment(nil, nil, nil, "")
|
||||
autoscalerDepl.SetAutoscalerCommand("someProvider", []string{"group1", "group2"})
|
||||
|
||||
data, err := autoscalerDepl.Marshal()
|
||||
require.NoError(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue