suite: Test Services templates: - service.yaml tests: - it: should render webhook-server service with default webhookPort if metrics.enabled = false set: metrics.enabled: false asserts: - equal: path: spec.ports[0] value: name: webhook-server port: 443 protocol: TCP targetPort: 9443 - it: should render webhook-server service with custom webhookPort if metrics.enabled = false set: metrics.enabled: false webhookPort: 9000 asserts: - equal: path: spec.ports[0] value: name: webhook-server port: 443 protocol: TCP targetPort: 9000 - it: should render webhook-server and webhook-metrics services with default webhookPort and metrics.port, if metrics.enabled = true set: metrics.enabled: true asserts: - equal: path: spec.ports[0] value: name: webhook-server port: 443 protocol: TCP targetPort: 9443 documentIndex: 0 - equal: path: spec.ports[0] value: name: webhook-metrics port: 8443 protocol: TCP targetPort: 8443 documentIndex: 1 - it: should render webhook-server and webhook-metrics services with custom webhookPort and metrics.port, if metrics.enabled = true set: metrics.enabled: true metrics.port: 8000 webhookPort: 9000 asserts: - equal: path: spec.ports[0] value: name: webhook-server port: 443 protocol: TCP targetPort: 9000 documentIndex: 0 - equal: path: spec.ports[0] value: name: webhook-metrics port: 8443 protocol: TCP targetPort: 8000 documentIndex: 1