With this patch, we remove the Subnet Selection from Kubernetes creation form. Instead, we create a default subnet with a larger ipv4 prefix (/16 instead of /26) with the name "cluster-k8s-subnet". This way, the flow is simplified, by not requiring customer to create a subnet before creating a cluster. Also, the subnet would need to have a larger prefix and changing that is not easy at the moment.
26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
<% @page_title = "Create Kubernetes Cluster" %>
|
|
|
|
<%== part(
|
|
"components/page_header",
|
|
breadcrumbs: [
|
|
%w[Projects /project],
|
|
[@project_data[:name], @project_data[:path]],
|
|
["Kubernetes Clusters", "#{@project_data[:path]}/kubernetes-cluster"],
|
|
%w[Create #]
|
|
]
|
|
) %>
|
|
|
|
|
|
<%
|
|
form_elements = [
|
|
{name: "name", type: "text", label: "Name", required: "required", placeholder: "Enter name"},
|
|
{name: "location", type: "radio_small_cards", label: "Location", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:location)},
|
|
{name: "cp_nodes", type: "radio_small_cards", label: "Control Plane Nodes", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:cp_nodes)},
|
|
{name: "worker_nodes", type: "select", label: "Worker Nodes", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:worker_nodes), opening_tag: "<div class='sm:col-span-3'>"},
|
|
]
|
|
|
|
action = "#{@project_data[:path]}/kubernetes-cluster"
|
|
%>
|
|
|
|
<%==part("components/form/resource_creation_form", action:, form_elements:, option_tree: @option_tree, option_parents: @option_parents)%>
|