Skip to content

Conversation

@bmlyr
Copy link
Contributor

@bmlyr bmlyr commented Aug 18, 2025

Add PodDisruptionBudget support to Helm chart (https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
This PR should resolve #2345

Copy link
Contributor

@adutra adutra left a comment

Choose a reason for hiding this comment

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

Hi @bmlyr thank you for this contribution!

Do you mind running helm-docs --chart-search-root=helm and committing the result?

If you need to install helm-docs:

https://github.com/norwoodj/helm-docs

Thanks! 🙏

@adutra
Copy link
Contributor

adutra commented Aug 19, 2025

@bmlyr I think you need to rebase your PR, there is some strange compilation failure right now.

eric-maynard and others added 15 commits August 19, 2025 21:43
In apache#2369 Iceberg table federation was refactored around the new `IcebergRESTExternalCatalogFactory` type based on discussion in the community sync. This has unblocked the ability to federate to more non-Iceberg catalogs, such as in apache#2355. This PR refactors generic table federation to go through the same mechanism. After this, we can go through and implement generic table federation for the existing `IcebergRESTExternalCatalogFactory` implementations.
Classes with a `CallContext` field should call `getRealmConfig` once and store it as a field as well.
The idea is that long term we would want to stop relying on the `CallContext` itself but instead inject its individual items. Thus we also add `RealmConfig` to `TestServices`.
Updates S3Mock testcontainer dependency from 3.11.0 to 4.7.0 and refactors usage into a centralized wrapper class in runtime/test-common.

Changes

    Upgraded S3Mock testcontainer to 4.7.0
    Created S3Mock wrapper class for consistent configuration
    Consolidated S3 config properties generation
    Updated integration tests to use new wrapper

No functional changes to test behavior.
This change promotes `CatalogConfig` and `RestCatalogConfig` to top-level, public annotations and introduces a few "hooks" in `PolarisRestCatalogIntegrationBase` that can be overridden by subclasses.

This change is a preparatory work for apache#2280 (S3 remote signing).
similar to 7af85be we should prefer
the existing helper methods on the entity instead
- fixed dead link to catalog definition in Iceberg docs on Entities page
- removed single quotes from credential parameter in the cmdline example for connecting a local spark-sql: env variables need to be resolved in cmdline, they will not be resolved by spark-sql itself.
@bmlyr
Copy link
Contributor Author

bmlyr commented Aug 19, 2025

@adutra Might be better now

adutra
adutra previously approved these changes Aug 20, 2025
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.

app.kubernetes.io/instance: polaris-release

# validation tests
- it: should handle both minAvailable and maxUnavailable set (minAvailable takes precedence)
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be rather a pathological case imho, but OK to test it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Apparently, this would fail to apply:

one or more objects failed to apply, reason: PodDisruptionBudget.policy [...] is invalid: [...] minAvailable and maxUnavailable cannot be both set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we prevent the user from doing this? Maybe by selecting only minAvailable?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe? We can also fail hard e.g.

{{- if and .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable }}
{{- fail "podDisruptionBudget.minAvailable and podDisruptionBudget.maxUnavailable cannot be both set." -}}
{{- end }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a few changes to avoid that. Let me know if you prefer this version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, failing is a better option

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might be better now

Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice, thank you 👍

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Aug 20, 2025
@adutra adutra merged commit c5fd368 into apache:main Aug 20, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Aug 20, 2025
@adutra
Copy link
Contributor

adutra commented Aug 20, 2025

Thank you for your contribution @bmlyr !

snazy added a commit to snazy/polaris that referenced this pull request Nov 20, 2025
* feat: Add Pod Disruption Budget support to Helm chart (apache#2380)

* chore(deps): update quay.io/keycloak/keycloak docker tag to v26.3.3 (apache#2407)

* Mention Helm chart support for PodDisruptionBudget in CHANGELOG.md (apache#2408)

* chore: Suppress javac deprecation warnings in SparkCatalog (apache#2394)

SparkCatalog intentionally overrides and uses deprecated
methods from Spark's TableCatalog.

This PR adds suppression annotations to allow for clean
compilation given that the deprecated method calls and
overrides are clearly expected in this case.

* Python client auto generate (apache#2192)

* Python client auto generate

* Python client auto generate

* Python client auto generate

* Python client auto generate

* Python client auto generate

* Python client auto generate

* Remove auto generated doc

* undo

* Fix doc

* Fix docker ref from CONTAINER_TOOL to DOCKER

* Add client help manual to GH action

* Add missing region to MinIO getting-started example (apache#2411)

The example was missing an AWS region, thus causing Spark to fail with:

```
spark-sql ()> create table ns.t1 as select 'abc';
25/08/20 16:25:06 ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0)
software.amazon.awssdk.core.exception.SdkClientException: Unable to load region from any of the providers in the chain software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain@47578c86: [software.amazon.awssdk.regions.providers.SystemSettingsRegionProvider@1656f847: Unable to load region from system settings. Region must be specified either via environment variable (AWS_REGION) or  system property (aws.region)., software.amazon.awssdk.regions.providers.AwsProfileRegionProvider@2bbaabe3: No region provided in profile: default, software.amazon.awssdk.regions.providers.InstanceProfileRegionProvider@54b1cfd8: Unable to contact EC2 metadata service.]
...
        at org.apache.iceberg.aws.AwsClientFactories$DefaultAwsClientFactory.s3(AwsClientFactories.java:119)
        at org.apache.iceberg.aws.s3.S3FileIO.client(S3FileIO.java:391)
        at org.apache.iceberg.aws.s3.S3FileIO.newOutputFile(S3FileIO.java:193)
```

* Add feature config to allow dropping views without purging (apache#2369)

* Add feature config to allow dropping views without purging

With tables, the client can decide whether to purge the table
on drop or not. However, Polaris Servers used to unconditionally
perform the purge on dropping a view.

After apache#1619 that behaviour effectively prevents dropping views
if the admin user does not set `DROP_WITH_PURGE_ENABLED`. The
latter, though, is not currently advisable per apache#1617.

This change introduces a new feature configuration
(`PURGE_VIEWS_ON_DROP`) that allows the admin user to instruct
Polaris servers to drop views without purging to achieve
operational parity with tables.

Fixes apache#2367

* review: rename to PURGE_VIEW_METADATA_ON_DROP

* review: re-fix description

* Last merged commit c97b150

---------

Co-authored-by: Bryan Maloyer <bryan.mlyr@gmail.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Alexandre Dutra <adutra@apache.org>
Co-authored-by: Dmitri Bourlatchkov <dmitri.bourlatchkov@gmail.com>
Co-authored-by: Yong Zheng <yongzheng0809@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helm chart should support provision of PodDisruptionBudged

8 participants