Skip to content

Commit d4128ec

Browse files
px-kesavankravichandran-pxykumari-pxayush-pxAyush Sharma
authored
Release px-central 2.11.0 chart (#874)
* Added initial changes required for 2.11.0-staging Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> * Updated the tar bundle Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> * Upgrade Keycloak to 26.4.7 (#833) * Fixing mongodb repo in pre-upgrade hook spec * PB-13384 | PB-13194: Moving mongodb out of bitnami and moving script cm creation to hooks * Updating tar ball and repo index * Pb-13325 | migration from bitnami to official postgres (#839) PB-13325 | upgrading to official postgres-18 --------- Co-authored-by: Ayush Sharma <aysharma@purestorage.com> * PB-13257|PB-13260|PB-13261|PB-13262|PB-13263: Updating alertmanager and all prometheus images to fix CVEs * Updating tar ball and repo index * Updated the tar ball Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> * PB-12294 | Add app.kubernetes.io/part-of=px-backup label to all Helm resources (#843) * PB-12294 | Tagging resources with label app.kubernetes.io/part-of * updated the tar ball and repo index updated the tar ball and repo index * PB-13860 | PB-13859 | PB-13858 | PB-13857 | PB-13864: Updating mongodb, alertmanager and prometheus packages to fix high CVEs * Updating tar ball and index * Pb 13866 | mysql upgrade to 8.0.44 (#850) * PB-13866 | bumping mysql version --------- Co-authored-by: Ayush Sharma <aysharma@purestorage.com> * PB-13983 | fix statefulset upgrades and make part-of conditional (#851) - Add app.kubernetes.io/part-of label only when pxbackup.enabled=true - Remove labels from StatefulSet volumeClaimTemplates Co-authored-by: Bhanuchandra K <bk+pure@purestorage.com> * Updated the tar ball Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> * PB-13931: new metrics exclusion | external metrics pxb prometheus will not be consuming these metrics, so they are ignored using service monitor * PB-14400: service monitor enabled for BYOP | Metrics * Added changes for 2.11.0 dev Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> * Bundle changes Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> * Release px-central 2.11.0 chart Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> --------- Signed-off-by: Kesavan Thiruvenkadasamy <kthiruvenkadasamy@purestorage.com> Co-authored-by: Kalaikovan Ravichandran <127825117+kravichandran-px@users.noreply.github.com> Co-authored-by: ykumari-px <ykumari@purestorage.com> Co-authored-by: Ayush Sharma <83945775+ayush-px@users.noreply.github.com> Co-authored-by: Ayush Sharma <aysharma@purestorage.com> Co-authored-by: bk-px <bk@purestorage.com> Co-authored-by: Bhanuchandra K <bk+pure@purestorage.com> Co-authored-by: Nidhin Thomas <nthomas@purestorage.com>
1 parent 09aa90a commit d4128ec

20 files changed

+307
-174
lines changed

charts/px-central/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ keywords:
1313
name: px-central
1414
sources:
1515
- https://github.com/portworx/helm/tree/master/charts/px-central
16-
version: 2.10.2
17-
appVersion: 2.10.2
16+
version: 2.11.0
17+
appVersion: 2.11.0
1818
name: px-central

charts/px-central/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ app.kubernetes.io/instance: {{.Release.Name | quote }}
3939
app.kubernetes.io/managed-by: {{.Release.Service | quote }}
4040
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
4141
app.kubernetes.io/version: {{ .Chart.Version | quote }}
42+
{{- if .Values.pxbackup.enabled }}
43+
app.kubernetes.io/part-of: px-backup
44+
{{- end }}
4245
{{- end }}
4346

47+
{{/*
48+
Part-of label for nested templates
49+
*/}}
50+
{{- define "px-central.partOfLabel" -}}
51+
{{- if .Values.pxbackup.enabled }}
52+
app.kubernetes.io/part-of: px-backup
53+
{{- end }}
54+
{{- end }}
4455

4556
{{/*
4657
Selector labels

charts/px-central/templates/px-backup/pre-install-hook/pre-install-check.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ metadata:
1919
labels:
2020
name: pxcentral-pre-install-hook
2121
app.kubernetes.io/component: pxcentral-pre-install-hook
22+
{{- include "px-central.partOfLabel" . | nindent 4 }}
2223
rules:
2324
- apiGroups: ["apps"]
2425
resources: ["statefulsets"]
@@ -78,6 +79,7 @@ metadata:
7879
labels:
7980
name: pxcentral-pre-install-hook
8081
app.kubernetes.io/component: pxcentral-pre-install-hook
82+
{{- include "px-central.partOfLabel" . | nindent 4 }}
8183
subjects:
8284
- kind: ServiceAccount
8385
name: default
@@ -95,6 +97,7 @@ metadata:
9597
labels:
9698
name: pxcentral-pre-install-hook
9799
app.kubernetes.io/component: pxcentral-pre-install-hook
100+
{{- include "px-central.partOfLabel" . | nindent 4 }}
98101
annotations:
99102
"helm.sh/hook": pre-install
100103
{{- if .Values.isArgoCD }}
@@ -121,6 +124,7 @@ metadata:
121124
labels:
122125
name: pxcentral-pre-install-hook
123126
app.kubernetes.io/component: pxcentral-pre-install-hook
127+
{{- include "px-central.partOfLabel" . | nindent 4 }}
124128
annotations:
125129
"helm.sh/hook": pre-install
126130
"helm.sh/hook-weight": "6"
@@ -248,6 +252,7 @@ metadata:
248252
labels:
249253
name: pxcentral-preflight-check-hook
250254
app.kubernetes.io/component: pxcentral-preflight-check-hook
255+
{{- include "px-central.partOfLabel" . | nindent 4 }}
251256
annotations:
252257
"helm.sh/hook": pre-install,pre-upgrade
253258
"helm.sh/hook-weight": "4"
@@ -356,6 +361,7 @@ metadata:
356361
labels:
357362
name: pxcentral-pre-setup-hook
358363
app.kubernetes.io/component: pxcentral-pre-setup-hook
364+
{{- include "px-central.partOfLabel" . | nindent 4 }}
359365
rules:
360366
- apiGroups: [ "storage.k8s.io" ]
361367
resources: [ "storageclasses" ]
@@ -375,6 +381,7 @@ metadata:
375381
labels:
376382
name: pxcentral-pre-setup-hook
377383
app.kubernetes.io/component: pxcentral-pre-setup-hook
384+
{{- include "px-central.partOfLabel" . | nindent 4 }}
378385
subjects:
379386
- kind: ServiceAccount
380387
name: default

charts/px-central/templates/px-backup/pre-rollback-hook/pre-rollback-check.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
labels:
1010
name: pxcentral-pre-install-hook
1111
app.kubernetes.io/component: pxcentral-pre-install-hook
12+
{{- include "px-central.partOfLabel" . | nindent 4 }}
1213
annotations:
1314
"helm.sh/hook": pre-rollback
1415
"helm.sh/hook-delete-policy": hook-succeeded

charts/px-central/templates/px-backup/pre-upgrade-hook/pre-upgrade-check.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ metadata:
4343
labels:
4444
name: pxcentral-pre-upgrade-hook
4545
app.kubernetes.io/component: pxcentral-pre-upgrade-hook
46+
{{- include "px-central.partOfLabel" . | nindent 4 }}
4647
rules:
4748
- apiGroups: ["apps"]
4849
resources: ["statefulsets"]
@@ -101,6 +102,7 @@ metadata:
101102
labels:
102103
name: pxcentral-pre-upgrade-hook
103104
app.kubernetes.io/component: pxcentral-pre-upgrade-hook
105+
{{- include "px-central.partOfLabel" . | nindent 4 }}
104106
subjects:
105107
- kind: ServiceAccount
106108
name: default
@@ -118,6 +120,7 @@ metadata:
118120
labels:
119121
name: pxcentral-pre-upgrade-hook
120122
app.kubernetes.io/component: pxcentral-pre-upgrade-hook
123+
{{- include "px-central.partOfLabel" . | nindent 4 }}
121124
annotations:
122125
"helm.sh/hook": pre-upgrade
123126
{{- if .Values.isArgoCD }}
@@ -144,6 +147,7 @@ metadata:
144147
labels:
145148
name: pxcentral-pre-upgrade-hook
146149
app.kubernetes.io/component: pxcentral-pre-upgrade-hook
150+
{{- include "px-central.partOfLabel" . | nindent 4 }}
147151
annotations:
148152
"helm.sh/hook": pre-upgrade
149153
"helm.sh/hook-weight": "6"
@@ -254,7 +258,7 @@ spec:
254258
- name: POSTGRES_DB
255259
value: "keycloak"
256260
- name: POSTGRES_PVC_NAME
257-
value: pxcentral-keycloak-data-postgres17
261+
value: pxcentral-keycloak-data-postgres18
258262
- name: JOB_TIMEOUT_SECONDS
259263
value: "600"
260264
- name: PX_BACKUP_ENABLED

charts/px-central/templates/px-backup/pxcentral-alertmanager.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ kind: Alertmanager
99
metadata:
1010
name: px-backup-alertmanager
1111
namespace: {{ .Release.Namespace }}
12+
labels:
13+
{{- include "px-central.partOfLabel" . | nindent 4 }}
1214
spec:
1315
affinity:
1416
nodeAffinity:
@@ -25,11 +27,13 @@ spec:
2527
- "false"
2628
{{- end }}
2729
configSecret: px-backup-alertmanager-custom-config
28-
{{- if and (eq $azureProxyEnabled true) (not (has "px-backup-alertmanager" .Values.proxy.excludeAzureProxyList)) }}
2930
podMetadata:
31+
{{- if and (eq $azureProxyEnabled true) (not (has "px-backup-alertmanager" .Values.proxy.excludeAzureProxyList)) }}
3032
annotations:
3133
kubernetes.azure.com/no-http-proxy-vars: "true"
32-
{{- end }}
34+
{{- end }}
35+
labels:
36+
{{- include "px-central.partOfLabel" . | nindent 6 }}
3337
alertmanagerConfigSelector:
3438
matchLabels:
3539
app: px-backup-alert-configs
@@ -157,6 +161,9 @@ spec:
157161
{{- if .Values.persistentStorage.storageClassName }}
158162
storage:
159163
volumeClaimTemplate:
164+
metadata:
165+
labels:
166+
{{- include "px-central.partOfLabel" . | nindent 10 }}
160167
spec:
161168
storageClassName: {{ .Values.persistentStorage.storageClassName }}
162169
resources:
@@ -174,6 +181,8 @@ kind: Secret
174181
metadata:
175182
name: px-backup-alertmanager-custom-config
176183
namespace: {{ .Release.Namespace }}
184+
labels:
185+
{{- include "px-central.partOfLabel" . | nindent 4 }}
177186
type: Opaque
178187
stringData:
179188
alertmanager.yaml: |

charts/px-central/templates/px-backup/pxcentral-backup.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ spec:
186186
metadata:
187187
labels:
188188
app: px-backup
189+
{{- include "px-central.partOfLabel" . | nindent 8 }}
189190
{{- if and (eq $azureProxyEnabled true) (not (has "px-backup" .Values.proxy.excludeAzureProxyList)) }}
190191
annotations:
191192
kubernetes.azure.com/no-http-proxy-vars: "true"

charts/px-central/templates/px-backup/pxcentral-mongodb.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ spec:
6666
app.kubernetes.io/instance: {{.Release.Name }}
6767
app.kubernetes.io/managed-by: {{.Release.Service }}
6868
app.kubernetes.io/component: pxc-backup-mongodb
69+
{{- include "px-central.partOfLabel" . | nindent 8 }}
6970
spec:
7071
affinity:
7172
nodeAffinity:

charts/px-central/templates/px-backup/pxcentral-prometheus.yaml

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ spec:
133133
metadata:
134134
labels:
135135
k8s-app: prometheus-operator
136+
{{- include "px-central.partOfLabel" . | nindent 8 }}
136137
{{- if and (eq $azureProxyEnabled true) (not (has "prometheus-operator" .Values.proxy.excludeAzureProxyList)) }}
137138
annotations:
138139
kubernetes.azure.com/no-http-proxy-vars: "true"
@@ -287,6 +288,8 @@ kind: Prometheus
287288
metadata:
288289
name: px-backup-dashboard-prometheus
289290
namespace: {{ .Release.Namespace }}
291+
labels:
292+
{{- include "px-central.partOfLabel" . | nindent 5 }}
290293
spec:
291294
affinity:
292295
nodeAffinity:
@@ -305,8 +308,8 @@ spec:
305308
additionalAlertManagerConfigs:
306309
key: am-configs.yaml
307310
name: pxc-backup-metrics
308-
{{- if or $hasAzureAnnotation $hasIstioAnnotation }}
309311
podMetadata:
312+
{{- if or $hasAzureAnnotation $hasIstioAnnotation }}
310313
annotations:
311314
{{- if $hasAzureAnnotation }}
312315
kubernetes.azure.com/no-http-proxy-vars: "true"
@@ -318,10 +321,15 @@ spec:
318321
sidecar.istio.io/userVolumeMount: '[{"name": "istio-certs", "mountPath": "/etc/istio-output-certs"}]'
319322
traffic.sidecar.istio.io/includeOutboundIPRanges: ""
320323
{{- end}}
321-
{{- end}}
324+
{{- end }}
325+
labels:
326+
{{- include "px-central.partOfLabel" . | nindent 6 }}
322327
{{- if .Values.persistentStorage.storageClassName }}
323328
storage:
324329
volumeClaimTemplate:
330+
metadata:
331+
labels:
332+
{{- include "px-central.partOfLabel" . | nindent 10 }}
325333
spec:
326334
storageClassName: {{ .Values.persistentStorage.storageClassName }}
327335
resources:
@@ -498,7 +506,7 @@ spec:
498506

499507
---
500508
# ServiceMonitor for px-backup's dedicated Prometheus dashboard
501-
# Only created when dedicated monitoring system is enabled
509+
# Created when dedicated monitoring system is enabled (deployDedicatedMonitoringSystem=true)
502510
# Includes metric drops to optimize for dashboard use
503511
apiVersion: monitoring.coreos.com/v1
504512
kind: ServiceMonitor
@@ -527,11 +535,11 @@ spec:
527535
sourceLabels:
528536
- __name__
529537
- action: drop
530-
regex: (pxbackup_backup_duration_seconds|pxbackup_backup_resource_count|pxbackup_backup_schedule_status|pxbackup_backup_size_bytes|pxbackup_backup_volume_count|pxbackup_backuplocation_metrics|pxbackup_cloudcred_metrics|pxbackup_schedpolicy_metrics|pxbackup_restore_duration_seconds|pxbackup_restore_resource_count|pxbackup_restore_size_bytes|pxbackup_restore_volume_count|pxbackup_backup_object_info|pxbackup_backup_volume_info|pxbackup_virtual_machine_info|pxbackup_virtual_machine_resource_info)
538+
regex: (pxbackup_backup_duration_seconds|pxbackup_backup_resource_count|pxbackup_backup_schedule_status|pxbackup_backup_size_bytes|pxbackup_backup_volume_count|pxbackup_backuplocation_metrics|pxbackup_cloudcred_metrics|pxbackup_schedpolicy_metrics|pxbackup_restore_duration_seconds|pxbackup_restore_resource_count|pxbackup_restore_size_bytes|pxbackup_restore_volume_count|pxbackup_backup_object_info|pxbackup_backup_volume_info|pxbackup_virtual_machine_info|pxbackup_virtual_machine_resource_info|pxbackup_namespace_resource_type_info|pxbackup_namespace_resource_info)
531539
sourceLabels:
532540
- __name__
533541
port: http-rest-api
534-
{{- if and .Values.istio.enabled (eq $deployDedicatedMonitoringSystem true) }}
542+
{{- if .Values.istio.enabled }}
535543
scheme: https
536544
tlsConfig:
537545
caFile: /etc/prom-certs/root-cert.pem
@@ -545,14 +553,66 @@ spec:
545553
selector:
546554
matchLabels:
547555
app: px-backup
556+
{{- else if eq $enableExternalMetricsScraping false }}
557+
---
558+
# ServiceMonitor for px-backup's dashboard Prometheus or external monitoring
559+
# Created when dedicated monitoring is disabled AND external scraping is disabled
560+
# This handles the case: deployDedicatedMonitoringSystem=false, enableExternalMetricsScraping=false
561+
# Allows external Prometheus to discover and scrape px-backup metrics
562+
apiVersion: monitoring.coreos.com/v1
563+
kind: ServiceMonitor
564+
metadata:
565+
namespace: {{ .Release.Namespace }}
566+
name: px-backup-dashboard-prometheus-sm
567+
labels:
568+
name: px-backup-dashboard-prometheus-sm
569+
app.kubernetes.io/component: px-backup
570+
{{- include "px-central.labels" . | nindent 4 }}
571+
spec:
572+
endpoints:
573+
- metricRelabelings:
574+
- action: labeldrop
575+
regex: (instance|pod)
576+
- action: drop
577+
regex: process_.*
578+
sourceLabels:
579+
- __name__
580+
- action: drop
581+
regex: go_.*
582+
sourceLabels:
583+
- __name__
584+
- action: drop
585+
regex: grpc_.*
586+
sourceLabels:
587+
- __name__
588+
- action: drop
589+
regex: (pxbackup_backup_duration_seconds|pxbackup_backup_resource_count|pxbackup_backup_schedule_status|pxbackup_backup_size_bytes|pxbackup_backup_volume_count|pxbackup_backuplocation_metrics|pxbackup_cloudcred_metrics|pxbackup_schedpolicy_metrics|pxbackup_restore_duration_seconds|pxbackup_restore_resource_count|pxbackup_restore_size_bytes|pxbackup_restore_volume_count|pxbackup_backup_object_info|pxbackup_backup_volume_info|pxbackup_virtual_machine_info|pxbackup_virtual_machine_resource_info|pxbackup_namespace_resource_type_info|pxbackup_namespace_resource_info)
590+
sourceLabels:
591+
- __name__
592+
port: http-rest-api
593+
{{- if .Values.istio.enabled }}
594+
scheme: https
595+
tlsConfig:
596+
caFile: /etc/istio-output-certs/root-cert.pem
597+
certFile: /etc/istio-output-certs/cert-chain.pem
598+
insecureSkipVerify: true
599+
keyFile: /etc/istio-output-certs/key.pem
600+
{{- end }}
601+
targetPort: 10001
602+
namespaceSelector:
603+
any: true
604+
selector:
605+
matchLabels:
606+
app: px-backup
548607
{{- end}}
549608

550-
{{- if $enableExternalMetricsScraping }}
609+
{{- if eq $enableExternalMetricsScraping true }}
551610
---
552611
# ServiceMonitor for external monitoring systems (e.g., central monitoring namespace)
553612
# Drops noisy metrics (process/go/grpc) and legacy pxbackup metrics
554613
# But KEEPS detailed metrics for comprehensive monitoring
555614
# External Prometheus should select this using label: prometheus=external-monitoring
615+
# Can coexist with px-backup-dashboard-prometheus-sm when both monitoring systems are enabled
556616
apiVersion: monitoring.coreos.com/v1
557617
kind: ServiceMonitor
558618
metadata:
@@ -610,6 +670,7 @@ kind: PrometheusRule
610670
metadata:
611671
labels:
612672
app: px-backup-alerts
673+
{{- include "px-central.partOfLabel" . | nindent 4 }}
613674
name: px-backup-dashboard-prometheus-rules
614675
spec:
615676
groups:

charts/px-central/templates/px-backup/service-mesh/pxcentral-istio.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ metadata:
99
annotations:
1010
"helm.sh/hook": pre-install,pre-upgrade
1111
"helm.sh/hook-weight": "0"
12+
labels:
13+
{{- include "px-central.partOfLabel" . | nindent 4 }}
1214
spec:
1315
selector:
1416
istio: ingressgateway
@@ -28,6 +30,8 @@ metadata:
2830
annotations:
2931
"helm.sh/hook": pre-install,pre-upgrade
3032
"helm.sh/hook-weight": "0"
33+
labels:
34+
{{- include "px-central.partOfLabel" . | nindent 4 }}
3135
spec:
3236
mtls:
3337
mode: STRICT
@@ -40,6 +44,8 @@ metadata:
4044
annotations:
4145
"helm.sh/hook": pre-install,pre-upgrade
4246
"helm.sh/hook-weight": "0"
47+
labels:
48+
{{- include "px-central.partOfLabel" . | nindent 4 }}
4349
spec:
4450
gateways:
4551
- pxcentral-gateway
@@ -61,6 +67,8 @@ kind: PeerAuthentication
6167
metadata:
6268
name: allow-external-prometheus-scrape
6369
namespace: {{ .Release.Namespace }}
70+
labels:
71+
{{- include "px-central.partOfLabel" . | nindent 4 }}
6472
spec:
6573
selector:
6674
matchLabels:

0 commit comments

Comments
 (0)