Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loki gateway does not deploy on RKE2 #68

Closed
mjnagel opened this issue Dec 15, 2023 · 3 comments · Fixed by #548
Closed

Loki gateway does not deploy on RKE2 #68

mjnagel opened this issue Dec 15, 2023 · 3 comments · Fixed by #548
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers logging Issues related to the Logging stack (Loki/Promtail)
Milestone

Comments

@mjnagel
Copy link
Contributor

mjnagel commented Dec 15, 2023

Environment

Device and OS: ec2 instance, amazon linux 2023
App version: 0.6.2
Kubernetes distro being used: RKE2 1.27.x

Steps to reproduce

  1. Attempt to deploy the example uds-core bundle on an RKE2 cluster.
  2. Loki gateway fails to become healthy with the error:
    nginx: [emerg] host not found in resolver "kube-dns.kube-system.svc.cluster.local."
    

Expected result

Happy deploy!

Actual Result

The loki gateway is configured to point at the DNS service in kube-system. The default svc name it expects is kube-dns and RKE2 has a different name (rke2-coredns-rke2-coredns).

Severity/Priority

Medium? Completely blocks deployment after loki if the dns service is not named kube-dns, but with bundle overrides it could be changed.

Additional Context

While this could be done with a variable it would be annoying to have to pass in an environment specific value like this. Ideally a standard service could be created that maps to the DNS pods in cluster already?

@mjnagel mjnagel added the possible-bug Something may not be working label Dec 15, 2023
@jbrewer3
Copy link
Member

jbrewer3 commented Feb 9, 2024

Dropping override example here for those hitting issues.

- name: uds-core
    repository: oci://ghcr.io/defenseunicorns/packages/uds/core
    ref: 0.10.0-upstream
    overrides:
      loki:
        loki:
          values:
            # Override default dns service name for Loki Gateway
            - path: "global.dnsService"
              value: "rke2-coredns-rke2-coredns"

@mjnagel
Copy link
Contributor Author

mjnagel commented May 17, 2024

Dropping a comment update here - it wouldn't fix the "automagic" nature of this but we could expose this Loki DNS value as a zarf helm override (defenseunicorns/zarf#2403).

@mjnagel mjnagel added enhancement New feature or request logging Issues related to the Logging stack (Loki/Promtail) documentation Improvements or additions to documentation and removed possible-bug Something may not be working documentation Improvements or additions to documentation labels Jul 2, 2024
@mjnagel
Copy link
Contributor Author

mjnagel commented Jul 2, 2024

Switching this to enhancement issue. I would like to tackle this by adding a standardized DNS service that we manage as part of the Loki uds-config chart. In reviewing this issue I noted a few things:

The path forward here:

  • Create a service in kube-system named uds-loki-dns (or similar, just identify the purpose + ownership clearly via labels/name)
  • Service should be a template in the uds-loki-config chart since its usage is currently attached to that
  • Loki's default values should be updated to modify global.dnsService to point to that service

This should be a relatively seamless change, and for existing users overriding this they would be able to drop their override. Marking this as a good-first-issue, happy to converse with anyone who wants to pick this up.

@mjnagel mjnagel added the good first issue Good for newcomers label Jul 2, 2024
@joelmccoy joelmccoy self-assigned this Jul 5, 2024
@mjnagel mjnagel added this to the 0.24.0 milestone Jul 9, 2024
@mjnagel mjnagel closed this as completed in e2efdf9 Jul 9, 2024
rjferguson21 pushed a commit that referenced this issue Jul 11, 2024
## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers logging Issues related to the Logging stack (Loki/Promtail)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants