Skip to content

Commit

Permalink
Adjust hana template parameter details (#401)
Browse files Browse the repository at this point in the history
* Use a freely usable label instead of an automatic node-specific label

Give admins more freedome regearding to selecting target hosts.

Signed-off-by: Roman Mohr <[email protected]>

* Make sriov resource identifiers required

Signed-off-by: Roman Mohr <[email protected]>

* Reference the correct red hat registry

Signed-off-by: Roman Mohr <[email protected]>

* Add a fixed toleration to the HANA VM

The toleration allows admins to isolate nodes specifically for HANA.
HANA VMs can be distributed based on the node labels, therefore the
toleration can be a fixed toleration, just to keep out all other
workloads.

Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr authored Jan 17, 2022
1 parent 0c2eb85 commit f45975e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion automation/unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ done
echo "Processing all templates to find syntax issues"
for template in $templates; do
if [[ $template =~ .*saphana.* ]]; then
oc process -f "$template" NAME=test TARGET_NODE_NAME=mynode || exit 1
oc process -f "$template" NAME=test WORKLOAD_NODE_LABEL_VALUE="somevalue" SRIOV_NETWORK_NAME1="default/sriov1" SRIOV_NETWORK_NAME2="default/sriov1" SRIOV_NETWORK_NAME3="default/sriov1"|| exit 1
else
oc process -f "$template" NAME=test SRC_PVC_NAME=test || exit 1
fi
Expand Down
21 changes: 13 additions & 8 deletions templates/rhel8.saphana.tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,20 @@ objects:
networkName: ${SRIOV_NETWORK_NAME3}
name: sriov-net3
nodeSelector:
kubernetes.io/hostname: ${TARGET_NODE_NAME}
kubevirt.io/workload: ${WORKLOAD_NODE_LABEL_VALUE}
tolerations:
- key: kubevirt.io/workload
operator: Equal
value: hana
effect: NoSchedule
parameters:
- description: Name for the new VM
displayName: Name
name: NAME
required: true
- description: Name of the node where this VM needs to run
displayName: Target Node
name: TARGET_NODE_NAME
- description: Value of the node label selector key
displayName: "The value of the kubevirt.io/workload node selector label key. The target node needs to match this label"
name: WORKLOAD_NODE_LABEL_VALUE
required: true
- description: Amount of memory
displayName: Memory
Expand All @@ -183,23 +188,23 @@ parameters:
- description: Name of the SR-IOV network1
displayName: SR-IOV network1
name: SRIOV_NETWORK_NAME1
value: "default/sriov-net1"
required: true
- description: Name of the SR-IOV network2
displayName: SR-IOV network2
name: SRIOV_NETWORK_NAME2
value: "default/sriov-net2"
required: true
- description: Name of the SR-IOV network3
displayName: SR-IOV network3
name: SRIOV_NETWORK_NAME3
value: "default/sriov-net3"
required: true
- description: Page size of huge pages
displayName: Huge page size
name: HUGEPAGES_PAGE_SIZE
value: "1Gi"
- name: SRC_CONTAINERDISK
description: Name of the source container disk to import
displayName: Source container disk
value: "docker://registry.access.redhat.com/rhel8/rhel-guest-image:8.4.0"
value: "docker://registry.redhat.io/rhel8/rhel-guest-image:8.4.0"
- description: Randomized password for the cloud-init user {{ cloudusername }}
displayName: Cloud user password
from: '[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}'
Expand Down

0 comments on commit f45975e

Please sign in to comment.