Skip to content

Commit

Permalink
Add k8s hyperconverged support
Browse files Browse the repository at this point in the history
Resolves: #144
  • Loading branch information
dosaboy committed Oct 24, 2023
1 parent 4a98117 commit aab2531
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kubernetes/kubernetes.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ applications:
charm: __CHARM_STORE____CHARM_CS_NS____CHARM_CH_PREFIX__kubernetes-control-plane
constraints: mem=2G
expose: true
num_units: __NUM_K8S_MASTER_UNITS__
num_units: __NUM_K8S_CONTROL_PLANE_UNITS__
options:
channel: *k8s_channel
kubernetes-worker:
Expand Down
3 changes: 2 additions & 1 deletion kubernetes/module_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
MOD_PARAMS[__K8S_CHANNEL__]="latest/stable"
MOD_PARAMS[__NUM_ETCD_UNITS__]=1
MOD_PARAMS[__NUM_EASYRSA_UNITS__]=1
MOD_PARAMS[__NUM_K8S_MASTER_UNITS__]=1
MOD_PARAMS[__NUM_K8S_CONTROL_PLANE_UNITS__]=1
MOD_PARAMS[__NUM_K8S_WORKER_UNITS__]=2
MOD_PARAMS[__NUM_K8S_OST_INTEGRATOR_UNITS__]=1
MOD_PARAMS[__NUM_K8S_LB_UNITS__]=1
MOD_PARAMS[__ETCD_SNAP_CHANNEL__]='latest/stable'
MOD_PARAMS[__CONTAINER_RUNTIME__]='containerd'
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/pipeline/02configure
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ do
echo "ERROR: you can't do --lb-ha and --control-plane-ha at the same time."
exit 1
fi
get_units $1 __NUM_K8S_MASTER_UNITS__ 3
get_units $1 __NUM_K8S_CONTROL_PLANE_UNITS__ 3
MOD_OVERLAYS+=( "kubernetes/k8s-control-plane-ha.yaml" )
check_hacluster_channel
;;
Expand All @@ -193,7 +193,7 @@ do
shift
;;
--num-control-planes) #__OPT__type:<int>
MOD_PARAMS[__NUM_K8S_MASTER_UNITS__]=$2
MOD_PARAMS[__NUM_K8S_CONTROL_PLANE_UNITS__]=$2
shift
;;
--rook-ceph)
Expand Down
2 changes: 1 addition & 1 deletion overlays/kubernetes/k8s-control-plane-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ applications:
kubernetes-control-plane-hacluster:
charm: __CHARM_STORE____CHARM_CS_NS____CHARM_CH_PREFIX__hacluster
options:
cluster_count: __NUM_K8S_MASTER_UNITS__
cluster_count: __NUM_K8S_CONTROL_PLANE_UNITS__
relations:
- [ kubernetes-control-plane-hacluster, kubernetes-control-plane ]
- [ kubernetes-control-plane:kube-api-endpoint, kubernetes-worker:kube-api-endpoint ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kubernetes-control-plane:
to:
__UNIT_PLACEMENT_LXD__.__UNITS__.__NUM_K8S_CONTROL_PLANE_UNITS__
3 changes: 3 additions & 0 deletions overlays/unit_placement/kubernetes-worker.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kubernetes-worker:
to:
__UNIT_PLACEMENT_LXD__.__UNITS__.__NUM_K8S_WORKER_UNITS__
3 changes: 3 additions & 0 deletions overlays/unit_placement/openstack-integrator.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
openstack-integrator:
to:
__UNIT_PLACEMENT_LXD__.__UNITS__.__NUM_K8S_OST_INTEGRATOR_UNITS__

0 comments on commit aab2531

Please sign in to comment.