Skip to content

Commit 5629566

Browse files
author
datacore-bolt-ci
committed
ci(stability): merge the release/2.9 branch
2 parents 9d29e29 + 5fa9448 commit 5629566

File tree

13 files changed

+208
-39
lines changed

13 files changed

+208
-39
lines changed

.github/workflows/helm-chart.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: nix-shell --pure --run "./scripts/helm/test-template.sh" ./scripts/helm/shell.nix
3131

3232
helm-images:
33-
runs-on: ubuntu-latest-8-cores
33+
runs-on: oracle-vm-8cpu-32gb-x86-64
3434
steps:
3535
- uses: actions/checkout@v4
3636
with:
@@ -48,6 +48,15 @@ jobs:
4848
run: nix-shell ./scripts/helm/shell.nix --run "echo"
4949
- name: Generate image list
5050
run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/images.sh generate --dependency-update --exit-code"
51+
- name: Login to Docker Hub
52+
uses: docker/login-action@v3
53+
env:
54+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
55+
if: ${{ env.DOCKERHUB_USERNAME != '' }}
56+
with:
57+
registry: docker.io
58+
username: ${{ secrets.DOCKERHUB_USERNAME }}
59+
password: ${{ secrets.DOCKERHUB_TOKEN }}
5160
- name: BootStrap k8s cluster
5261
if: github.event_name != 'pull_request'
5362
run: nix-shell ./scripts/k8s/shell.nix --run "./scripts/k8s/deployer.sh start --label"

.github/workflows/k8s-ci.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44

55
jobs:
66
k8s-ci:
7-
runs-on: ubuntu-latest-8-cores
7+
runs-on: oracle-vm-8cpu-32gb-x86-64
88
steps:
99
- name: Bind mount /dev/sda1 to /nix
1010
run: |
@@ -63,22 +63,3 @@ jobs:
6363
display-options: a
6464
fail-on-empty: true
6565
title: Test results
66-
67-
k8s-ci-vm:
68-
runs-on: ubuntu-latest-8-cores
69-
steps:
70-
- uses: actions/checkout@v4
71-
- uses: cachix/[email protected]
72-
with:
73-
enable_kvm: true
74-
- name: Pre-populate nix-shell
75-
run: |
76-
export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r)
77-
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV
78-
nix-shell ./scripts/helm/shell.nix --run "echo"
79-
- name: Test on VM
80-
run: |
81-
nix-shell ./scripts/helm/shell.nix --run "cd chart; helm dependency update"
82-
# todo: this is broken currently, as it doesn't take into account changes
83-
# to the local images!
84-
# nix-build ./tests/helm/test.nix --option sandbox false

.github/workflows/release-binaries.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
matrix:
1919
include:
2020
# NOTE: Update the .krew.yaml file (if required) when making changes here.
21-
- os: ubuntu-latest-8-cores
21+
- os: oracle-vm-8cpu-32gb-x86-64
2222
target: linux-musl
2323
arch: x86_64
24-
- os: ubuntu-latest-8-cores
24+
- os: oracle-vm-8cpu-32gb-x86-64
2525
target: linux-musl
2626
arch: aarch64
2727
- os: macos-14
@@ -30,7 +30,7 @@ jobs:
3030
- os: macos-13
3131
target: apple-darwin
3232
arch: x86_64
33-
- os: ubuntu-latest-8-cores
33+
- os: oracle-vm-8cpu-32gb-x86-64
3434
target: windows-gnu
3535
arch: x86_64
3636
suffix: .exe

chart/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ This removes all the Kubernetes components associated with the chart and deletes
9191
| agents.​ha.​cluster.​resources.​requests.​cpu | Cpu requests for ha cluster agent | `"100m"` |
9292
| agents.​ha.​cluster.​resources.​requests.​memory | Memory requests for ha cluster agent | `"16Mi"` |
9393
| agents.​ha.​node.​logLevel | Log level for the ha node service | `"info"` |
94+
| agents.​ha.​node.​port | Container port for the ha-node service | `50053` |
9495
| agents.​ha.​node.​priorityClassName | Set PriorityClass, overrides global | `""` |
9596
| agents.​ha.​node.​resources.​limits.​cpu | Cpu limits for ha node agent | `"100m"` |
9697
| agents.​ha.​node.​resources.​limits.​memory | Memory limits for ha node agent | `"64Mi"` |
@@ -125,6 +126,7 @@ This removes all the Kubernetes components associated with the chart and deletes
125126
| base.​logging.​format | Valid values for format are pretty, json and compact | `"pretty"` |
126127
| base.​logging.​silenceLevel | Silence specific module components | `nil` |
127128
| base.​metrics.​enabled | Enable the metrics exporter | `true` |
129+
| base.​metrics.​port | Container port for the metrics exporter service | `9502` |
128130
| crds.​csi.​volumeSnapshots.​enabled | Install Volume Snapshot CRDs | `true` |
129131
| crds.​enabled | Disables the installation of all CRDs if set to false | `true` |
130132
| csi.​controller.​logLevel | Log level for the csi controller | `"info"` |
@@ -147,6 +149,7 @@ This removes all the Kubernetes components associated with the chart and deletes
147149
| csi.​node.​kubeletDir | The kubeletDir directory for the csi-node plugin | `"/var/lib/kubelet"` |
148150
| csi.​node.​nvme.​ctrl_loss_tmo | The ctrl_loss_tmo (controller loss timeout) in seconds | `"1980"` |
149151
| csi.​node.​nvme.​tcpFallback | Fallback to nvme-tcp if nvme-rdma is enabled for Mayastor but rdma is not available on a particular csi-node | `true` |
152+
| csi.​node.​port | Container port for the csi-node service | `10199` |
150153
| csi.​node.​priorityClassName | Set PriorityClass, overrides global | `""` |
151154
| csi.​node.​resources.​limits.​cpu | Cpu limits for csi node plugin | `"100m"` |
152155
| csi.​node.​resources.​limits.​memory | Memory limits for csi node plugin | `"128Mi"` |
@@ -182,6 +185,7 @@ This removes all the Kubernetes components associated with the chart and deletes
182185
| io_engine.&ZeroWidthSpace;nodeSelector | Node selectors to designate storage nodes for diskpool creation Note that if multi-arch images support 'kubernetes.io/arch: amd64' should be removed. | <pre>{<br>"kubernetes.io/arch":"amd64",<br>"openebs.io/engine":"mayastor"<br>}</pre> |
183186
| io_engine.&ZeroWidthSpace;nvme.&ZeroWidthSpace;ioTimeout | Timeout for IOs The default here is exaggerated for local disks, but we've observed that in shared virtual environments having a higher timeout value is beneficial. Please adjust this according to your hardware and needs. | `"110s"` |
184187
| io_engine.&ZeroWidthSpace;nvme.&ZeroWidthSpace;tcp.&ZeroWidthSpace;maxQueueDepth | You may need to increase this for a higher outstanding IOs per volume | `"32"` |
188+
| io_engine.&ZeroWidthSpace;port | Container port for the io-engine service | `10124` |
185189
| io_engine.&ZeroWidthSpace;priorityClassName | Set PriorityClass, overrides global | `""` |
186190
| io_engine.&ZeroWidthSpace;pstorRetries | Number of retries for pstor persistence before the volume target self shutdowns | `300` |
187191
| io_engine.&ZeroWidthSpace;resources.&ZeroWidthSpace;limits.&ZeroWidthSpace;cpu | Cpu limits for the io-engine | `""` |

chart/templates/mayastor/agents/ha/ha-node-daemonset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ spec:
7373
- "--node-name=$(MY_NODE_NAME)"
7474
- "--csi-socket={{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}/{{ .Values.csi.node.socketPath }}"
7575
- "--grpc-ip=$(MY_POD_IP)"
76-
- "--grpc-port=50053"
76+
- "--grpc-port={{ default 50053 .Values.agents.ha.node.port }}"
7777
- "--cluster-agent=https://{{ .Release.Name }}-agent-core:50052"{{ if .Values.base.jaeger.enabled }}
7878
- "--jaeger={{ include "jaeger_url" . }}"{{ end }}{{ if .Values.eventing.enabled }}
7979
- "--events-url=nats://{{ .Release.Name }}-nats:4222"
@@ -97,7 +97,7 @@ spec:
9797
cpu: {{ .Values.agents.ha.node.resources.requests.cpu | quote }}
9898
memory: {{ .Values.agents.ha.node.resources.requests.memory | quote }}
9999
ports:
100-
- containerPort: 50053
100+
- containerPort: {{ default 50053 .Values.agents.ha.node.port }}
101101
protocol: TCP
102102
name: ha-node
103103
volumes:

chart/templates/mayastor/csi/csi-node-daemonset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ spec:
9292
- "--enable-rest"{{ end }}
9393
- "--enable-registration"
9494
- "--grpc-ip=$(MY_POD_IP)"
95-
- "--grpc-port=10199"{{ if .Values.csi.node.nvme.io_timeout }}
95+
- "--grpc-port={{ default 10199 .Values.csi.node.port }}"{{ if .Values.csi.node.nvme.io_timeout }}
9696
- "--nvme-io-timeout={{ .Values.csi.node.nvme.io_timeout }}"
9797
- "--nvme-core-io-timeout={{ .Values.csi.node.nvme.io_timeout }}"{{ else }}
9898
- "--nvme-io-timeout={{ .Values.io_engine.nvme.ioTimeout }}10s"
@@ -146,7 +146,7 @@ spec:
146146
memory: "50Mi"
147147
# Mayastor node plugin gRPC server
148148
ports:
149-
- containerPort: 10199
149+
- containerPort: {{ default 10199 .Values.csi.node.port }}
150150
protocol: TCP
151151
name: mayastor-node
152152
volumes:

chart/templates/mayastor/io/io-engine-daemonset.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ spec:
5555
fieldRef:
5656
fieldPath: status.podIP
5757
ports:
58-
- containerPort: 9502
58+
- containerPort: {{ default 9502 .Values.base.metrics.port }}
5959
protocol: TCP
6060
name: metrics
6161
args:
62+
- "--metrics-endpoint=[::]:{{ default 9502 .Values.base.metrics.port }}"
63+
- "--grpc-port={{ default 10124 .Values.io_engine.port }}"
6264
- "--fmt-style={{ include "logFormat" . }}"
6365
- "--ansi-colors={{ .Values.base.logging.color }}"
6466
{{- end }}
@@ -100,6 +102,7 @@ spec:
100102
# Note: Ensure that the CPU resources are updated accordingly.
101103
# If you use 2 CPUs, the CPU: field should also read 2.
102104
- "--grpc-ip=$(MY_POD_IP)"
105+
- "--grpc-port={{ default 10124 .Values.io_engine.port }}"
103106
- "-N$(MY_NODE_NAME)"
104107
- "-Rhttps://{{ .Release.Name }}-agent-core:50051"
105108
- "-y/var/local/{{ .Release.Name }}/io-engine/config.yaml"
@@ -140,7 +143,7 @@ spec:
140143
memory: {{ .Values.io_engine.resources.requests.memory | quote }}
141144
hugepages-2Mi: {{ .Values.io_engine.resources.requests.hugepages2Mi | quote }}
142145
ports:
143-
- containerPort: 10124
146+
- containerPort: {{ default 10124 .Values.io_engine.port }}
144147
protocol: TCP
145148
name: io-engine
146149
volumes:

chart/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ base:
8787
metrics:
8888
# -- Enable the metrics exporter
8989
enabled: true
90+
# -- Container port for the metrics exporter service
91+
port: 9502
9092
jaeger:
9193
# Enable jaeger tracing (for development only).
9294
# Since version 1.31 the Jaeger Operator uses webhooks to validate Jaeger custom resources (CRs).
@@ -233,6 +235,8 @@ agents:
233235
tolerations: []
234236
# -- Set PriorityClass, overrides global
235237
priorityClassName: ""
238+
# -- Container port for the ha-node service
239+
port: 50053
236240
cluster:
237241
# -- Log level for the ha cluster service
238242
logLevel: info
@@ -398,6 +402,8 @@ csi:
398402
containers:
399403
- name: nvme-tcp-probe
400404
command: ['sh', '-c', 'trap "exit 1" TERM; until [ -d /sys/module/nvme_tcp ]; do [ -z "$WARNED" ] && echo "nvme_tcp module not loaded..."; WARNED=1; sleep 60; done;']
405+
# -- Container port for the csi-node service
406+
port: 10199
401407
io_engine:
402408
# -- Log level for the io-engine service
403409
logLevel: info
@@ -476,6 +482,8 @@ io_engine:
476482
runtimeClassName: ""
477483
# -- Number of retries for pstor persistence before the volume target self shutdowns
478484
pstorRetries: 300
485+
# -- Container port for the io-engine service
486+
port: 10124
479487
etcd:
480488
# -- Disable when using an external etcd cluster.
481489
enabled: true

metrics-exporter/src/bin/io_engine/client/grpc_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ impl GrpcClient {
105105
}
106106

107107
/// Initialize mayastor grpc client.
108-
pub(crate) async fn init_client() -> Result<GrpcClient, ExporterError> {
108+
pub(crate) async fn init_client(grpc_port: u16) -> Result<GrpcClient, ExporterError> {
109109
let timeout = Timeouts::new(Duration::from_secs(1), Duration::from_secs(5));
110110
let pod_ip = get_pod_ip()?;
111111
let _ = get_node_name()?;
112112

113113
let endpoint = Uri::builder()
114114
.scheme("https")
115-
.authority(SocketAddr::new(pod_ip, 10124).to_string())
115+
.authority(SocketAddr::new(pod_ip, grpc_port).to_string())
116116
.path_and_query("")
117117
.build()
118118
.map_err(|error| ExporterError::InvalidURI(error.to_string()))?;

0 commit comments

Comments
 (0)