Просмотр исходного кода

Merge pull request #2277 from porter-dev/belanger/eks-form-updates

Add updates to the EKS form for Prometheus improvements and subnet multiplicity
abelanger5 3 лет назад
Родитель
Сommit
71b67e438f

+ 17 - 0
api/server/handlers/infra/forms.go

@@ -599,6 +599,14 @@ tabs:
       variable: additional_private_subnets
       settings:
         default: false
+  - name: subnet_multiplicity
+    show_if: additional_private_subnets
+    contents:
+    - type: number-input
+      label: "Multiplicity of the subnet within each AZ."
+      variable: additional_private_subnets_multiplicity
+      settings:
+        default: 3
   - name: nginx_settings
     contents:
     - type: heading
@@ -608,6 +616,15 @@ tabs:
       label: Disable NGINX load balancer and expose NGINX only on a cluster IP address.
       settings:
         default: false
+  - name: prometheus_settings
+    contents:
+    - type: heading
+      label: Prometheus Settings
+    - type: checkbox
+      variable: additional_prometheus_node_group
+      label: Add an additional prometheus node group to ensure monitoring stability.
+      settings:
+        default: false
 `
 
 const gcrForm = `name: GCR

+ 6 - 1
provisioner/server/handlers/state/create_resource.go

@@ -277,7 +277,12 @@ func createCluster(config *config.Config, infra *models.Infra, operation *models
 		}
 	}
 
-	cluster.Name = output["cluster_name"].(string)
+	// only update the cluster name if this is during creation - we don't want to overwrite the cluster name
+	// which may have been manually set
+	if isNotFound {
+		cluster.Name = output["cluster_name"].(string)
+	}
+
 	cluster.Server = output["cluster_endpoint"].(string)
 	cluster.CertificateAuthorityData = caData