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

ingressclass.kubernetes.io/is-default-class: "true" does not work #7600

Closed
matti opened this issue Sep 5, 2021 · 13 comments
Closed

ingressclass.kubernetes.io/is-default-class: "true" does not work #7600

matti opened this issue Sep 5, 2021 · 13 comments
Labels
area/docs kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@matti
Copy link

matti commented Sep 5, 2021

$ kubectl get ingressclass nginx -o yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
    meta.helm.sh/release-name: ingress-nginx
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2021-09-05T15:32:21Z"
  generation: 1
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: ingress-nginx
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/version: 1.0.0
    helm.sh/chart: ingress-nginx-4.0.1
  name: nginx
  resourceVersion: "680"
  uid: 938f1d53-6784-4007-bcdb-be112828720d
spec:
  controller: k8s.io/ingress-nginx
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: registry
spec:
  rules:
    - host: registry.domain.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: registry
                port:
                  number: 80
  tls:
    - secretName: domain-tls

logs from controller:

-------------------------------------------------------------------------------
NGINX Ingress controller
  Release:       v1.0.0
  Build:         041eb167c7bfccb1d1653f194924b0c5fd885e10
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.20.1

-------------------------------------------------------------------------------

W0905 15:32:49.172044       7 client_config.go:615] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I0905 15:32:49.172310       7 main.go:221] "Creating API client" host="https://10.43.0.1:443"
I0905 15:32:49.179522       7 main.go:265] "Running in Kubernetes cluster" major="1" minor="21" git="v1.21.4+k3s1" state="clean" commit="3e250fdbab72d88f7e6aae57446023a0567ffc97" platform="linux/amd64"
I0905 15:32:49.753351       7 main.go:104] "SSL fake certificate created" file="/etc/ingress-controller/ssl/default-fake-certificate.pem"
I0905 15:32:49.769093       7 ssl.go:531] "loading tls certificate" path="/usr/local/certificates/cert" key="/usr/local/certificates/key"
I0905 15:32:49.779729       7 nginx.go:253] "Starting NGINX Ingress controller"
I0905 15:32:49.786515       7 event.go:282] Event(v1.ObjectReference{Kind:"ConfigMap", Namespace:"default", Name:"ingress-nginx-controller", UID:"c9b57167-3510-4f87-9672-a8bf594449c3", APIVersion:"v1", ResourceVersion:"659", FieldPath:""}): type: 'Normal' reason: 'CREATE' ConfigMap default/ingress-nginx-controller
I0905 15:32:50.886701       7 store.go:361] "Ignoring ingress because of error while validating ingress class" ingress="default/registry" error="ingress does not contain a valid IngressClass"
I0905 15:32:50.981697       7 nginx.go:295] "Starting NGINX process"

^-- see ingress does not contain a valid IngressClass

Installed with helm chart version 4.0.1 using values:

controller:
  ingressClassResource:
    default: true
@matti matti added the kind/bug Categorizes issue or PR as related to a bug. label Sep 5, 2021
@k8s-ci-robot
Copy link
Contributor

@matti: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Sep 5, 2021
@matti
Copy link
Author

matti commented Sep 5, 2021

@rpthms
Copy link

rpthms commented Sep 8, 2021

@matti Are you setting controller.watchIngressWithoutClass to true?

# Process Ingress objects without ingressClass annotation/ingressClassName field
# Overrides value for --watch-ingress-without-class flag of the controller binary
# Defaults to false
watchIngressWithoutClass: false

@matti
Copy link
Author

matti commented Sep 8, 2021

no. thats prob it. all docs that I could find are pretty slim on this.

@longwuyuan
Copy link
Contributor

longwuyuan commented Sep 9, 2021 via email

@iusergii
Copy link

iusergii commented Sep 9, 2021

@rpthms, @longwuyuan I have multiple ingress controllers and my rules have annotation ~kubernetes.io/ingress.class: nginx... and even with watchIngressWithoutClass: true it still doesn't work.
Is there expected and is there any workaround for migration to v1?
Thanks

@longwuyuan
Copy link
Contributor

longwuyuan commented Sep 16, 2021

/remove-kind bug
/kind support
/area documentation

Hi,

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Sep 16, 2021
@k8s-ci-robot
Copy link
Contributor

@longwuyuan: The label(s) area/documentation cannot be applied, because the repository doesn't have them.

In response to this:

/remove-kind bug
/kind support
/area documentation

Hi,

  • one request is to pupulate your ingresses with the "ingressClassName" . Can you try and update results
  • since you have multiple controllers, please provide details on the multiple controllers

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot removed the kind/bug Categorizes issue or PR as related to a bug. label Sep 16, 2021
@longwuyuan
Copy link
Contributor

/area docs

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 15, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 14, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

6 participants