Skip to content

Commit

Permalink
update k8s configuration generator
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Oct 21, 2024
1 parent 21783b4 commit aa3ae2c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
38 changes: 26 additions & 12 deletions pages_src/templates/config_k8s_default.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cluster:
name: <CLUSTER_NAME> # required, used as a prefix for all resources
name: "..." # required, used as a prefix for all resources
datacenter: "${c.datacenter}" # required, will be the same for all nodes in the cluster
ssh-key: # required, fill in the private and public keys for the cluster, will be used for ssh access to all nodes
private: |
Expand All @@ -9,25 +9,39 @@ cluster:
public: |
ssh-...
private-network:
name: lan-... # required, lan network name, must be created in advance with enough ips for all the nodes in the cluster
name: "lan-..." # required, lan network name, must be created in advance with enough ips for all the nodes in the cluster
default-node-config: # default values for all nodes in the cluster
# following values were filled in from the selected configurations
cpu: "${c.cpuCores}${c.cpuType}"
ram: "${c.ram}"
disk: "${c.diskSizes.join(",")}"
billingcycle: "${c.billing}"
monthlypackage: "${c.billing === "monthly" ? c.netpack : ""}"
# dailybackup: "yes"
# managed: "yes"
# server: https://1.2.3.4:9345 # optional, in case you want to use a specific server as the main cluster server
# token: # optional, to use as the cluster join token, if not provided will try to get it from controlplane-1 node
# controlplane-node-name: # optional, if you want to specify the controlplane node name otherwise it will look for the first controlplane node

# server: "https://1.2.3.4:9345" # optional, in case you want to use a specific server as the main cluster server
# token: "..." # optional, to use as the cluster join token, if not provided will try to get it from controlplane-1 node
# controlplane-server-name: ".." # optional, if you want to specify the primary controlplane node name
# allow-high-availability: true # optional, if you want to enable high availability for the controlplane
# # requires some work to setup, see https://docs.rke2.io/install/ha for details
# default-rke2-server-config: # optional, rke2 config which will be merged into the rke2 config for all server nodes (controlplane)
# # see https://docs.rke2.io/reference/server_config for details
# default-rke2-agent-config: # optional, rke2 config which will be merged into the rke2 config for all nodes except the controlplane nodes
# # see https://docs.rke2.io/reference/linux_agent_config for details


# modify the node pools as needed, following are some examples
node-pools:
# controlplane: # optional, the controlplane node pool is created anyway, this is only if you want to change the controlplane node config
# nodes: 1 # must always be set to 1 - no support for high availability yet
# default-node-config: # optional, default values for all nodes in this pool, values here override the global default-node-config
worker1:
nodes: 3 # required, number of nodes in this node pool
# default-node-config: # optional, default values for all nodes in this pool, values here override the global default-node-config
# controlplane: # optional, the controlplane node pool is created anyway with 1 node
# nodes: 1 # only if allow-high-availability is true you can set to 3 / 5 / 7 for HA cluster
# node-config: # optional, default values for all nodes in this pool
# rke2-config: # optional, rke2 config which will be merged into the rke2 config for all nodes in this pool
workers:
nodes: 3
node-config: # optional, default values for all nodes in this pool override the cluster default-node-config
cpu: 4B
memory: 2048
# rke2-config: # optional, rke2 config which will be merged into the rke2 config for all nodes in this pool
worker2:
nodes: [5, 6] # nodes can also be specified like this to keep specific node numbers, each number is the node number in the pool
nodes: [5, 6] # nodes can also be specified like this to keep specific node numbers
1 change: 1 addition & 0 deletions pages_src/templates/serverconfiggen.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{% if k8s %}
<h1 class="mt-5">Kamatera Kubernetes Configuration Generator</h1>
<p>Use this tool to generate Kamatera Kubernetes (kconfig) configuration files.</p>
<p>The resulting kconfig.yaml file can be used to create and manage clusters using `cloudcli k8s` commands</p>
{% else %}
<h1 class="mt-5">Kamatera Toolbox Server Configuration Generator</h1>
<p>Use this tool to generate server configurations for Kamatera drivers and tools.</p>
Expand Down

0 comments on commit aa3ae2c

Please sign in to comment.