Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #6806] [K8S][HELM] Headless service renders ports for enabled…
… protocols only # 🔍 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 🔖 - [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 ⚰️ ```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 🎉 ```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) Closes #6806 from dnskr/headless-service-renders-enabled-protocol-ports. Closes #6806 9d3f074 [dnskr] [K8S][HELM] Headless service renders ports for enabled protocols only Authored-by: dnskr <[email protected]> Signed-off-by: Kent Yao <[email protected]>
- Loading branch information