Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Schema Registry Port #136

Merged
merged 9 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
6 changes: 6 additions & 0 deletions charts/warpstream-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.13.54] - 2024-11-20

### Added

- Expose port 9094 for playground and for Schema Registry.

## [0.13.53] - 2024-11-20

### Added
Expand Down
3 changes: 3 additions & 0 deletions charts/warpstream-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
- name: schema-registry
containerPort: 9094
protocol: TCP
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/warpstream-agent/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ spec:
type: ClusterIP
clusterIP: None
ports:
{{- if or (.Values.config.playground) (not (hasPrefix "vci_sr_" .Values.config.virtualClusterID)) }}
Copy link
Contributor Author

@brianshih1 brianshih1 Nov 20, 2024

Choose a reason for hiding this comment

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

we only want to expose the Kafka port if:

  • we're in playground mode, in case we run a Kafka server on 9092 and a schema registry server on 9094
  • we're dealing with a Kafka virtual cluster, which will never start with vci_sr_ as that is reserved for schema registry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this overkill? Or we can just always expose 9094 and 9092

- port: {{ .Values.service.port }}
targetPort: kafka
protocol: TCP
name: kafka
{{- end }}
- port: {{ .Values.service.httpPort }}
targetPort: http
protocol: TCP
name: http
{{- if or (.Values.config.playground) (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }}
- port: {{ .Values.service.schemaRegistryPort }}
targetPort: schema-registry
protocol: TCP
name: schema-registry
{{- end }}
selector:
{{- include "warpstream-agent.selectorLabels" . | nindent 4 }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/warpstream-agent/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
{{- if or (.Values.config.playground) (not (hasPrefix "vci_sr_" .Values.config.virtualClusterID)) }}
- port: {{ .Values.service.port }}
targetPort: kafka
protocol: TCP
name: kafka
{{- end }}
- port: {{ .Values.service.httpPort }}
targetPort: http
protocol: TCP
name: http
{{- if or (.Values.config.playground) (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }}
- port: {{ .Values.service.schemaRegistryPort }}
targetPort: schema-registry
protocol: TCP
name: schema-registry
{{- end }}
selector:
{{- include "warpstream-agent.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "warpstream-agent.fullname" . }}-diagnose-connection"
labels:
{{- include "warpstream-agent.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: diagnose
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
command: ['/warpstream']
args:
- kcmd
- -bootstrap-host
- '{{ include "warpstream-agent.fullname" . }}'
- -type
- diagnose-connection
restartPolicy: Never
1 change: 1 addition & 0 deletions charts/warpstream-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ service:
type: ClusterIP
port: 9092
httpPort: 8080
schemaRegistryPort: 9094

rbac:
create: true
Expand Down
Loading