Skip to content

[charts/metabase] Allow external managed HPA#183

Merged
pmint93 merged 1 commit into
pmint93:masterfrom
dumitraand:ad/create-hpa-on-demand
May 21, 2026
Merged

[charts/metabase] Allow external managed HPA#183
pmint93 merged 1 commit into
pmint93:masterfrom
dumitraand:ad/create-hpa-on-demand

Conversation

@dumitraand

@dumitraand dumitraand commented May 19, 2026

Copy link
Copy Markdown
Contributor

Purpose

Allow external HPA controllers (e.g., KEDA) to manage autoscaling for Metabase.

When hpa.external: true, the chart skips creating its own HorizontalPodAutoscaler, avoiding conflicts with external autoscalers while still allowing users to set hpa.enabled: true for any related configuration.

Changes

  • Add hpa.external flag (default: false for backward compatibility)
  • HPA resource is only created when hpa.enabled=true AND hpa.external=false

Testing

# Test 1: HPA disabled (default) - should NOT create HPA
$ helm template test charts/metabase --set hpa.enabled=false | grep "kind: HorizontalPodAutoscaler"
# (no output - correct)

# Test 2: HPA enabled, external=false - should create HPA
$ helm template test charts/metabase --set hpa.enabled=true,hpa.external=false | grep -A5 "kind: HorizontalPodAutoscaler"
kind: HorizontalPodAutoscaler
metadata:
  name: test-metabase
spec:
  scaleTargetRef:
    apiVersion: apps/v1

# Test 3: HPA enabled, hpa.external not passed - should create HPA
$ helm template test charts/metabase --set hpa.enabled=true | grep -A5 "kind: HorizontalPodAutoscaler"
kind: HorizontalPodAutoscaler
metadata:
  name: test-metabase
spec:
  scaleTargetRef:
    apiVersion: apps/v1
   
# Test 4: HPA enabled, external=true - should NOT create HPA (for KEDA etc.)
$ helm template test charts/metabase --set hpa.enabled=true,hpa.external=true | grep "kind: HorizontalPodAutoscaler"
# (no output - correct)

This demonstrates backward compatibility and the new external HPA behavior (test 3).

@pmint93 pmint93 merged commit a008d26 into pmint93:master May 21, 2026
1 check passed
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.

2 participants