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

fix: use cluster name in label selector of service controller #117

Merged
merged 5 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion traefikee/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ icon: https://doc.traefik.io/traefik-enterprise/assets/images/logo-traefik-enter
# Because of https://github.com/helm/helm/issues/3810 the pre-release version suffix has to be define.
# This allows the installation on Kubernetes cluster with a pre-release version (e.g. v1.19.9-gke.1900)
kubeVersion: ">= 1.14.0-0"
version: 3.0.2
version: 3.0.3
NEwa-05 marked this conversation as resolved.
Show resolved Hide resolved
# renovate: image=docker.io/traefik/traefikee
appVersion: v2.10.7
type: application
Expand Down
1 change: 1 addition & 0 deletions traefikee/templates/controller/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ spec:
selector:
app: traefikee
component: controllers
release: {{ .Values.cluster }}
clusterIP: None
publishNotReadyAddresses: true
25 changes: 25 additions & 0 deletions traefikee/tests/controller_svc_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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

NEwa-05 marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 20 additions & 0 deletions traefikee/tests/proxy_service_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 25 additions & 0 deletions traefikee/tests/registry_svc_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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

NEwa-05 marked this conversation as resolved.
Show resolved Hide resolved