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

add noop@internal in the docs #7291

Open
rdxmb opened this issue Sep 15, 2020 · 5 comments
Open

add noop@internal in the docs #7291

rdxmb opened this issue Sep 15, 2020 · 5 comments
Labels
area/documentation contributor/wanted Participation from an external contributor is highly requested kind/enhancement a new or improved feature. priority/P3 maybe

Comments

@rdxmb
Copy link
Contributor

rdxmb commented Sep 15, 2020

Feature

Followup #7242

What did you expect to see?

noop@internal seems not to be in the docs. However, this is a great point to write redirects without dummy k8-services and -pods.

@joseffilzmaier
Copy link

Also, i am curious if there is a way to use noop@internal with the Kubernetes Ingress Provider?

@oscrx
Copy link

oscrx commented Feb 3, 2022

@joseffilzmaier It worked fine for me.
This is the yaml I used:

---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: confluence
spec:
  routes:
    - match: Host(`confluence.oldsitename.nl`)
      kind: Rule
      middlewares:
        - name: confluence-redirectregex
      services:
        - name: noop@internal
          kind: TraefikService
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: confluence-redirectregex
spec:
  redirectRegex:
    regex: ^http[s]?://confluence.oldsitename.nl/(.*)
    replacement: https://confluence.newsitename.nl/${1}

@joseffilzmaier
Copy link

joseffilzmaier commented Feb 3, 2022

This works for me as well!

I was talking about kind: Ingress and not kind: IngressRoute as in your example
I am currently in need to create both, Ingress and IngressRoute objects in order for other services (external-dns, cert-manager) to automatically create certificates and dns record entries, as those services only work with kind: Ingress.

However, i am receiving constant error logs in traefik because i am using a non-existing service name inside my Ingress.
This all seems very hacky to me, but i have not found a better solution. Having a special noop-internal Ingress would at least solve the error messages in the traefik logs

Thanks for the example though

@bitmage
Copy link

bitmage commented May 21, 2022

I add in my IngressRoute the lines:

      services:
        - name: noop@internal
          kind: TraefikService

I see this in the Traefik pod logs:

time="2022-05-21T00:18:06Z" level=error msg="kubernetes service not found: kube-system/noop@internal" namespace=kube-system providerName=kubernetescrd ingress=all-http-to-https
$ kubectl get TraefikService -A
No resources found

These @internal services seem mysterious. I can't see them. But I smell them.

@bitmage
Copy link

bitmage commented May 21, 2022

Also, regarding the original place where I encountered noop@internal, this approach verbatim didn't work for me. When I try adding the additional entrypoints the Traefik pods go into a crash loop trying to bind to port 443.

What did work was:

additionalArguments:
- "--entrypoints.web.http.redirections.entrypoint.to=:443"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.priority=1"

I also set the priority to 1 so that any explicit routes I create will override this. Therefore, the cert-manager will run fine, and any additional port 80 Ingress that I define will work without having to think about it. I feel like this follows principle of least surprise.

Mentioning it here as it may be relevant to presently discussed documentation.

spantaleev added a commit to devture/com.devture.ansible.role.traefik that referenced this issue Feb 8, 2023
There seems to be no documentation about this,
but I saw some references in it to the logs, as well as some
public mentions:

- traefik/traefik#7242
- traefik/traefik#7291
@nmengin nmengin added the contributor/wanted Participation from an external contributor is highly requested label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation contributor/wanted Participation from an external contributor is highly requested kind/enhancement a new or improved feature. priority/P3 maybe
Projects
None yet
Development

No branches or pull requests

7 participants