Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2d8eebc
feat: Add Pod Disruption Budget configuration to Helm chart
bmlyr Aug 18, 2025
e7252f2
fix: Add missing newline at end of poddisruptionbudget.yaml
bmlyr Aug 18, 2025
a6d8916
feat: Add unit tests for Pod Disruption Budget configuration
bmlyr Aug 18, 2025
3c70a81
Modularize generic table federation (#2379)
eric-maynard Aug 18, 2025
93788ec
Update community meeting dates (#2382)
jbonofre Aug 19, 2025
31de2e3
Reduce getRealmConfig calls (#2337)
XN137 Aug 19, 2025
0de2204
Python client: make S3 role-ARN optional and add missing endpoint-int…
snazy Aug 19, 2025
d25393c
fix(deps): update dependency io.prometheus:prometheus-metrics-exporte…
renovate-bot Aug 19, 2025
5580e31
chore(deps): bump s3mock from 3.11.0 to 4.7.0 (#2375)
Aug 19, 2025
0f7c8b9
Nit: extract getResolvedCatalogEntity method in IcebergCatalogHandler…
adutra Aug 19, 2025
b083b49
Nit: remove transitive dependencies from runtime/server/build.gradle.…
adutra Aug 19, 2025
b0fa74b
Nit: add methods isExternal and isStaticFacade to CatalogEntity (#2386)
adutra Aug 19, 2025
dd81355
Minor refactor of integration test classes (#2384)
adutra Aug 19, 2025
923ef45
Remove BaseMetaStoreManager.serializeProperties (#2374)
XN137 Aug 19, 2025
4e3f79d
fix: minor corrections of documentation (#2397)
olsoloviov Aug 19, 2025
37e678e
Merge branch 'apache:main' into helm-pdb
bmlyr Aug 19, 2025
89c2c3f
fix: Update maxUnavailable value to allow for undefined configuration
bmlyr Aug 19, 2025
9943594
feat: Add pod disruption budget configuration to README with helm-docs
bmlyr Aug 19, 2025
e4da1db
fix: Add missing newline at end of poddisruptionbudget_test.yaml
bmlyr Aug 19, 2025
fe4aa04
fix: Remove redundant test cases for default maxUnavailable in poddis…
bmlyr Aug 20, 2025
6b1cb4b
fix: Update pod disruption budget logic to prevent simultaneous use o…
bmlyr Aug 20, 2025
c348bf0
fix: Prevent simultaneous use of minAvailable and maxUnavailable in p…
bmlyr Aug 20, 2025
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
5 changes: 5 additions & 0 deletions helm/polaris/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ ct install --namespace polaris --charts ./helm/polaris
| persistence.relationalJdbc.secret.username | string | `"username"` | The secret key holding the database username for authentication |
| persistence.type | string | `"in-memory"` | The type of persistence to use. Two built-in types are supported: in-memory and relational-jdbc. The eclipse-link type is also supported but is deprecated. |
| podAnnotations | object | `{}` | Annotations to apply to polaris pods. |
| podDisruptionBudget | object | `{"annotations":{},"enabled":false,"maxUnavailable":null,"minAvailable":null}` | Pod disruption budget settings. |
| podDisruptionBudget.annotations | object | `{}` | Annotations to add to the pod disruption budget. |
| podDisruptionBudget.enabled | bool | `false` | Specifies whether a pod disruption budget should be created. |
| podDisruptionBudget.maxUnavailable | string | `nil` | The maximum number of pods that can be unavailable during disruptions. Can be an absolute number (ex: 5) or a percentage of desired pods (ex: 50%). IMPORTANT: Cannot be used simultaneously with minAvailable. |
| podDisruptionBudget.minAvailable | string | `nil` | The minimum number of pods that should remain available during disruptions. Can be an absolute number (ex: 5) or a percentage of desired pods (ex: 50%). IMPORTANT: Cannot be used simultaneously with maxUnavailable. |
| podLabels | object | `{}` | Additional Labels to apply to polaris pods. |
| podSecurityContext | object | `{"fsGroup":10001,"seccompProfile":{"type":"RuntimeDefault"}}` | Security context for the polaris pod. See https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. |
| podSecurityContext.fsGroup | int | `10001` | GID 10001 is compatible with Polaris OSS default images; change this if you are using a different image. |
Expand Down
45 changes: 45 additions & 0 deletions helm/polaris/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/}}

{{- if .Values.podDisruptionBudget.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "polaris.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "polaris.labels" . | nindent 4 }}
{{- if .Values.podDisruptionBudget.annotations }}
annotations:
{{- tpl (toYaml .Values.podDisruptionBudget.annotations) . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable }}
{{- fail "podDisruptionBudget.minAvailable and podDisruptionBudget.maxUnavailable cannot be both set." -}}
{{- end }}
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "polaris.selectorLabels" . | nindent 6 }}
{{- end }}
210 changes: 210 additions & 0 deletions helm/polaris/tests/poddisruptionbudget_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

chart:
version: 1.2.3
appVersion: 4.5.6

release:
name: polaris-release
namespace: polaris-ns

templates:
- poddisruptionbudget.yaml

tests:

# kind
- it: should not create PDB by default
asserts:
- containsDocument:
kind: PodDisruptionBudget
apiVersion: policy/v1
not: true
- it: should create PDB when enabled
set:
podDisruptionBudget.enabled: true
asserts:
- containsDocument:
kind: PodDisruptionBudget
apiVersion: policy/v1

# metadata.name (with PDB enabled)
- it: should set PDB name
set:
podDisruptionBudget.enabled: true
asserts:
- equal:
path: metadata.name
value: polaris-release
- it: should set PDB name with override
set:
podDisruptionBudget.enabled: true
nameOverride: polaris-override
asserts:
- equal:
path: metadata.name
value: polaris-release-polaris-override
- it: should set PDB name with full override
set:
podDisruptionBudget.enabled: true
fullnameOverride: polaris-override
asserts:
- equal:
path: metadata.name
value: polaris-override

# metadata.namespace (with PDB enabled)
- it: should set PDB namespace
set:
podDisruptionBudget.enabled: true
asserts:
- equal:
path: metadata.namespace
value: polaris-ns

# metadata.labels (with PDB enabled)
- it: should set PDB default labels
set:
podDisruptionBudget.enabled: true
asserts:
- isSubset:
path: metadata.labels
content:
app.kubernetes.io/name: polaris
app.kubernetes.io/instance: polaris-release
app.kubernetes.io/version: 4.5.6
app.kubernetes.io/managed-by: Helm
helm.sh/chart: polaris-1.2.3

# metadata.annotations (with PDB enabled)
- it: should not set annotations by default
set:
podDisruptionBudget.enabled: true
asserts:
- isNull:
path: metadata.annotations
- it: should set custom annotations
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.annotations:
example.com/policy: "critical"
kubernetes.io/description: "PDB for Polaris"
asserts:
- equal:
path: metadata.annotations
value:
example.com/policy: "critical"
kubernetes.io/description: "PDB for Polaris"
- it: should template annotations
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.annotations:
app.example.com/release: "{{ .Release.Name }}"
asserts:
- equal:
path: metadata.annotations
value:
app.example.com/release: "polaris-release"

- it: should set custom maxUnavailable
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.maxUnavailable: 2
asserts:
- equal:
path: spec.maxUnavailable
value: 2
- isNull:
path: spec.minAvailable
- it: should set maxUnavailable percentage
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.maxUnavailable: "50%"
asserts:
- equal:
path: spec.maxUnavailable
value: "50%"
- isNull:
path: spec.minAvailable

# spec.minAvailable
- it: should set minAvailable and unset maxUnavailable
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.minAvailable: 2
podDisruptionBudget.maxUnavailable: null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicitly unsetting this is not necessary anymore, but it doesn't hurt to keep this line either.

asserts:
- equal:
path: spec.minAvailable
value: 2
- isNull:
path: spec.maxUnavailable
- it: should set minAvailable percentage
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.minAvailable: "75%"
podDisruptionBudget.maxUnavailable: null
asserts:
- equal:
path: spec.minAvailable
value: "75%"
- isNull:
path: spec.maxUnavailable

# spec.selector.matchLabels
- it: should set selector labels to match deployment
set:
podDisruptionBudget.enabled: true
asserts:
- equal:
path: spec.selector.matchLabels
value:
app.kubernetes.io/name: polaris
app.kubernetes.io/instance: polaris-release
- it: should set selector labels with name override
set:
podDisruptionBudget.enabled: true
nameOverride: polaris-override
asserts:
- equal:
path: spec.selector.matchLabels
value:
app.kubernetes.io/name: polaris-override
app.kubernetes.io/instance: polaris-release
- it: should set selector labels with full name override
set:
podDisruptionBudget.enabled: true
fullnameOverride: polaris-override
asserts:
- equal:
path: spec.selector.matchLabels
value:
app.kubernetes.io/name: polaris
app.kubernetes.io/instance: polaris-release

# validation tests
- it: should fail when both minAvailable and maxUnavailable are set
set:
podDisruptionBudget.enabled: true
podDisruptionBudget.minAvailable: 1
podDisruptionBudget.maxUnavailable: 1
asserts:
- failedTemplate:
errorMessage: "podDisruptionBudget.minAvailable and podDisruptionBudget.maxUnavailable cannot be both set."
15 changes: 15 additions & 0 deletions helm/polaris/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ podLabels: {}
# -- Additional Labels to apply to polaris configmap.
configMapLabels: {}

# -- Pod disruption budget settings.
podDisruptionBudget:
# -- Specifies whether a pod disruption budget should be created.
enabled: false
# -- The minimum number of pods that should remain available during disruptions.
# Can be an absolute number (ex: 5) or a percentage of desired pods (ex: 50%).
# IMPORTANT: Cannot be used simultaneously with maxUnavailable.
minAvailable: ~
# -- The maximum number of pods that can be unavailable during disruptions.
# Can be an absolute number (ex: 5) or a percentage of desired pods (ex: 50%).
# IMPORTANT: Cannot be used simultaneously with minAvailable.
maxUnavailable: ~
# -- Annotations to add to the pod disruption budget.
annotations: {}

# -- The number of old ReplicaSets to retain to allow rollback (if not set, the default Kubernetes value is set to 10).
revisionHistoryLimit: ~

Expand Down