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

refactor(rebuild): tidy up helm variables for rebuild #481

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ This removes all the Kubernetes components associated with the chart and deletes
| agents.​core.​capacity.​thin.​volumeCommitment | When creating replicas for an existing volume, each replica pool must have at least this much free space percentage of the volume size. Example: if this value is 40, the pool has 40GiB free, then the max volume size allowed to be created on the pool is 100GiB. | `"40%"` |
| agents.​core.​capacity.​thin.​volumeCommitmentInitial | Same as the `volumeCommitment` argument, but applicable only when creating replicas for a new volume. | `"40%"` |
| agents.​core.​logLevel | Log level for the core service | `"info"` |
| agents.​core.​partialRebuildWaitPeriod | If a faulted replica comes back online within this time period then it will be rebuilt using the partial rebuild capability (using a log of missed IO), hence a bit faster depending on the log size. Otherwise, the replica will be fully rebuilt. A blank value "" means internally derived value will be used. | `""` |
| agents.​core.​priorityClassName | Set PriorityClass, overrides global. If both local and global are not set, the final deployment manifest has a mayastor custom critical priority class assigned to the pod by default. Refer the `templates/_helpers.tpl` and `templates/mayastor/agents/core/agent-core-deployment.yaml` for more details. | `""` |
| agents.​core.​rebuild.​maxConcurrent | The maximum number of system-wide rebuilds permitted at any given time. If set to an empty string, there are no limits. | `""` |
| agents.​core.​rebuild.​partial.​enabled | Partial rebuild uses a log of missed IO to rebuild replicas which have become temporarily faulted, hence a bit faster, depending on the log size. | `true` |
| agents.​core.​rebuild.​partial.​waitPeriod | If a faulted replica comes back online within this time period then it will be rebuilt using the partial rebuild capability. Otherwise, the replica will be fully rebuilt. A blank value "" means internally derived value will be used. | `""` |
| agents.​core.​resources.​limits.​cpu | Cpu limits for core agents | `"1000m"` |
| agents.​core.​resources.​limits.​memory | Memory limits for core agents | `"128Mi"` |
| agents.​core.​resources.​requests.​cpu | Cpu requests for core agents | `"500m"` |
Expand Down
18 changes: 9 additions & 9 deletions chart/templates/mayastor/agents/core/agent-core-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ spec:
- "--pool-commitment={{ .Values.agents.core.capacity.thin.poolCommitment }}"
- "--snapshot-commitment={{ .Values.agents.core.capacity.thin.snapshotCommitment }}"
- "--volume-commitment-initial={{ .Values.agents.core.capacity.thin.volumeCommitmentInitial }}"
- "--volume-commitment={{ .Values.agents.core.capacity.thin.volumeCommitment }}"{{ if .Values.agents.core.partialRebuildWaitPeriod }}
- "--faulted-child-wait-period={{ .Values.agents.core.partialRebuildWaitPeriod }}"{{ end }}{{ if .Values.eventing.enabled }}
- "--events-url=nats://{{ .Release.Name }}-nats:4222"{{ end }}
{{- if not .Values.agents.ha.enabled }}
- "--volume-commitment={{ .Values.agents.core.capacity.thin.volumeCommitment }}"{{ if .Values.eventing.enabled }}
- "--events-url=nats://{{ .Release.Name }}-nats:4222"{{ end }}{{ if not .Values.agents.ha.enabled }}
- "--disable-ha"{{ end }}
- "--fmt-style={{ include "logFormat" . }}"
- "--ansi-colors={{ .Values.base.logging.color }}"
- "--create-volume-limit={{ .Values.agents.core.maxCreateVolume }}"{{ if .Values.agents.core.maxRebuilds }}
- "--max-rebuilds={{ .Values.agents.core.maxRebuilds }}"{{ end }}
{{- if .Values.agents.core.partialRebuildDisable }}
- "--disable-partial-rebuild"
{{- end }}
- "--create-volume-limit={{ .Values.agents.core.maxCreateVolume }}"
{{- if $wait := default ((.Values.agents.core.rebuild).partial).waitPeriod .Values.agents.core.partialRebuildWaitPeriod }}
- "--faulted-child-wait-period={{ $wait }}"{{ end }}
{{- if (.Values.agents.core.rebuild).maxConcurrent }}
- "--max-rebuilds={{ .Values.agents.core.rebuild.maxConcurrent }}"{{ end }}
{{- if eq ((.Values.agents.core.rebuild).partial).enabled false }}
- "--disable-partial-rebuild"{{ end }}
ports:
- containerPort: 50051
env:
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/mayastor/agents/ha/ha-node-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
value: "1"
args:
- "--node-name=$(MY_NODE_NAME)"
- "--csi-socket={{ .Values.csi.node.pluginMountPath }}/{{ .Values.csi.node.socketPath }}"
- "--csi-socket={{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}/{{ .Values.csi.node.socketPath }}"
- "--grpc-endpoint=$(MY_POD_IP):50053"
- "--cluster-agent=https://{{ .Release.Name }}-agent-core:50052"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ .Values.base.jaeger.agent.name }}:{{ .Values.base.jaeger.agent.port }}"{{ end }}{{ if .Values.eventing.enabled }}
Expand All @@ -86,7 +86,7 @@ spec:
- name: run-udev
mountPath: /run/udev
- name: plugin-dir
mountPath: {{ .Values.csi.node.pluginMountPath }}
mountPath: {{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}
resources:
limits:
cpu: {{ .Values.agents.ha.node.resources.limits.cpu | quote }}
Expand Down
8 changes: 4 additions & 4 deletions chart/templates/mayastor/csi/csi-node-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
value: {{ .Values.csi.node.mkfs_args.xfs | quote }}
{{- end }}
args:
- "--csi-socket={{ .Values.csi.node.pluginMountPath }}/{{ .Values.csi.node.socketPath }}"
- "--csi-socket={{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}/{{ .Values.csi.node.socketPath }}"
- "--node-name=$(MY_NODE_NAME)"
- "--rest-endpoint=http://{{ .Release.Name }}-api-rest:8081"
- "--enable-registration"
Expand All @@ -109,7 +109,7 @@ spec:
- name: run-udev
mountPath: /run/udev
- name: plugin-dir
mountPath: {{ .Values.csi.node.pluginMountPath }}
mountPath: {{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}
- name: kubelet-dir
mountPath: {{ .Values.csi.node.kubeletDir }}
mountPropagation: "Bidirectional"
Expand All @@ -124,11 +124,11 @@ spec:
image: "{{ .Values.csi.image.registry }}/{{ .Values.csi.image.repo }}/csi-node-driver-registrar:{{ .Values.csi.image.registrarTag }}"
imagePullPolicy: {{ .Values.csi.image.pullPolicy }}
args:
- "--csi-address={{ .Values.csi.node.pluginMountPath }}/{{ .Values.csi.node.socketPath }}"
- "--csi-address={{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}/{{ .Values.csi.node.socketPath }}"
- "--kubelet-registration-path={{ .Values.csi.node.kubeletDir }}/plugins/io.openebs.mayastor/csi.sock"
volumeMounts:
- name: plugin-dir
mountPath: {{ .Values.csi.node.pluginMountPath }}
mountPath: {{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}
- name: registration-dir
mountPath: /registration
resources:
Expand Down
22 changes: 12 additions & 10 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,18 @@ agents:
# Example: if this value is 40, the pool has 40GiB free, then the max volume size allowed
# to be snapped on the pool is 100GiB.
snapshotCommitment: "40%"
# -- If a faulted replica comes back online within this time period then it will be
# rebuilt using the partial rebuild capability (using a log of missed IO), hence a bit
# faster depending on the log size. Otherwise, the replica will be fully rebuilt.
# A blank value "" means internally derived value will be used.
partialRebuildWaitPeriod: ""
# Set to true to disable partial rebuilds.
partialRebuildDisable:
# The maximum number of system-wide rebuilds permitted at any given time.
# If set to an empty string, there are no limits.
maxRebuilds: ""
rebuild:
# -- The maximum number of system-wide rebuilds permitted at any given time.
# If set to an empty string, there are no limits.
maxConcurrent: ""
partial:
# -- Partial rebuild uses a log of missed IO to rebuild replicas which have become temporarily faulted,
# hence a bit faster, depending on the log size.
enabled: true
# -- If a faulted replica comes back online within this time period then it will be
# rebuilt using the partial rebuild capability. Otherwise, the replica will be fully rebuilt.
# A blank value "" means internally derived value will be used.
waitPeriod: ""
# The maximum number of concurrent create volume requests.
maxCreateVolume: 10

Expand Down
Loading