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

[Arc] Upgrade node-exporter chart from 4.21.0 to 4.26.0 #733

Merged
merged 6 commits into from
Feb 2, 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: 2 additions & 2 deletions .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ trigger:
branches:
include:
- main
- grace/node-expoter-upgrade

pr:
autoCancel: true
Expand Down Expand Up @@ -891,7 +892,6 @@ jobs:
echo {\"image.name\":\"$(ARC_HELM_FULL_IMAGE_NAME)\"} > $(Build.ArtifactStagingDirectory)/arc-chart/metadata.json
workingDirectory: $(Build.SourcesDirectory)/otelcollector/deploy/addon-chart/
displayName: "Build: push helm chart to dev ACR"
condition: eq(variables.IS_PR, false)

- task: PublishBuildArtifacts@1
displayName: "Ev2: publish helm chart artifacts"
Expand All @@ -902,7 +902,7 @@ jobs:

- job: Deploy_Chart_ARC
displayName: "Deploy: Arc dev cluster"
condition: and(eq(variables.IS_PR, false), eq(variables.IS_MAIN_BRANCH, true))
#condition: and(eq(variables.IS_PR, false), eq(variables.IS_MAIN_BRANCH, true))
pool:
name: Azure-Pipelines-CI-Test-EO
dependsOn:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ version: ${IMAGE_TAG}
appVersion: "${IMAGE_TAG}"
dependencies:
- name: prometheus-node-exporter
version: "4.21.0"
version: "4.26.0"
repository: oci://${MCR_REGISTRY}${MCR_REPOSITORY_HELM_DEPENDENCIES}
condition: AzureMonitorMetrics.ArcExtension
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Azure:
ClusterDistribution: ""
prometheus-node-exporter:
service:
enabled: false
port: 9110
targetPort: 9110
image:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ keywords:
- prometheus
- exporter
type: application
version: 4.21.0
appVersion: 1.6.0
version: 4.26.0
appVersion: 1.7.0
home: https://github.com/prometheus/node_exporter/
sources:
- https://github.com/prometheus/node_exporter/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Prometheus `Node Exporter`
# Prometheus Node Exporter

Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.

This chart bootstraps a prometheus [`Node Exporter`](http://github.com/prometheus/node_exporter) daemonset on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
This chart bootstraps a Prometheus [Node Exporter](http://github.com/prometheus/node_exporter) daemonset on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Get Repository Info

<!-- textlint-disable terminology -->
```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
```

_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._

_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
<!-- textlint-enable -->
## Install Chart

```console
Expand All @@ -36,15 +36,11 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc
## Upgrading Chart

```console
helm upgrade [RELEASE_NAME] [CHART] --install
helm upgrade [RELEASE_NAME] prometheus-community/prometheus-node-exporter --install
```

_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._

### 4.16 to 4.17+

`containerSecurityContext.readOnlyRootFilesystem` is set to `true` by default.

### 3.x to 4.x

Starting from version 4.0.0, the `node exporter` chart is using the [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). Therefore you have to delete the daemonset before you upgrade.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
selector:
matchLabels:
{{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -40,7 +41,7 @@ spec:
{{- end }}
serviceAccountName: {{ include "prometheus-node-exporter.serviceAccountName" . }}
containers:
{{- $servicePort := ternary 8100 .Values.service.port .Values.kubeRBACProxy.enabled }}
{{- $servicePort := ternary .Values.kubeRBACProxy.port .Values.service.port .Values.kubeRBACProxy.enabled }}
- name: node-exporter
image: {{ include "prometheus-node-exporter.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand All @@ -49,7 +50,7 @@ spec:
- --path.sysfs=/host/sys
{{- if .Values.hostRootFsMount.enabled }}
- --path.rootfs=/host/root
{{- if semverCompare ">=1.4.0" (default .Chart.AppVersion .Values.image.tag) }}
{{- if semverCompare ">=1.4.0" (coalesce .Values.version .Values.image.tag .Chart.AppVersion) }}
- --path.udev.data=/host/root/run/udev/data
{{- end }}
{{- end }}
Expand Down Expand Up @@ -199,7 +200,10 @@ spec:
{{- end }}
ports:
- containerPort: {{ .Values.service.port}}
name: "http"
name: {{ .Values.kubeRBACProxy.portName }}
{{- if .Values.kubeRBACProxy.enableHostPort }}
hostPort: {{ .Values.service.port }}
{{- end }}
- containerPort: 8888
name: "http-healthz"
readinessProbe:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ range .Values.extraManifests }}
---
{{ tpl (toYaml .) $ }}
{{ tpl . $ }}
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -25,3 +26,4 @@ spec:
name: {{ .Values.service.portName }}
selector:
{{- include "prometheus-node-exporter.selectorLabels" . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# Number of old history to retain to allow rollback
# Default Kubernetes value is set to 10
revisionHistoryLimit: 10

global:
# To help compatibility with other charts which use global.imagePullSecrets.
# Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style).
Expand All @@ -38,7 +42,7 @@ kubeRBACProxy:
image:
registry: quay.io
repository: brancz/kube-rbac-proxy
tag: v0.14.0
tag: v0.15.0
sha: ""
pullPolicy: IfNotPresent

Expand All @@ -52,6 +56,13 @@ kubeRBACProxy:
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
containerSecurityContext: {}

# Specify the port used for the Node exporter container (upstream port)
port: 8100
# Specify the name of the container port
portName: http
# Configure a hostPort. If true, hostPort will be enabled in the container and set to service.port.
enableHostPort: false

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand All @@ -65,6 +76,7 @@ kubeRBACProxy:
# memory: 32Mi

service:
enabled: true
type: ClusterIP
port: 9100
targetPort: 9100
Expand Down Expand Up @@ -466,9 +478,13 @@ verticalPodAutoscaler:

# Extra manifests to deploy as an array
extraManifests: []
# - apiVersion: v1
# - |
# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: prometheus-extra
# data:
# extra-data: "value"

# Override version of app, required if image.tag is defined and does not follow semver
version: ""
Loading