diff --git a/traefikee/templates/controller/service.yaml b/traefikee/templates/controller/service.yaml index 4bc7611..8a8c664 100644 --- a/traefikee/templates/controller/service.yaml +++ b/traefikee/templates/controller/service.yaml @@ -17,5 +17,6 @@ spec: selector: app: traefikee component: controllers + release: {{ .Values.cluster }} clusterIP: None publishNotReadyAddresses: true diff --git a/traefikee/tests/controller_svc_test.yaml b/traefikee/tests/controller_svc_test.yaml new file mode 100644 index 0000000..41f3a76 --- /dev/null +++ b/traefikee/tests/controller_svc_test.yaml @@ -0,0 +1,24 @@ +suite: controller service test +templates: + - controller/service.yaml +tests: + - it: should have label selector + set: + cluster: mysupertraefikee + asserts: + - isKind: + of: Service + - isAPIVersion: + of: v1 + - equal: + path: metadata.name + value: mysupertraefikee-ctrl-svc + - equal: + path: spec.selector.app + value: traefikee + - equal: + path: spec.selector.component + value: controllers + - equal: + path: spec.selector.release + value: mysupertraefikee \ No newline at end of file diff --git a/traefikee/tests/proxy_service_test.yaml b/traefikee/tests/proxy_service_test.yaml index 0a51430..64a33dc 100644 --- a/traefikee/tests/proxy_service_test.yaml +++ b/traefikee/tests/proxy_service_test.yaml @@ -66,3 +66,23 @@ tests: - equal: path: spec.loadBalancerIP value: "1.2.3.4" + - it: should have label selector + set: + cluster: mysupertraefikee + asserts: + - isKind: + of: Service + - isAPIVersion: + of: v1 + - equal: + path: metadata.name + value: mysupertraefikee-proxy-svc + - equal: + path: spec.selector.app + value: traefikee + - equal: + path: spec.selector.component + value: proxies + - equal: + path: spec.selector.release + value: mysupertraefikee diff --git a/traefikee/tests/registry_svc_test.yaml b/traefikee/tests/registry_svc_test.yaml new file mode 100644 index 0000000..1859796 --- /dev/null +++ b/traefikee/tests/registry_svc_test.yaml @@ -0,0 +1,24 @@ +suite: registry service test +templates: + - registry/service.yaml +tests: + - it: should have label selector + set: + cluster: mysupertraefikee + asserts: + - isKind: + of: Service + - isAPIVersion: + of: v1 + - equal: + path: metadata.name + value: mysupertraefikee-plugin-registry-svc + - equal: + path: spec.selector.app + value: traefikee + - equal: + path: spec.selector.component + value: registry + - equal: + path: spec.selector.release + value: mysupertraefikee \ No newline at end of file