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

IST0101 false positive for cross namespace referenced #22698

Closed
howardjohn opened this issue Apr 3, 2020 · 0 comments · Fixed by #23310
Closed

IST0101 false positive for cross namespace referenced #22698

howardjohn opened this issue Apr 3, 2020 · 0 comments · Fixed by #23310

Comments

@howardjohn
Copy link
Member

Input:

apiVersion: v1
kind: Service
metadata:
  name: reviews
  namespace: default
spec:
  ports:
  - port: 42
    name: tcp-test
    protocol: TCP
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: cross-namespace
  namespace: istio-system
spec:
  hosts: [reviews]
  http:
    - route:
        - destination:
            host: reviews.default.svc.cluster.local
$ ik analyze -k=false file.yaml -A
Error [IST0101] (VirtualService cross-namespace.istio-system file.yaml) Referenced host not found: "reviews.default.svc.cluster.local"
Error: Analyzers found issues when analyzing all namespaces.
See https://istio.io/docs/reference/config/analysis for more information about causes and resolutions.

From the spec:

Also, notice that this rule is set in the istio-system namespace but uses the fully qualified domain name of the productpage service, productpage.prod.svc.cluster.local. Therefore the rule’s namespace does not have an impact in resolving the name of the productpage service.

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

Successfully merging a pull request may close this issue.

3 participants