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

Add support for NodePort in Service #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The following table lists the configurable parameters of the apollo-service char
| `configService.service.fullNameOverride` | Override the service name for apollo-configservice | `nil` |
| `configService.service.port` | The port for the service of apollo-configservice | `8080` |
| `configService.service.targetPort` | The target port for the service of apollo-configservice | `8080` |
| `configService.service.nodePort` | The node port for the service of apollo-configservice | `nil` |
| `configService.service.type` | The service type of apollo-configservice | `ClusterIP` |
| `configService.ingress.enabled` | Whether to enable the ingress for config-service or not | `false` |
| `configService.ingress.annotations` | The annotations of the ingress for config-service | `{}` |
Expand Down Expand Up @@ -107,6 +108,7 @@ The following table lists the configurable parameters of the apollo-service char
| `adminService.service.fullNameOverride` | Override the service name for apollo-adminservice | `nil` |
| `adminService.service.port` | The port for the service of apollo-adminservice | `8090` |
| `adminService.service.targetPort` | The target port for the service of apollo-adminservice | `8090` |
| `adminService.service.nodePort` | The node port for the service of apollo-adminservice | `nil` |
| `adminService.service.type` | The service type of apollo-adminservice | `ClusterIP` |
| `adminService.ingress.enabled` | Whether to enable the ingress for admin-service or not | `false` |
| `adminService.ingress.annotations` | The annotations of the ingress for admin-service | `{}` |
Expand Down Expand Up @@ -244,6 +246,7 @@ The following table lists the configurable parameters of the apollo-portal chart
| `service.fullNameOverride` | Override the service name for apollo-portal | `nil` |
| `service.port` | The port for the service of apollo-portal | `8070` |
| `service.targetPort` | The target port for the service of apollo-portal | `8070` |
| `service.nodePort` | The node port for the service of apollo-portal | `nil` |
| `service.type` | The service type of apollo-portal | `ClusterIP` |
| `service.sessionAffinity` | The session affinity for the service of apollo-portal | `ClientIP` |
| `ingress.enabled` | Whether to enable the ingress or not | `false` |
Expand Down
5 changes: 5 additions & 0 deletions apollo-portal/templates/service-portal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ spec:
protocol: TCP
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.nodePort}}
nodePort: {{ .Values.service.nodePort}}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector:
app: {{ include "apollo.portal.fullName" . }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
1 change: 1 addition & 0 deletions apollo-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ service:
fullNameOverride: ""
port: 8070
targetPort: 8070
nodePort: ""
type: ClusterIP
sessionAffinity: ClientIP
ingress:
Expand Down
5 changes: 5 additions & 0 deletions apollo-service/templates/service-adminservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@ spec:
protocol: TCP
port: {{ .Values.adminService.service.port }}
targetPort: {{ .Values.adminService.service.targetPort }}
{{- if and (or (eq .Values.adminService.service.type "NodePort") (eq .Values.adminService.service.type "LoadBalancer")) .Values.adminService.service.nodePort}}
nodePort: {{ .Values.adminService.service.nodePort}}
{{- else if eq .Values.adminService.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector:
app: {{ include "apollo.adminService.fullName" . }}
5 changes: 5 additions & 0 deletions apollo-service/templates/service-configservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@ spec:
protocol: TCP
port: {{ .Values.configService.service.port }}
targetPort: {{ .Values.configService.service.targetPort }}
{{- if and (or (eq .Values.configService.service.type "NodePort") (eq .Values.configService.service.type "LoadBalancer")) .Values.configService.service.nodePort}}
nodePort: {{ .Values.configService.service.nodePort}}
{{- else if eq .Values.configService.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector:
app: {{ include "apollo.configService.fullName" . }}
2 changes: 2 additions & 0 deletions apollo-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ configService:
fullNameOverride: ""
port: 8080
targetPort: 8080
nodePort: ""
type: ClusterIP
ingress:
ingressClassName: null
Expand Down Expand Up @@ -91,6 +92,7 @@ adminService:
fullNameOverride: ""
port: 8090
targetPort: 8090
nodePort: ""
type: ClusterIP
ingress:
ingressClassName: null
Expand Down