mirror of
https://github.com/malarinv/iperf3-monitor.git
synced 2026-03-08 05:22:35 +00:00
Compare commits
3 Commits
v0.2.2
...
jules/alig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
048626874b | ||
|
|
b92c518b90 | ||
|
|
e889936104 |
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -22,6 +22,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: v3.10.0
|
version: v3.10.0
|
||||||
|
|
||||||
|
- name: Add Helm repositories
|
||||||
|
run: |
|
||||||
|
helm repo add bjw-s https://bjw-s-labs.github.io/helm-charts/ --force-update
|
||||||
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts --force-update
|
||||||
|
helm repo update
|
||||||
|
|
||||||
|
- name: Build Helm chart dependencies
|
||||||
|
run: helm dependency build ./charts/iperf3-monitor
|
||||||
|
|
||||||
- name: Helm Lint
|
- name: Helm Lint
|
||||||
run: helm lint ./charts/iperf3-monitor
|
run: helm lint ./charts/iperf3-monitor
|
||||||
|
|
||||||
@@ -86,6 +95,15 @@ jobs:
|
|||||||
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
|
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
|
||||||
sudo chmod +x /usr/bin/yq
|
sudo chmod +x /usr/bin/yq
|
||||||
|
|
||||||
|
- name: Add Helm repositories
|
||||||
|
run: |
|
||||||
|
helm repo add bjw-s https://bjw-s-labs.github.io/helm-charts/ --force-update
|
||||||
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts --force-update
|
||||||
|
helm repo update
|
||||||
|
|
||||||
|
- name: Build Helm chart dependencies
|
||||||
|
run: helm dependency build ./charts/iperf3-monitor
|
||||||
|
|
||||||
- name: Set Chart Version from Tag
|
- name: Set Chart Version from Tag
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Proceed with modifications only if the exporter controller is defined.
|
|||||||
{{- if $exporterContainerCfg -}}
|
{{- if $exporterContainerCfg -}}
|
||||||
{{- if not $exporterContainerCfg.image.tag -}}
|
{{- if not $exporterContainerCfg.image.tag -}}
|
||||||
{{- if $chart.AppVersion -}}
|
{{- if $chart.AppVersion -}}
|
||||||
{{- $_ := set $exporterContainerCfg.image "tag" $chart.AppVersion -}}
|
{{- $_ := set $exporterContainerCfg.image "tag" (printf "v%s" $chart.AppVersion) -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- fail (printf "Error: Container image tag is not specified for controller '%s', container '%s', and Chart.AppVersion is also empty." $exporterControllerKey "exporter") -}}
|
{{- fail (printf "Error: Container image tag is not specified for controller '%s', container '%s', and Chart.AppVersion is also empty." $exporterControllerKey "exporter") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -7,9 +7,10 @@ metadata:
|
|||||||
{{- include "iperf3-monitor.labels" . | nindent 4 }}
|
{{- include "iperf3-monitor.labels" . | nindent 4 }}
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "iperf3-monitor.fullname" . }}-role
|
name: {{ include "iperf3-monitor.fullname" . }}-role
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "iperf3-monitor.labels" . | nindent 4 }}
|
{{- include "iperf3-monitor.labels" . | nindent 4 }}
|
||||||
rules:
|
rules:
|
||||||
@@ -18,9 +19,10 @@ rules:
|
|||||||
verbs: ["get", "list", "watch"]
|
verbs: ["get", "list", "watch"]
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: RoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "iperf3-monitor.fullname" . }}-rb
|
name: {{ include "iperf3-monitor.fullname" . }}-rb
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "iperf3-monitor.labels" . | nindent 4 }}
|
{{- include "iperf3-monitor.labels" . | nindent 4 }}
|
||||||
subjects:
|
subjects:
|
||||||
@@ -28,7 +30,7 @@ subjects:
|
|||||||
name: {{ include "iperf3-monitor.serviceAccountName" . }}
|
name: {{ include "iperf3-monitor.serviceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: Role # Changed from ClusterRole
|
||||||
name: {{ include "iperf3-monitor.fullname" . }}-role
|
name: {{ include "iperf3-monitor.fullname" . }}-role
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -11,7 +11,7 @@ spec:
|
|||||||
{{- include "iperf3-monitor.selectorLabels" . | nindent 4 }}
|
{{- include "iperf3-monitor.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/component: exporter
|
app.kubernetes.io/component: exporter
|
||||||
ports:
|
ports:
|
||||||
- name: metrics
|
- name: metrics # Assuming 'metrics' is the intended name, aligns with values structure
|
||||||
port: {{ .Values.service.port }}
|
port: {{ .Values.service.main.ports.metrics.port }}
|
||||||
targetPort: {{ .Values.service.targetPort }}
|
targetPort: {{ .Values.service.main.ports.metrics.targetPort }}
|
||||||
protocol: TCP
|
protocol: {{ .Values.service.main.ports.metrics.protocol | default "TCP" }}
|
||||||
@@ -86,13 +86,15 @@ controllers:
|
|||||||
# key: mykey
|
# key: mykey
|
||||||
|
|
||||||
# -- Ports for the exporter container.
|
# -- Ports for the exporter container.
|
||||||
|
# Expected by Kubernetes and bjw-s common library as a list of objects.
|
||||||
ports:
|
ports:
|
||||||
metrics: # Name of the port, will be used in Service definition
|
- name: metrics # Name of the port, referenced by Service's targetPort
|
||||||
# -- Port number for the metrics endpoint on the container.
|
# -- Port number for the metrics endpoint on the container.
|
||||||
port: 9876 # Default, should match service.targetPort
|
containerPort: 9876
|
||||||
# -- Protocol for the metrics port.
|
# -- Protocol for the metrics port.
|
||||||
protocol: TCP # Common library defaults to TCP if not specified.
|
protocol: TCP
|
||||||
enabled: true # This port is enabled
|
# -- Whether this port definition is enabled. Specific to bjw-s common library.
|
||||||
|
enabled: true
|
||||||
|
|
||||||
# -- CPU and memory resource requests and limits for the exporter container.
|
# -- CPU and memory resource requests and limits for the exporter container.
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
Reference in New Issue
Block a user