The module lifecycle stage: Preview
The module has requirements for installation
HiveMetastoreClass
Cluster Wide HiveMetastoreClass resource allows limiting the creation of invalid configurations and predefining some values.
Every HiveMetastore resource must be linked to an existing HiveMetastoreClass resource.
Before deploying the service, all configuration will be checked against the corresponding HiveMetastoreClass.
Sizing Policies
Structure that allows creating a set of policies for determining the size of linked HiveMetastore.
This will help avoid uneven distribution of CPU and Memory resources on cluster nodes.
The determining factor for choosing a particular policy is falling within the cores interval.
Then compliance with other fields of the specific policy will be checked.
spec:
sizingPolicies:
- cores:
min: 1
max: 4
memory:
min: 100Mi
max: 1Gi
step: 1Mi
coreFraction: [10%, 30%, 50%]
- cores:
min: 5
max: 10
memory:
min: 500Mi
max: 2Gi
coreFraction: [50%, 70%, 100%]Validation Rules
CEL (Common Expression Language) is used as syntax for creating flexible validation mechanisms.
We provide a set of predefined variables that can be used in rule:
- instance.memory.size
- instance.cpu.cores
spec:
validations:
- message: "CPU cores must be between 1 and 8"
rule: "instance.cpu.cores >= 1 && instance.cpu.cores <= 64"Affinity
Standard Kubernetes mechanism for managing scheduling of deployed pods.
spec:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "node.deckhouse.io/group"
operator: "In"
values:
- "hms"Tolerations
Standard Kubernetes mechanism for managing scheduling of deployed pods.
spec:
tolerations:
- key: primary-role
operator: Equal
value: hms
effect: NoScheduleNode Selector
Standard Kubernetes mechanism for managing scheduling of deployed pods.
spec:
nodeSelector:
"node.deckhouse.io/group": "hms"Usage Examples
Basic Usage
apiVersion: managed-services.deckhouse.io/v1alpha1
kind: HiveMetastoreClass
metadata:
name: default
spec:
sizingPolicies:
- cores:
min: 1
max: 2
memory:
min: 2Gi
max: 4Gi
step: 512Mi
coreFractions:
- "25%"
- "50%"
- "75%"
- "100%"
validations:
- message: "CPU cores must be between 1 and 8"
rule: "instance.cpu.cores >= 1 && instance.cpu.cores <= 16"