Skip to content

Commit

Permalink
Added config service.loadBalancerIP
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-abrioux committed Dec 11, 2021
1 parent 8b6a568 commit fd58070
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ After that, all shadowsocks components will be ready on your K8S cluster.
| `podSecurityContext` | Security context of the Shadowsocks pods | |
| `securityContext` | Security context of the Shadowsocks container | |
| `service.type` | Kubernetes service type | `ClusterIP` |
| `service.loadBalancerIP` | If the service is a LoadBalancer, you can define its external IP address | |
| `service.port` | Port where the service (shadowsocks) is exposed | `8388` |
| `service.annotations` | Annotations of the service | |
| `service.udpLoadBalancer.enabled` | If the service is a LoadBalancer, since we cannot create one with mix protocols, a seperate UDP-dedicated LoadBalancer will be created if enabled. | `false` |
Expand Down
6 changes: 6 additions & 0 deletions templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ metadata:
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.service.port }}
targetPort: ss-tcp
Expand Down Expand Up @@ -44,6 +47,9 @@ metadata:
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.service.port }}
targetPort: ss-udp
Expand Down
1 change: 1 addition & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ securityContext: {}

service:
type: ClusterIP
loadBalancerIP: ""
port: 8388
annotations: {}
# If the service is a LoadBalancer, since we cannot create one with mix protocols,
Expand Down

0 comments on commit fd58070

Please sign in to comment.