Skip to content

Commit

Permalink
proxy: Allow more config
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed Nov 14, 2020
1 parent bf7590e commit 65498b0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: proxy
description: A Helm chart for Kubernetes
type: application
version: 0.1.3
version: 1.0.0
appVersion: 1.0.0
4 changes: 2 additions & 2 deletions charts/proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ The following tables list the configurable parameters of the Ledger chart and th
| `serviceAccount.create` | Configures if a ServiceAccount with this name should be created | `true` |
| `serviceAccount.annotations` | Configures annotation for the ServiceAccount | `{}` |
| `serviceAccountAgent.name` | Name of the agent ServiceAccount to be used by access-controlled resources | autogenerated |
| `service.type` | Kubernetes service type | `ClusterIP` |
| `service.port` | Kubernetes service port | `80` |
| `ingress.enabled` | Enables ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `proxy[].name` | Name of the proxy | nil |
| `proxy[].hosts[].host` | Hostname to listen to | nil |
| `proxy[].hosts[].paths` | Paths to listen to | `[]` |
| `proxy[].service.extras` | Kubernetes service configuration | nil |
| `proxy[].service.port` | Kubernetes service port | `80` |
| `proxy[].backend.ip` | The IP of the backend | nil |
| `proxy[].backend.port` | The port of the backend | nil |
| `proxy[].tls` | TLS configuration | nil |
Expand Down
7 changes: 5 additions & 2 deletions charts/proxy/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{{- $servicePort := .Values.service.port -}}
{{- range .Values.proxy }}
{{ $svc := .service | default dict}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .name }}
spec:
{{- with $svc.extras -}}
{{- toYaml . | nindent 2 }}
{{- end }}
ports:
- protocol: TCP
port: {{ $servicePort }}
port: {{ $svc.port | default .backend.port }}
targetPort: {{ .backend.port }}
{{- end }}
14 changes: 4 additions & 10 deletions charts/proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ serviceAccount:
annotations: {}
name: ""

ingress:
enabled: false
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

service:
type: ClusterIP
port: 80

proxy:
# - name: nas
# service:
# extras:
# loadBalancerIP: 192.168.22.170
# type: LoadBalancer
# hosts:
# - host: nas.k8s
# paths: ["/"]
Expand Down

0 comments on commit 65498b0

Please sign in to comment.