dnskr opened a new pull request, #6806:
URL: https://github.com/apache/kyuubi/pull/6806
# :mag: Description
## Issue References ๐
Headless service exposes ports for all protocols (enabled and disabled).
## Describe Your Solution ๐ง
Add condition to render ports for enabled protocols only.
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
> Note: `thrift-binary` and `rest` protocols are enabled by default
#### Behavior Without This Pull Request :coffin:
```shell
helm template kyuubi charts/kyuubi -s templates/kyuubi-headless-service.yaml
---
# Source: kyuubi/templates/kyuubi-headless-service.yaml
apiVersion: v1
kind: Service
metadata:
name: kyuubi-headless
labels:
helm.sh/chart: kyuubi-0.1.0
app.kubernetes.io/name: kyuubi
app.kubernetes.io/instance: kyuubi
app.kubernetes.io/version: "1.9.2"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
clusterIP: None
ports:
- name: mysql
port: 3309
targetPort: 3309
- name: rest
port: 10099
targetPort: 10099
- name: thrift-binary
port: 10009
targetPort: 10009
- name: thrift-http
port: 10010
targetPort: 10010
- name: prometheus
port: 10019
targetPort: prometheus
selector:
app.kubernetes.io/name: kyuubi
app.kubernetes.io/instance: kyuubi
```
#### Behavior With This Pull Request :tada:
```shell
helm template kyuubi charts/kyuubi -s templates/kyuubi-headless-service.yaml
---
# Source: kyuubi/templates/kyuubi-headless-service.yaml
apiVersion: v1
kind: Service
metadata:
name: kyuubi-headless
labels:
helm.sh/chart: kyuubi-0.1.0
app.kubernetes.io/name: kyuubi
app.kubernetes.io/instance: kyuubi
app.kubernetes.io/version: "1.9.2"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
clusterIP: None
ports:
- name: rest
port: 10099
targetPort: 10099
- name: thrift-binary
port: 10009
targetPort: 10009
- name: prometheus
port: 10019
targetPort: prometheus
selector:
app.kubernetes.io/name: kyuubi
app.kubernetes.io/instance: kyuubi
```
---
# Checklist ๐
- [x] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]