Skip to content

Commit e3f801b

Browse files
committed
Document HiveConfig.Spec.DeploymentConfig
HIVE-2091
1 parent 500a742 commit e3f801b

2 files changed

Lines changed: 78 additions & 42 deletions

File tree

docs/scaling-hive.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ Most importantly, be aware that Hive uses CRDs to store its state. The amount of
1010

1111
# Horizontal vs. Vertical Scale
1212

13-
With the exception of install pods (used only when clusters are installing), Hive 1.x is not horizontally scalable at the worker level. Most of the work Hive does happens in the hive-controllers pod, which is one single pod on one single worker. This means that when no installs are running, if you have a cluster with 10 workers, 9 of the workers are very bored. Hive clusters are prime candidates for using worker autoscaling. Keep the worker count as low as you can, but allow bursts of concurrent installs to call for temporary workers to spin up.
13+
With the exception of install pods (used only when clusters are installing), Hive 1.x is not horizontally scalable at the worker level with the exception of the [clustersync controller](using-hive.md#scaling-clustersync).
14+
Most of the work Hive does happens in the hive-controllers pod, which is one single pod on one single worker.
15+
This means that when no installs are running, if you have a cluster with 10 workers, 9 of the workers are very bored.
16+
Hive clusters are prime candidates for using worker autoscaling.
17+
Keep the worker count as low as you can, but allow bursts of concurrent installs to call for temporary workers to spin up.
18+
19+
See [using hive](using-hive.md#vertical-scaling) for information about vertically scaling the hive-controllers, hive-clustersync, and hiveadmission pods themselves.
1420

1521
In AWS, Hive performs best on C (CPU Optimized) instance types. Hive performs fine on M (General purpose) instances, but C instances are better.
1622

docs/using-hive.md

Lines changed: 71 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
33
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
44

5-
- [Using Hive](#using-hive)
6-
- [Cluster Provisioning](#cluster-provisioning)
7-
- [DNS](#dns)
8-
- [Native](#native)
9-
- [Managed DNS](#managed-dns)
10-
- [Non-native](#non-native)
11-
- [oVirt](#ovirt)
12-
- [Pull Secret](#pull-secret)
13-
- [OpenShift Version](#openshift-version)
14-
- [Cloud credentials](#cloud-credentials)
15-
- [Alibaba Cloud](#alibaba-cloud)
16-
- [Alibaba Cloud Credential Manifests](#alibaba-cloud-credential-manifests)
17-
- [AWS](#aws)
18-
- [Azure](#azure)
19-
- [GCP](#gcp)
20-
- [IBM Cloud](#ibm-cloud)
21-
- [IBM Cloud Credential Manifests](#ibm-cloud-credential-manifests)
22-
- [oVirt](#ovirt-1)
23-
- [vSphere](#vsphere)
24-
- [OpenStack](#openstack)
25-
- [SSH Key Pair](#ssh-key-pair)
26-
- [InstallConfig](#installconfig)
27-
- [ClusterDeployment](#clusterdeployment)
28-
- [Machine Pools](#machine-pools)
29-
- [Configuring Availability Zones](#configuring-availability-zones)
30-
- [Auto-scaling](#auto-scaling)
31-
- [Integration with Horizontal Pod Autoscalers](#integration-with-horizontal-pod-autoscalers)
32-
- [Create Cluster on Bare Metal](#create-cluster-on-bare-metal)
33-
- [Monitor the Install Job](#monitor-the-install-job)
34-
- [Saving Logs for Failed Provisions](#saving-logs-for-failed-provisions)
35-
- [Cluster Admin Kubeconfig](#cluster-admin-kubeconfig)
36-
- [Access the Web Console](#access-the-web-console)
37-
- [Managed DNS](#managed-dns-1)
38-
- [Cluster Adoption](#cluster-adoption)
39-
- [Example Adoption ClusterDeployment](#example-adoption-clusterdeployment)
40-
- [Adopting with hiveutil](#adopting-with-hiveutil)
41-
- [Configuration Management](#configuration-management)
42-
- [SyncSet](#syncset)
43-
- [Scaling ClusterSync](#scaling-clustersync)
44-
- [Identity Provider Management](#identity-provider-management)
45-
- [Cluster Deprovisioning](#cluster-deprovisioning)
5+
- [Cluster Provisioning](#cluster-provisioning)
6+
- [DNS](#dns)
7+
- [Native](#native)
8+
- [Managed DNS](#managed-dns)
9+
- [Non-native](#non-native)
10+
- [oVirt](#ovirt)
11+
- [Pull Secret](#pull-secret)
12+
- [OpenShift Version](#openshift-version)
13+
- [Cloud credentials](#cloud-credentials)
14+
- [Alibaba Cloud](#alibaba-cloud)
15+
- [Alibaba Cloud Credential Manifests](#alibaba-cloud-credential-manifests)
16+
- [AWS](#aws)
17+
- [Azure](#azure)
18+
- [GCP](#gcp)
19+
- [IBM Cloud](#ibm-cloud)
20+
- [IBM Cloud Credential Manifests](#ibm-cloud-credential-manifests)
21+
- [oVirt](#ovirt-1)
22+
- [vSphere](#vsphere)
23+
- [OpenStack](#openstack)
24+
- [SSH Key Pair](#ssh-key-pair)
25+
- [InstallConfig](#installconfig)
26+
- [ClusterDeployment](#clusterdeployment)
27+
- [Machine Pools](#machine-pools)
28+
- [Configuring Availability Zones](#configuring-availability-zones)
29+
- [Auto-scaling](#auto-scaling)
30+
- [Integration with Horizontal Pod Autoscalers](#integration-with-horizontal-pod-autoscalers)
31+
- [Create Cluster on Bare Metal](#create-cluster-on-bare-metal)
32+
- [Monitor the Install Job](#monitor-the-install-job)
33+
- [Saving Logs for Failed Provisions](#saving-logs-for-failed-provisions)
34+
- [Cluster Admin Kubeconfig](#cluster-admin-kubeconfig)
35+
- [Access the Web Console](#access-the-web-console)
36+
- [Managed DNS](#managed-dns-1)
37+
- [Cluster Adoption](#cluster-adoption)
38+
- [Example Adoption ClusterDeployment](#example-adoption-clusterdeployment)
39+
- [Adopting with hiveutil](#adopting-with-hiveutil)
40+
- [Configuration Management](#configuration-management)
41+
- [Vertical Scaling](#vertical-scaling)
42+
- [SyncSet](#syncset)
43+
- [Scaling ClusterSync](#scaling-clustersync)
44+
- [Identity Provider Management](#identity-provider-management)
45+
- [Cluster Deprovisioning](#cluster-deprovisioning)
4646

4747
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
4848

@@ -1213,6 +1213,36 @@ bin/hiveutil create-cluster --namespace=namespace-to-adopt-into --base-domain=ex
12131213

12141214
## Configuration Management
12151215

1216+
### Vertical Scaling
1217+
hive-operator deploys each component (the [hive-controllers](../config/controllers/deployment.yaml) and [hiveadmission](../config/hiveadmission/deployment.yaml) Deployments; and the [hive-clustersync](../config/clustersync/statefulset.yaml) StatefulSet) with default resource requests.
1218+
If you need to scale any of these components vertically, you may add one or more `deploymentConfig` sections to HiveConfig's `spec`. For example:
1219+
1220+
```yaml
1221+
deploymentConfig:
1222+
- deploymentName: hive-controllers
1223+
resources:
1224+
requests:
1225+
memory: 256Mi
1226+
- deploymentName: hive-clustersync
1227+
resources:
1228+
requests:
1229+
cpu: 30m
1230+
memory: 257Mi
1231+
limits:
1232+
cpu: 50m
1233+
- deploymentName: hiveadmission
1234+
resources:
1235+
requests:
1236+
cpu: 20m
1237+
```
1238+
1239+
For each entry, the `deploymentName` must match the `metadata.name` of the Deployment/StatefulSet.
1240+
The `resources` is a standard corev1.ResourceRequirements.
1241+
1242+
See [below](#scaling-clustersync) for information on _horizontally_ scaling the clustersync controller.
1243+
1244+
Note: The hive-operator itself must be scaled by directly editing its Deployment.
1245+
12161246
### SyncSet
12171247

12181248
Hive offers two CRDs for applying configuration in a cluster once it is installed: `SyncSet` for config destined for specific clusters in a specific namespace, and `SelectorSyncSet` for config destined for any cluster matching a label selector.

0 commit comments

Comments
 (0)