Skip to content

Commit

Permalink
Release 4.3.2 (#864)
Browse files Browse the repository at this point in the history
* Use common.annotations in manifests

* Move cluster uid to annotations section in helpers

* Update version in Chart.yaml

* Fix branch build

---------

Co-authored-by: Peter Stranak <[email protected]>
  • Loading branch information
janatrelakova and pstranak-sw authored Jan 13, 2025
1 parent 7767476 commit deaedd1
Show file tree
Hide file tree
Showing 42 changed files with 97 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildAndDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
pull_request:
branches:
- master
- release/**
- 'release/**'

workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: swo-k8s-collector
version: 4.3.1
version: 4.3.2
appVersion: 0.12.2
description: SolarWinds Kubernetes Integration
keywords:
Expand Down
7 changes: 6 additions & 1 deletion deploy/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Common labels
app.kubernetes.io/part-of: swo-k8s-collector
app.kubernetes.io/instance: {{ template "common.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Name }}
swo.cloud.solarwinds.com/cluster-uid: {{ (include "common.cluster-uid" .) }}
{{- if .Chart.AppVersion }}
helm.sh/chart: {{ include "common.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
Expand All @@ -77,6 +76,12 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
{{- end -}}

{{/*
Common annotations
*/}}
{{- define "common.annotations" -}}
swo.cloud.solarwinds.com/cluster-uid: {{ (include "common.cluster-uid" .) }}
{{- end -}}

{{/*
Event which are considered as error
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/autoupdate/autoupdate-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
schedule: {{ quote .Values.autoupdate.schedule }}
jobTemplate:
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/autoupdate/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-autoupdate-clusterrole") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
rules:
- apiGroups:
- rbac.authorization.k8s.io
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/autoupdate/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-autoupdate-clusterrole-binding") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/autoupdate/helm-update-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
helm-upgrade.sh: |
#!/bin/bash
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/autoupdate/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
rules:
- apiGroups:
- '*'
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/autoupdate/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-role-binding") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-role") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
rules:
- apiGroups:
- ""
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/collector-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
type: ClusterIP
ports:
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/common-env-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
CLUSTER_NAME: {{ quote .Values.cluster.name }}
CLUSTER_UID: {{ quote (include "common.cluster-uid" .) }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/events-collector-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
events.config: |
{{ tpl (.Files.Get "events-collector-config.yaml") . | fromYaml | toYaml | indent 8 }}
3 changes: 3 additions & 0 deletions deploy/helm/templates/events-collector-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
labels:
app.kubernetes.io/name: swo-k8s-collector
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
replicas: 1
selector:
Expand All @@ -17,6 +19,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/events-collector-config-map.yaml") . | sha256sum }}
checksum/config_common_env: {{ include (print $.Template.BasePath "/common-env-config-map.yaml") . | sha256sum }}
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
{{- if .Values.otel.events.telemetry.metrics.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ (split ":" .Values.otel.events.telemetry.metrics.address)._1 | quote }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/events-pod-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ metadata:
{{- if .Values.otel.events.telemetry.metrics.podMonitor.additionalLabels }}
{{- toYaml .Values.otel.events.telemetry.metrics.podMonitor.additionalLabels | nindent 4 }}
{{- end }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
selector:
matchLabels:
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/logs-fargate-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ metadata:
namespace: aws-observability
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
flb_log_cw: "false" # Set to true to ship Fluent Bit process logs to CloudWatch.
filters.conf: |
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/logs-fargate-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ metadata:
labels:
aws-observability: enabled
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/templates/metrics-collector-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
metrics.config: |
{{ tpl (.Files.Get "metrics-collector-config.yaml") . | fromYaml | toYaml | indent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/metrics-collector-env-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
{{- if .Values.otel.metrics.prometheus.url }}
PROMETHEUS_URL: {{ quote .Values.otel.metrics.prometheus.url }}
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ metadata:
labels:
app.kubernetes.io/name: swo-k8s-collector
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
replicas: 1
selector:
Expand All @@ -19,6 +21,7 @@ spec:
checksum/config_common_env: {{ include (print $.Template.BasePath "/common-env-config-map.yaml") . | sha256sum }}
checksum/config_env: {{ include (print $.Template.BasePath "/metrics-collector-env-config-map.yaml") . | sha256sum }}
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
{{- if .Values.otel.metrics.telemetry.metrics.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ (split ":" .Values.otel.metrics.telemetry.metrics.address)._1 | quote }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/metrics-discovery-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
metrics-discovery.config: |
{{ tpl (.Files.Get "metrics-discovery-config.yaml") . | fromYaml | toYaml | indent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/metrics-discovery-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ metadata:
labels:
app.kubernetes.io/name: swo-k8s-collector
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
replicas: 1
selector:
Expand All @@ -18,6 +20,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/metrics-discovery-config-map.yaml") . | sha256sum }}
checksum/config_common_env: {{ include (print $.Template.BasePath "/common-env-config-map.yaml") . | sha256sum }}
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
{{- if .Values.aws_fargate.metrics.autodiscovery.telemetry.metrics.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ (split ":" .Values.aws_fargate.metrics.autodiscovery.telemetry.metrics.address)._1 | quote }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/metrics-pod-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ metadata:
{{- if .Values.otel.metrics.telemetry.metrics.podMonitor.additionalLabels }}
{{- toYaml .Values.otel.metrics.telemetry.metrics.podMonitor.additionalLabels | nindent 4 }}
{{- end }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
selector:
matchLabels:
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/network/k8s-collector-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-network-k8s-collector-role") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-network-k8s-collector-role-binding") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/network/k8s-collector-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-network-k8s-collector") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
progressDeadlineSeconds: 600
replicas: 1
Expand All @@ -23,6 +25,7 @@ spec:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/network/configmap.yaml") . | sha256sum }}
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
spec:
nodeSelector:
kubernetes.io/os: linux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ metadata:
name: {{ include "common.fullname" (tuple . "-kernel-collector") }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | nindent 4 }}
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
selector:
matchLabels:
Expand All @@ -18,6 +20,7 @@ spec:
{{ include "common.pod-labels" . | indent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/network/configmap.yaml") . | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
spec:
terminationGracePeriodSeconds: 30
securityContext:
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/network/reducer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-network-k8s-reducer") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
replicas: 1
strategy:
Expand All @@ -20,6 +22,7 @@ spec:
{{ include "common.pod-labels" . | indent 8 }}
annotations:
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
spec:
nodeSelector:
kubernetes.io/os: linux
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/network/reducer-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "common.fullname" (tuple . "-network-k8s-reducer") }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
type: ClusterIP
selector:
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/node-collector-config-map-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}

data:
logs.config: |
{{ tpl (.Files.Get "node-collector-config.yaml") (merge . (dict "isWindows" 1)) | fromYaml | toYaml | indent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/node-collector-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
data:
logs.config: |
{{ tpl (.Files.Get "node-collector-config.yaml") . | fromYaml | toYaml | indent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/node-collector-daemon-set-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ metadata:
labels:
app.kubernetes.io/name: swo-k8s-collector
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
selector:
matchLabels:
Expand All @@ -22,6 +24,7 @@ spec:
checksum/config: {{ tpl (.Files.Get "node-collector-config-map-windows.yaml") . | sha256sum }}
checksum/config_common_env: {{ include (print $.Template.BasePath "/common-env-config-map.yaml") . | sha256sum }}
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
{{- if .Values.otel.logs.telemetry.metrics.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ (split ":" .Values.otel.logs.telemetry.metrics.address)._1 | quote }}
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/templates/node-collector-daemon-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ metadata:
labels:
app.kubernetes.io/name: swo-k8s-collector
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
selector:
matchLabels:
Expand All @@ -22,6 +24,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/node-collector-config-map.yaml") . | sha256sum }}
checksum/config_common_env: {{ include (print $.Template.BasePath "/common-env-config-map.yaml") . | sha256sum }}
checksum/values: {{ toJson .Values | sha256sum }}
{{ include "common.annotations" . | indent 8 }}
{{- if .Values.otel.logs.telemetry.metrics.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ (split ":" .Values.otel.logs.telemetry.metrics.address)._1 | quote }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/node-collector-pod-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ metadata:
{{- if .Values.otel.logs.telemetry.metrics.podMonitor.additionalLabels }}
{{- toYaml .Values.otel.logs.telemetry.metrics.podMonitor.additionalLabels | nindent 4 }}
{{- end }}
annotations:
{{ include "common.annotations" . | indent 4 }}
spec:
selector:
matchLabels:
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/templates/openshift/openshift-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "common.labels" . | indent 4 }}
annotations:
{{ include "common.annotations" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
Loading

0 comments on commit deaedd1

Please sign in to comment.