Skip to content

Commit d90e898

Browse files
authored
feat(connect): add namespaceOverride (#1713)
1 parent cbc70f8 commit d90e898

File tree

12 files changed

+25
-1
lines changed

12 files changed

+25
-1
lines changed

charts/connect/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,12 @@ Additional init containers to add to the Deployment.
392392

393393
**Default:** `""`
394394

395+
### [namespaceOverride](https://artifacthub.io/packages/helm/redpanda-data/connect?modal=values&path=namespaceOverride)
396+
397+
Namespace to deploy Redpanda Connect into. By default, uses the namespace of the Helm release.
398+
399+
**Default:** `""`
400+
395401
### [nodeSelector](https://artifacthub.io/packages/helm/redpanda-data/connect?modal=values&path=nodeSelector)
396402

397403
Node selector for scheduling Pods.

charts/connect/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Expand the name of the chart.
55
{{- default "redpanda-connect" .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

8+
{{/*
9+
Expand the namespace the chart is deployed into.
10+
*/}}
11+
{{- define "redpanda-connect.namespace" -}}
12+
{{- default .Release.Namespace .Values.namespaceOverride }}
13+
{{- end }}
14+
815
{{/*
916
Create a default fully qualified app name.
1017
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).

charts/connect/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: ConfigMap
33
metadata:
44
name: {{ template "redpanda-connect.fullname" . }}-config
5-
namespace: {{ .Release.Namespace }}
5+
namespace: {{ include "redpanda-connect.namespace" . }}
66
labels:
77
{{- include "redpanda-connect.labels" . | nindent 4 }}
88
data:

charts/connect/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: {{ include "redpanda-connect.fullname" . }}
5+
namespace: {{ include "redpanda-connect.namespace" . }}
56
labels:
67
{{- include "redpanda-connect.labels" . | nindent 4 }}
78
annotations:

charts/connect/templates/hpa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: autoscaling/v2
33
kind: HorizontalPodAutoscaler
44
metadata:
55
name: {{ include "redpanda-connect.fullname" . }}
6+
namespace: {{ include "redpanda-connect.namespace" . }}
67
labels:
78
{{- include "redpanda-connect.labels" . | nindent 4 }}
89
spec:

charts/connect/templates/ingress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ apiVersion: extensions/v1beta1
1616
kind: Ingress
1717
metadata:
1818
name: {{ $fullName }}
19+
namespace: {{ include "redpanda-connect.namespace" . }}
1920
labels:
2021
{{- include "redpanda-connect.labels" . | nindent 4 }}
2122
{{- with .Values.ingress.annotations }}

charts/connect/templates/pdb.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: policy/v1
33
kind: PodDisruptionBudget
44
metadata:
55
name: {{ template "redpanda-connect.fullname" . }}
6+
namespace: {{ include "redpanda-connect.namespace" . }}
67
labels:
78
{{- include "redpanda-connect.labels" . | nindent 4 }}
89
spec:

charts/connect/templates/service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: {{ include "redpanda-connect.fullname" . }}
6+
namespace: {{ include "redpanda-connect.namespace" . }}
67
labels:
78
{{- include "redpanda-connect.labels" . | nindent 4 }}
89
annotations:

charts/connect/templates/serviceaccount.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: v1
33
kind: ServiceAccount
44
metadata:
55
name: {{ include "redpanda-connect.serviceAccountName" . }}
6+
namespace: {{ include "redpanda-connect.namespace" . }}
67
labels:
78
{{- include "redpanda-connect.labels" . | nindent 4 }}
89
{{- with .Values.serviceAccount.annotations }}

charts/connect/templates/servicemonitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
33
kind: ServiceMonitor
44
metadata:
55
name: {{ include "redpanda-connect.fullname" . }}
6+
namespace: {{ include "redpanda-connect.namespace" . }}
67
labels:
78
{{- include "redpanda-connect.labels" . | nindent 4 }}
89
spec:

0 commit comments

Comments
 (0)