Skip to content

Commit

Permalink
service.dnsService also exposes DNS port of the kubernetes Service (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rattboi authored May 17, 2024
1 parent 86c2d12 commit d47961e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 4 additions & 2 deletions charts/localstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,16 @@ The following table lists the configurable parameters of the Localstack chart an
|------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `service.type` | Kubernetes Service type | `NodePort` |
| `service.edgeService.targetPort` | Port number for Localstack edge service | `4566` |
| `service.externalServicePorts.start` | Start of the external service port range (included). service | `4510` |
| `service.externalServicePorts.start` | Start of the external service port range (included). service | `4510` |
| `service.externalServicePorts.end` | End of the external service port range (excluded). service | `4560` |
| `service.loadBalancerIP` | loadBalancerIP if Localstack service type is `LoadBalancer` | `nil` |
| `service.dnsService` | Expose the Service and Deployment's DNS port for TCP and UDP DNS traffic | `""` |
| `service.clusterIP` | Set a static clusterIP for the service. Useful for DNS delegation to the Localstack Service | `""` |
| `ingress.enabled` | Enable the use of the ingress controller to access Localstack service | `false` |
| `ingress.annotations` | Annotations for the Localstack Ingress | `{}` |
| `ingress.hosts[0].host` | Hostname to your Localstack Ingress | `nil` |
| `ingress.hosts[0].paths` | Path within the url structure | `[]` |
| `ingress.tls` | Exsisting TLS certificates for ingress | `[]` |
| `ingress.tls` | Existing TLS certificates for ingress | `[]` |

### Persistence Parameters

Expand Down
10 changes: 10 additions & 0 deletions charts/localstack/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ spec:
{{- if and (or (eq $.Values.service.type "NodePort") (eq $.Values.service.type "LoadBalancer")) (not (empty .Values.service.edgeService.nodePort)) }}
nodePort: {{ .Values.service.edgeService.nodePort }}
{{- end }}
{{- if .Values.service.dnsService }}
- name: dns-tcp
port: 53
containerPort: 53
protocol: TCP
- name: dns-udp
port: 53
containerPort: 53
protocol: UDP
{{- end }}
{{- range untilStep (.Values.service.externalServicePorts.start|int) (.Values.service.externalServicePorts.end|int) 1 }}
- name: "external-service-port-{{ . }}"
port: {{ . }}
Expand Down
4 changes: 4 additions & 0 deletions charts/localstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ service:
## @param service.dnsService Enables or disables the exposure of the LocalStack DNS
##
dnsService: false
## @param service.clusterIP sets a static clusterIP. This is useful alongside the LocalStack DNS setup
## see https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#configuration-of-stub-domain-and-upstream-nameserver-using-coredns for an example of DNS delegation in Coredns
##
clusterIP: ""

ingress:
enabled: false
Expand Down

0 comments on commit d47961e

Please sign in to comment.