Skip to content
Open
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
1 change: 1 addition & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ This removes all the Kubernetes components associated with the chart and deletes
| io_engine.​target.​nvmf.​ptpl | Reservations Persist Through Power Loss State | `true` |
| io_engine.&ZeroWidthSpace;target.&ZeroWidthSpace;nvmf.&ZeroWidthSpace;rdma | Enable RDMA Capability of Mayastor nvmf target to take RDMA connections if the cluster nodes have RDMA device(s) configured from RNIC. | <pre>{<br>"enabled":false<br>}</pre> |
| io_engine.&ZeroWidthSpace;tolerations | Set tolerations, overrides global | `[]` |
| ipFamily | IP family for services and bind addresses. Valid values: "ipv4", "ipv6", "both" (default). | `"both"` |
| localpv-provisioner.&ZeroWidthSpace;enabled | Enables the openebs dynamic-localpv-provisioner. If disabled, modify etcd and loki storage class accordingly. | `true` |
| localpv-provisioner.&ZeroWidthSpace;hostpathClass.&ZeroWidthSpace;enabled | Enable default hostpath localpv StorageClass. | `false` |
| localpv-provisioner.&ZeroWidthSpace;localpv.&ZeroWidthSpace;priorityClassName | Set the PriorityClass for the LocalPV Hostpath provisioner Deployment. | `"{{ .Release.Name }}-cluster-critical"` |
Expand Down
35 changes: 35 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,38 @@ Usage:
{{- end -}}
{{- end -}}
{{- end }}

{{/*
Generates ipFamilyPolicy and ipFamilies for Service specs based on the global ipFamily setting.
Valid values: "ipv4", "ipv6", "both"
*/}}
{{- define "service_ip_family" -}}
{{- if eq .Values.ipFamily "ipv4" }}
ipFamilyPolicy: SingleStack
ipFamilies:
- IPv4
{{- else if eq .Values.ipFamily "ipv6" }}
ipFamilyPolicy: SingleStack
ipFamilies:
- IPv6
{{- else if eq .Values.ipFamily "both" }}
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
{{- else }}
{{- fail (printf "invalid ipFamily value %q -- valid values: ipv4, ipv6, both" .Values.ipFamily) -}}
{{- end -}}
{{- end -}}

{{/*
Returns the bind address based on ipFamily, formatted for use in a "host:port" string.
ipv4 → "0.0.0.0", ipv6 or both → "[::]" (brackets per RFC 3986, required by parsers like Rust's SocketAddr).
*/}}
{{- define "bind_address" -}}
{{- if eq .Values.ipFamily "ipv4" -}}
0.0.0.0
{{- else -}}
[::]
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
{{- end }}
- "--cache-period={{ .Values.base.cache_poll_period }}"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ include "jaeger_url" . }}"{{ end }}
- "--grpc-server-addr=[::]:50051"
- "--grpc-server-addr={{ include "bind_address" . }}:50051"
- "--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 }}"
Expand Down Expand Up @@ -107,7 +107,7 @@ spec:
image: "{{ .Values.image.registry }}/{{ .Values.image.repo }}/{{ include "image_prefix" . }}-agent-ha-cluster:{{ default .Values.image.tag .Values.image.repoTags.controlPlane }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "-g=[::]:50052"
- "-g={{ include "bind_address" . }}:50052"
- "--store=http://{{ include "etcdUrl" . }}"
- "--core-grpc=https://{{ .Release.Name }}-agent-core:50051"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ include "jaeger_url" . }}"{{ end }}{{ if .Values.eventing.enabled }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
{{ include "label_prefix" . }}/version: {{ .Chart.Version }}
spec:
{{- include "service_ip_family" . | nindent 2 }}
selector:
app: agent-core
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
Expand Down
3 changes: 2 additions & 1 deletion chart/templates/mayastor/apis/api-rest-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ spec:
args:
- "--dummy-certificates"
- "--no-auth"
- "--http=[::]:8081"
- "--https={{ include "bind_address" . }}:8080"
- "--http={{ include "bind_address" . }}:8081"
- "--request-timeout={{ .Values.base.default_req_timeout }}"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ include "jaeger_url" . }}"{{ end }}
- "--core-grpc=https://{{ .Release.Name }}-agent-core:50051"
Expand Down
1 change: 1 addition & 0 deletions chart/templates/mayastor/apis/api-rest-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
{{ include "label_prefix" . }}/version: {{ .Chart.Version }}
spec:
{{- include "service_ip_family" . | nindent 2 }}
type: {{ .Values.apis.rest.service.type }}
selector:
app: api-rest
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/mayastor/io/io-engine-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ spec:
protocol: TCP
name: metrics
args:
- "--metrics-endpoint=[::]:{{ default 9502 .Values.base.metrics.port }}"
- "--metrics-endpoint={{ include "bind_address" . }}:{{ default 9502 .Values.base.metrics.port }}"
- "--grpc-port={{ default 10124 .Values.io_engine.port }}"
- "--fmt-style={{ include "logFormat" . }}"
- "--ansi-colors={{ .Values.base.logging.color }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
{{ include "label_prefix" . }}/version: {{ .Chart.Version }}
spec:
{{- include "service_ip_family" . | nindent 2 }}
ports:
- name: metrics
port: 9502
Expand Down
1 change: 1 addition & 0 deletions chart/templates/mayastor/obs/stats-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
{{ include "label_prefix" . }}/version: {{ .Chart.Version }}
spec:
{{- include "service_ip_family" . | nindent 2 }}
ports:
- port: 9090
name: https
Expand Down
2 changes: 2 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ earlyEvictionTolerations:
# If any component has tolerations set, then it would override this value.
# For external components like etcd, jaeger and loki, tolerations can only be set at component level.
tolerations: [ ]
# -- IP family for services and bind addresses. Valid values: "ipv4", "ipv6", "both" (default).
ipFamily: "both"
base:
# -- Request timeout for rest & core agents
default_req_timeout: 5s
Expand Down
Loading