apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this name: '[CustomNoUpgrade] Route' crd: route-CustomNoUpgrade.crd.yaml tests: onCreate: - name: Should be able to create a minimal Route initial: | apiVersion: route.openshift.io/v1 kind: Route spec: to: kind: Service name: foo expected: | apiVersion: route.openshift.io/v1 kind: Route spec: to: kind: Service name: foo weight: 100 wildcardPolicy: None - name: 'cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow' initial: | apiVersion: route.openshift.io/v1 kind: Route spec: to: kind: Service name: foo tls: termination: passthrough insecureEdgeTerminationPolicy: Allow expectedError: 'cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow' - name: 'spec.tls.termination: passthrough is compatible with spec.tls.insecureEdgeTerminationPolicy: Redirect' initial: | apiVersion: route.openshift.io/v1 kind: Route spec: host: test.foo to: kind: Service name: foo tls: termination: passthrough insecureEdgeTerminationPolicy: Redirect expected: | apiVersion: route.openshift.io/v1 kind: Route spec: host: test.foo to: kind: Service name: foo weight: 100 tls: termination: passthrough insecureEdgeTerminationPolicy: Redirect wildcardPolicy: None - name: 'spec.tls.termination: passthrough is compatible with spec.tls.insecureEdgeTerminationPolicy: None' initial: | apiVersion: route.openshift.io/v1 kind: Route spec: host: test.foo to: kind: Service name: foo tls: termination: passthrough insecureEdgeTerminationPolicy: None expected: | apiVersion: route.openshift.io/v1 kind: Route spec: host: test.foo to: kind: Service name: foo weight: 100 tls: termination: passthrough insecureEdgeTerminationPolicy: None wildcardPolicy: None - name: 'cannot have both spec.tls.certificate and spec.tls.externalCertificate' initial: | apiVersion: route.openshift.io/v1 kind: Route spec: to: kind: Service name: foo tls: termination: edge key: |- -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE KEY----- certificate: |- -----BEGIN CERTIFICATE----- -----END CERTIFICATE----- externalCertificate: name: "my-local-secret" expectedError: 'Invalid value: "object": cannot have both spec.tls.certificate and spec.tls.externalCertificate'