Skip to content

Commit

Permalink
feat: added standalone dns service for loki (#548)
Browse files Browse the repository at this point in the history
## Description

Creates a standard service in the loki package so that the loki gateway
can rely on the name of this service instead of nonstandard names for
the DNS service in certain k8s distros (i.e. rke2).
...

## Related Issue

Fixes #68 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed

Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
  • Loading branch information
joelmccoy and mjnagel committed Jul 9, 2024
1 parent 8ec260c commit e2efdf9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/loki/chart/templates/service-dns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
apiVersion: v1
kind: Service
metadata:
name: uds-loki-dns
namespace: kube-system
spec:
ports:
- name: dns
port: 53
protocol: UDP
targetPort: 53
- name: dns-tcp
port: 53
protocol: TCP
targetPort: 53
selector:
k8s-app: kube-dns
type: ClusterIP
6 changes: 6 additions & 0 deletions src/loki/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ tasks:
name: app.kubernetes.io/name=loki
namespace: loki
condition: Ready
- description: Validate uds-loki-dns
wait:
cluster:
kind: Service
name: app.kubernetes.io/component=uds-loki-dns
namespace: kube-system
- description: Validate loki-gw
wait:
cluster:
Expand Down
4 changes: 4 additions & 0 deletions src/loki/values/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Sets the global DNS service to the service created in this chart
global:
dnsService: "uds-loki-dns"

# -- Overrides the chart's name
nameOverride: loki
# -- Overrides the chart's computed fullname
Expand Down

0 comments on commit e2efdf9

Please sign in to comment.