Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add installation configure of LH GuaranteedInstanceManagerCPU (backport #706) #709

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Apr 18, 2024

Problem:

Per harvester/harvester#5568

Solution:

Update source code and document

Related Issue:
harvester/harvester#5568

Test plan:

Create new cluster, use a harvester-configuration file (step 13 of https://docs.harvesterhci.io/v1.2/install/index) with below items, after installation, check the embedded LH, the related setting is as expected.

https://longhorn.io/docs/1.5.3/references/settings/#guaranteed-instance-manager-cpu

install:
  harvester:
    longhorn:
      default_settings:
        guaranteedInstanceManagerCPU: 6

(valid values are in range [0..12], all other values are converted to 12)

LH chart:

chart/templates/default-setting.yaml:    {{- if not (kindIs "invalid" .Values.defaultSettings.guaranteedInstanceManagerCPU) }}
chart/templates/default-setting.yaml:    guaranteed-instance-manager-cpu: {{ .Values.defaultSettings.guaranteedInstanceManagerCPU }}
chart/README.md:| defaultSettings.guaranteedInstanceManagerCPU | Percentage of the total allocatable CPU resources on each node to be reserved for each instance manager pod when the V1 Data Engine is enabled. The default value is "12". |

** local test **

An expected value 3 of guaranteed-instance-manager-cpu is correctly set to LH via installation configure file.

config file

$ cat harvester-cfg-3.yaml 
scheme_version: 1
install:
  mode: create
  harvester:
    storageClass:
      replicaCount: 1
    longhorn:
      defaultSettings:
        guaranteedReplicaManagerCPU: 4
        guaranteedInstanceManagerCPU: 3

harvester saved config:

$ cat /oem/harvester.config 
schemeversion: 1
serverurl: ""
token: rancher
os:
...
    device: /dev/sda
    configurl: http://192.168.122.159:8000/harvester-cfg-3.yaml
...
    webhooks: []
    addons: {}
    harvester:
        storageclass:
            replicacount: 1
        longhorn:
            defaultsettings:
                guaranteedenginemanagercpu: null
                guaranteedreplicamanagercpu: 4
                guaranteedinstancemanagercpu: 3
        enablegocoverdir: false
    rawdiskimagepath: ""
    persistentpartitionsize: 150Gi

LH settings:

$ kubectl get settings.longhorn.io -A | grep gua

longhorn-system   guaranteed-instance-manager-cpu                                   3                                             35s  // target value


This is an automatic backport of pull request #706 done by [Mergify](https://mergify.com).

Signed-off-by: Jian Wang <w13915984028@gmail.com>
(cherry picked from commit c0aaf56)
@bk201 bk201 merged commit 88656b1 into v1.2 Apr 18, 2024
5 checks passed
@mergify mergify bot deleted the mergify/bp/v1.2/pr-706 branch April 18, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants