diff --git a/charts/library/common-test/tests/service/external_ip_test.yaml b/charts/library/common-test/tests/service/external_ip_test.yaml index a9e179be610..9a025a6fbcf 100644 --- a/charts/library/common-test/tests/service/external_ip_test.yaml +++ b/charts/library/common-test/tests/service/external_ip_test.yaml @@ -122,14 +122,15 @@ tests: equal: path: metadata.labels value: - kubernetes.io/service-name: test-release-name-common-test - app.kubernetes.io/name: common-test + app: common-test-1.0.0 app.kubernetes.io/instance: test-release-name app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: common-test app.kubernetes.io/version: *appVer - helm.sh/chart: common-test-1.0.0 + endpointslice.kubernetes.io/managed-by: Helm helm-revision: "0" - app: common-test-1.0.0 + helm.sh/chart: common-test-1.0.0 + kubernetes.io/service-name: test-release-name-common-test release: test-release-name - documentIndex: *endpointSliceDoc equal: @@ -152,6 +153,8 @@ tests: value: - addresses: - 1.1.1.1 + conditions: + ready: true - it: should pass with type ExternalIP and https and useSlice explicitly set to true set: @@ -201,9 +204,25 @@ tests: value: - addresses: - 1.1.1.1 + conditions: + ready: true - documentIndex: &serviceDoc 0 isKind: of: Service + - documentIndex: *endpointSliceDoc + equal: + path: metadata.labels + value: + app: common-test-1.0.0 + app.kubernetes.io/instance: test-release-name + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: common-test + app.kubernetes.io/version: *appVer + endpointslice.kubernetes.io/managed-by: Helm + helm-revision: "0" + helm.sh/chart: common-test-1.0.0 + kubernetes.io/service-name: test-release-name-common-test + release: test-release-name - it: should pass with type ExternalIP and useSlice set to false set: diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index da27edc1991..6b31c6f81a4 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -37,4 +37,4 @@ sources: - https://hub.docker.com/_/ - https://hub.docker.com/r/mikefarah/yq type: library -version: 28.26.2 +version: 28.26.3 diff --git a/charts/library/common/templates/class/_endpointSlice.tpl b/charts/library/common/templates/class/_endpointSlice.tpl index a2f23620314..49d3f493815 100644 --- a/charts/library/common/templates/class/_endpointSlice.tpl +++ b/charts/library/common/templates/class/_endpointSlice.tpl @@ -28,6 +28,7 @@ metadata: namespace: {{ include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $rootCtx "objectData" $objectData "caller" "Endpoint Slice") }} {{- $labels := (mustMerge ($objectData.labels | default dict) (include "tc.v1.common.lib.metadata.allLabels" $rootCtx | fromYaml)) -}} {{- $_ := set $labels "kubernetes.io/service-name" $objectData.name -}} + {{- $_ := set $labels "endpointslice.kubernetes.io/managed-by" "Helm" -}} {{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $rootCtx "labels" $labels) | trim) }} labels: {{- . | nindent 4 }} diff --git a/charts/library/common/templates/lib/endpointSlice/_endpoints.tpl b/charts/library/common/templates/lib/endpointSlice/_endpoints.tpl index 38d81e5180d..506b6e2e68e 100644 --- a/charts/library/common/templates/lib/endpointSlice/_endpoints.tpl +++ b/charts/library/common/templates/lib/endpointSlice/_endpoints.tpl @@ -18,4 +18,6 @@ objectData: The object data of the service {{- end }} - addresses: - {{ tpl $objectData.externalIP $rootCtx }} + conditions: + ready: true {{- end -}}