Skip to content

Commit

Permalink
Merge pull request #47 from mdarii/master
Browse files Browse the repository at this point in the history
Added option to deploy service as internal LB
  • Loading branch information
rimusz authored Apr 23, 2019
2 parents 9661b7a + 2ede136 commit 9a287ac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/gcloud-sqlproxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ maintainers:
name: gcloud-sqlproxy
sources:
- https://github.com/rimusz/charts
version: 0.11.0
version: 0.12.0
2 changes: 2 additions & 0 deletions stable/gcloud-sqlproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ The following table lists the configurable parameters of the `gcloud-sqlproxy` c
| `cloudsql.instances` | List of PostgreSQL/MySQL instances | [{instance: `instance`, project: `project`, region: `region`, port: 5432}] must be provided |
| `resources` | CPU/Memory resource requests/limits | Memory: `100/150Mi`, CPU: `100/150m` |
| `nodeSelector` | Node Selector | |
| `service.type` | Kubernetes LoadBalancer type | `ClusterIP` |
| `service.internalLB` | Create service with `cloud.google.com/load-balancer-type: "Internal"` | Default `false`, when set to `true` you have to set also `service.type=LoadBalancer` |
| `rbac.create` | Create RBAC configuration w/ SA | `false` |
| `networkPolicy.enabled` | Enable NetworkPolicy | `false` |
| `networkPolicy.ingress.from` | List of sources which should be able to access the pods selected for this rule. If empty, allows all sources. | `[]` |
Expand Down
5 changes: 5 additions & 0 deletions stable/gcloud-sqlproxy/templates/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "gcloud-sqlproxy.fullname" . }}
{{- if .Values.service.internalLB }}
annotations:
cloud.google.com/load-balancer-type: "Internal"
{{- end }}
labels:
app.kubernetes.io/name: {{ include "gcloud-sqlproxy.name" . }}
helm.sh/chart: {{ include "gcloud-sqlproxy.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
{{- range .Values.cloudsql.instances }}
- name: {{ .instance }}
Expand Down
6 changes: 6 additions & 0 deletions stable/gcloud-sqlproxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ cloudsql:
rbac:
create: false

## Specifies service type and option to enable internal LoadBalancer
## If service.internalLB is true, service.type shoul be: LoadBalancer
service:
type: ClusterIP
internalLB: false

networkPolicy:
## Specifies whether a NetworkPolicy should be created
##
Expand Down

0 comments on commit 9a287ac

Please sign in to comment.