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

Kubeconform errors out with DestinationRule, cannot find ':' #257

Open
esn89 opened this issue Jan 25, 2024 · 0 comments
Open

Kubeconform errors out with DestinationRule, cannot find ':' #257

esn89 opened this issue Jan 25, 2024 · 0 comments

Comments

@esn89
Copy link

esn89 commented Jan 25, 2024

I have the follow DestinationRule from Istio:

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: test
  namespace: '{{ .Values.namespace }}'
spec:
  host: test.{{ .Values.namespace }}.svc.cluster.local
  trafficPolicy:
    connectionPool:
      http:
        http2MaxRequests: {{ .Values.requests }}
        maxRetries: {{ .Values.retries }}
      tcp:
        maxConnections: {{ .Values.tcpmaxconnections }}
    loadBalancer:
      simple: RANDOM
      localityLbSetting:
        enabled: {{ .Values.enabled }}
    {{- if .Values.yes }}
    outlierDetection:
      baseEjectionTime: {{ .Values.outlierbaseejectiontime }}
      consecutiveErrors: {{ .Values.outlierconsecutiveerrors }}
      interval: {{ .Values.outlierinterval }}
    {{- end }}
    tls:
      mode: ISTIO_MUTUAL

I am using schema from here:
https://github.com/datreeio/CRDs-catalog/blob/main/networking.istio.io/destinationrule_v1alpha3.json

./kubeconform -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/networking.istio.io/destinationrule_v1alpha3.json' -verbose -summary -strict templates/dr.yaml 
templates/dr.yaml - failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 20: could not find expected ':'
Summary: 1 resource found in 1 file - Valid: 0, Invalid: 0, Errors: 1, Skipped: 0

That shouldn't happen though as helm lint says it is fine.

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

1 participant