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

How to use an FQDN in a host of Istio VirtualService Destination field #4387

Closed
ysk24ok opened this issue Oct 19, 2022 · 2 comments · Fixed by #4408
Closed

How to use an FQDN in a host of Istio VirtualService Destination field #4387

ysk24ok opened this issue Oct 19, 2022 · 2 comments · Fixed by #4408
Labels

Comments

@ysk24ok
Copy link
Contributor

ysk24ok commented Oct 19, 2022

When we go through the tutorial, the following VirtualService object will be created.
Is there a way to use a fully qualified domain name (FQDN) in host of the Destination field?
I'm asking this because our k8s has a rule that an FQDN must be specified to the field as Istio recommends.

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: iris-model
  namespace: seldon
spec:
  gateways:
  - istio-system/seldon-gateway
  hosts:
  - '*'
  http:
  - match:
    - uri:
        prefix: /seldon/seldon/iris-model/
    rewrite:
      uri: /
    route:
    - destination:
        host: iris-model-default
        port:
          number: 8000
        subset: default
  - match:
    - headers:
        namespace:
          exact: seldon
        seldon:
          exact: iris-model
      uri:
        regex: .*tensorflow.*|.*seldon.protos.*|.*inference.*
    route:
    - destination:
        host: iris-model-default
        port:
          number: 5001
        subset: default

https://github.com/SeldonIO/seldon-core/blob/v1.14.1/operator/controllers/seldondeployment_controller.go#L353
It doesn't seem possible to me because pSvcName is expected to be a service name. It can be customized by passing seldon.io/svc-name, but it's still just a service name.

If it's not possible, as I really need this feature, I may be going to contribute to this project.
I have the following ideas to implement the feature. Let me know which you think is better or if you have a better idea than mine.

  1. Use an FQDN by default
    • I think it's OK to use an FQDN by default because SeldonDeploument creates a VS and a service in the same namespace, so IIUC using the short name or FQDN doesn't matter.
  2. Add a new option as a helm value such as istio.use_fqdn or as an annotation such as seldon.io/istio-use-fqdn to the SeldonDeployment
@ukclivecox
Copy link
Contributor

Are you saying that the seldon.io/istio-host as discussed here is not what you need?

@ysk24ok
Copy link
Contributor Author

ysk24ok commented Oct 19, 2022

No, seldon.io/istio-host is not what I want IIUC. It's meant to be used for spec.hosts.
I'd like to use a FQDN in the host of Destination field.

@ysk24ok ysk24ok changed the title How to use an FQDN in a host of Istio VirtualService How to use an FQDN in a host of Istio VirtualService Destination field Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants