From c8080db2185ce88e3dd27ed403b57c85a0e71c7c Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Mon, 18 Nov 2024 13:22:08 -0500 Subject: [PATCH 1/8] start --- charts/warpstream-agent/templates/service-headless.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/warpstream-agent/templates/service-headless.yaml b/charts/warpstream-agent/templates/service-headless.yaml index 7e4b95f..4dac9e3 100644 --- a/charts/warpstream-agent/templates/service-headless.yaml +++ b/charts/warpstream-agent/templates/service-headless.yaml @@ -13,14 +13,22 @@ spec: type: ClusterIP clusterIP: None ports: + {{- if 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 hasPrefix "vci_sr_" .Values.config.virtualClusterID }} + - port: {{ .Values.service.schemaRegistryPort }} + targetPort: kafka + protocol: TCP + name: kafka + {{- end }} selector: {{- include "warpstream-agent.selectorLabels" . | nindent 4 }} {{- end }} From a6771fd668e03e60f9d65bd6eaf8b7b39b6bbb32 Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Tue, 19 Nov 2024 15:06:23 -0500 Subject: [PATCH 2/8] conditionally expose port --- charts/warpstream-agent/templates/deployment.yaml | 3 +++ charts/warpstream-agent/templates/service-headless.yaml | 6 +++--- charts/warpstream-agent/templates/service.yaml | 8 ++++++++ charts/warpstream-agent/values.yaml | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/charts/warpstream-agent/templates/deployment.yaml b/charts/warpstream-agent/templates/deployment.yaml index c989536..99fbd32 100644 --- a/charts/warpstream-agent/templates/deployment.yaml +++ b/charts/warpstream-agent/templates/deployment.yaml @@ -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 }} diff --git a/charts/warpstream-agent/templates/service-headless.yaml b/charts/warpstream-agent/templates/service-headless.yaml index 4dac9e3..12b7602 100644 --- a/charts/warpstream-agent/templates/service-headless.yaml +++ b/charts/warpstream-agent/templates/service-headless.yaml @@ -13,7 +13,7 @@ spec: type: ClusterIP clusterIP: None ports: - {{- if not hasPrefix "vci_sr_" .Values.config.virtualClusterID }} + {{- if not (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} - port: {{ .Values.service.port }} targetPort: kafka protocol: TCP @@ -25,9 +25,9 @@ spec: name: http {{- if hasPrefix "vci_sr_" .Values.config.virtualClusterID }} - port: {{ .Values.service.schemaRegistryPort }} - targetPort: kafka + targetPort: schema-registry protocol: TCP - name: kafka + name: schema-registry {{- end }} selector: {{- include "warpstream-agent.selectorLabels" . | nindent 4 }} diff --git a/charts/warpstream-agent/templates/service.yaml b/charts/warpstream-agent/templates/service.yaml index ee793f1..88b8311 100644 --- a/charts/warpstream-agent/templates/service.yaml +++ b/charts/warpstream-agent/templates/service.yaml @@ -11,13 +11,21 @@ metadata: spec: type: {{ .Values.service.type }} ports: + {{- if 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 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 }} diff --git a/charts/warpstream-agent/values.yaml b/charts/warpstream-agent/values.yaml index fc94911..309850c 100644 --- a/charts/warpstream-agent/values.yaml +++ b/charts/warpstream-agent/values.yaml @@ -55,6 +55,7 @@ service: type: ClusterIP port: 9092 httpPort: 8080 + schemaRegistryPort: 9094 rbac: create: true From b818849ce4481e65f2e4b3932c41bb35cd6054a1 Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Tue, 19 Nov 2024 20:34:58 -0500 Subject: [PATCH 3/8] modify port conditions --- .../templates/service-headless.yaml | 4 ++-- .../warpstream-agent/templates/service.yaml | 4 ++-- .../test-schema-registry-connection.yaml | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml diff --git a/charts/warpstream-agent/templates/service-headless.yaml b/charts/warpstream-agent/templates/service-headless.yaml index 12b7602..6c54f80 100644 --- a/charts/warpstream-agent/templates/service-headless.yaml +++ b/charts/warpstream-agent/templates/service-headless.yaml @@ -13,7 +13,7 @@ spec: type: ClusterIP clusterIP: None ports: - {{- if not (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} + {{- if or (.Values.config.playground) (not (hasPrefix "vci_sr_" .Values.config.virtualClusterID)) }} - port: {{ .Values.service.port }} targetPort: kafka protocol: TCP @@ -23,7 +23,7 @@ spec: targetPort: http protocol: TCP name: http - {{- if hasPrefix "vci_sr_" .Values.config.virtualClusterID }} + {{- if or (.Values.config.playground) (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} - port: {{ .Values.service.schemaRegistryPort }} targetPort: schema-registry protocol: TCP diff --git a/charts/warpstream-agent/templates/service.yaml b/charts/warpstream-agent/templates/service.yaml index 88b8311..dce3244 100644 --- a/charts/warpstream-agent/templates/service.yaml +++ b/charts/warpstream-agent/templates/service.yaml @@ -11,7 +11,7 @@ metadata: spec: type: {{ .Values.service.type }} ports: - {{- if not (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} + {{- if or (.Values.config.playground) (not (hasPrefix "vci_sr_" .Values.config.virtualClusterID)) }} - port: {{ .Values.service.port }} targetPort: kafka protocol: TCP @@ -21,7 +21,7 @@ spec: targetPort: http protocol: TCP name: http - {{- if hasPrefix "vci_sr_" .Values.config.virtualClusterID }} + {{- if or (.Values.config.playground) (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} - port: {{ .Values.service.schemaRegistryPort }} targetPort: schema-registry protocol: TCP diff --git a/charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml b/charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml new file mode 100644 index 0000000..bb1b17f --- /dev/null +++ b/charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml @@ -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 From e3ff257a66db763a206d30271cbcfaa141155615 Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Wed, 20 Nov 2024 07:11:58 -0500 Subject: [PATCH 4/8] bump version --- charts/warpstream-agent/CHANGELOG.md | 6 ++++++ charts/warpstream-agent/Chart.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/warpstream-agent/CHANGELOG.md b/charts/warpstream-agent/CHANGELOG.md index 7ee9a51..0ef8f7f 100644 --- a/charts/warpstream-agent/CHANGELOG.md +++ b/charts/warpstream-agent/CHANGELOG.md @@ -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.53] - 2024-11-8 + +### Added + +- Expose port 9094 for Schema Registry. + ## [0.13.52] - 2024-11-8 ### Added diff --git a/charts/warpstream-agent/Chart.yaml b/charts/warpstream-agent/Chart.yaml index 7fd8499..b8c7123 100644 --- a/charts/warpstream-agent/Chart.yaml +++ b/charts/warpstream-agent/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: warpstream-agent description: WarpStream Agent for Kubernetes. type: application -version: 0.13.52 +version: 0.13.53 appVersion: v598 icon: https://avatars.githubusercontent.com/u/132156278 home: https://docs.warpstream.com/warpstream/ From cc6cae4a7138ce999f1cb2f9b0ffad0655d62d41 Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Wed, 20 Nov 2024 11:48:16 -0500 Subject: [PATCH 5/8] merge --- charts/warpstream-agent/CHANGELOG.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/charts/warpstream-agent/CHANGELOG.md b/charts/warpstream-agent/CHANGELOG.md index eff6a1d..ba7b953 100644 --- a/charts/warpstream-agent/CHANGELOG.md +++ b/charts/warpstream-agent/CHANGELOG.md @@ -5,19 +5,17 @@ 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). -<<<<<<< HEAD -## [0.13.53] - 2024-11-8 +## [0.13.54] - 2024-11-20 ### Added -- Expose port 9094 for Schema Registry. -======= +- Expose port 9094 for playground and for Schema Registry. + ## [0.13.53] - 2024-11-20 ### Added - Update WarpStream Agent to v600. ->>>>>>> main ## [0.13.52] - 2024-11-8 From a398ab07263582f7322da72defe4ea17436cb79f Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Wed, 20 Nov 2024 11:56:22 -0500 Subject: [PATCH 6/8] remove test --- .../test-schema-registry-connection.yaml | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml diff --git a/charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml b/charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml deleted file mode 100644 index bb1b17f..0000000 --- a/charts/warpstream-agent/templates/tests/test-schema-registry-connection.yaml +++ /dev/null @@ -1,20 +0,0 @@ -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 From 6e15cb3d18831650769f255166961accec9cf87e Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Wed, 20 Nov 2024 13:21:59 -0500 Subject: [PATCH 7/8] bump version --- charts/warpstream-agent/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/warpstream-agent/Chart.yaml b/charts/warpstream-agent/Chart.yaml index a40d487..a520bac 100644 --- a/charts/warpstream-agent/Chart.yaml +++ b/charts/warpstream-agent/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: warpstream-agent description: WarpStream Agent for Kubernetes. type: application -version: 0.13.53 +version: 0.13.54 appVersion: v600 icon: https://avatars.githubusercontent.com/u/132156278 home: https://docs.warpstream.com/warpstream/ From 9d662933e83bfa12ff73e9d59c45d08bebeb0eac Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Wed, 20 Nov 2024 14:52:26 -0500 Subject: [PATCH 8/8] default 9094 --- charts/warpstream-agent/templates/service-headless.yaml | 2 +- charts/warpstream-agent/templates/service.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/warpstream-agent/templates/service-headless.yaml b/charts/warpstream-agent/templates/service-headless.yaml index 6c54f80..8ba61b8 100644 --- a/charts/warpstream-agent/templates/service-headless.yaml +++ b/charts/warpstream-agent/templates/service-headless.yaml @@ -24,7 +24,7 @@ spec: protocol: TCP name: http {{- if or (.Values.config.playground) (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} - - port: {{ .Values.service.schemaRegistryPort }} + - port: {{ .Values.service.schemaRegistryPort | default 9094 }} targetPort: schema-registry protocol: TCP name: schema-registry diff --git a/charts/warpstream-agent/templates/service.yaml b/charts/warpstream-agent/templates/service.yaml index dce3244..3acdb75 100644 --- a/charts/warpstream-agent/templates/service.yaml +++ b/charts/warpstream-agent/templates/service.yaml @@ -22,7 +22,7 @@ spec: protocol: TCP name: http {{- if or (.Values.config.playground) (hasPrefix "vci_sr_" .Values.config.virtualClusterID) }} - - port: {{ .Values.service.schemaRegistryPort }} + - port: {{ .Values.service.schemaRegistryPort | default 9094 }} targetPort: schema-registry protocol: TCP name: schema-registry