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

Ingress resource does not restrict host field #1820

Closed
gyliu513 opened this issue Dec 11, 2017 · 4 comments
Closed

Ingress resource does not restrict host field #1820

gyliu513 opened this issue Dec 11, 2017 · 4 comments

Comments

@gyliu513
Copy link
Contributor

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

NGINX Ingress controller version:

Kubernetes version (use kubectl version):
1.8.3

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:

Now I can define an Ingress resource as following:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-nginx
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: aa.poc.myvm.info
    http:
      paths:
      - path: /
        backend:
          serviceName: my-nginx
          servicePort: 80

For the host field, I can define any value as the host field. But in real customer environment, they may have a specified domain name such as *.foo.bar.com, and they only want to create ingress resources in the format of *.foo.bar.com and reject all ingress create request which is not in *.foo.bar.com format. Or they have limited domain names as a.foo.bar.com, b.foo.bar.com and want the ingress host must be either a.foo.bar.com or b.foo.bar.com.

But now, the ingress do not have such checking and the end user can actually define any host names, and this may cause sometimes the ingress does not work if the end user configured a wrong host name.

Is it possible to add some domain name checking in ingress or any proposal for how to resolve such issue?

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

@pieterlange
Copy link
Contributor

This is currently not possible, but in the future one might use ingress claims.

kubernetes/kubernetes#30151

@aledbf
Copy link
Member

aledbf commented Dec 12, 2017

Closing. Right now the ingress spec does not provides a way to handle this use case.
Please check one of the proposals to add Ingress claims https://docs.google.com/document/d/1Kj9OcTQdERZgNkZhdDxnQeT-TI4DLqqg62lShnboT6s/

@aledbf aledbf closed this as completed Dec 12, 2017
@aledbf
Copy link
Member

aledbf commented Dec 12, 2017

@gyliu513 I am closing this because there is nothing we can do in this repository. The change of the ingress spec must be done in the main kubernetes repository

@gyliu513
Copy link
Contributor Author

Thanks @aledbf and @pieterlange , the ingress claim is exactly what I want, will check the progress of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants