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

[K8S][HELM] Headless service renders ports for enabled protocols only #6806

Conversation

dnskr
Copy link
Contributor

@dnskr dnskr commented Nov 12, 2024

🔍 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 🔖

  • 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 ⚰️

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 🎉

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 📝

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (dddb037) to head (9d3f074).
Report is 5 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #6806   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         687     687           
  Lines       42442   42442           
  Branches     5793    5793           
======================================
  Misses      42442   42442           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yaooqinn yaooqinn closed this in 2453efe Nov 14, 2024
@yaooqinn
Copy link
Member

Merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants