From 0f1c16fd071c70215eed25fa45ecce4803c83d72 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Thu, 28 Mar 2024 09:38:29 +0000 Subject: [PATCH] Fix label and name reference in charts Label and full name hard-coded as this chart is standalone. Issue-ID: NONRTRIC-965 Change-Id: I173cf2e4e2658aa37126336e356282ccf6faebc0 Signed-off-by: aravind.est --- .../hello-world-sme-invoker/templates/deployment.yaml | 8 +++----- .../hello-world-sme-invoker/templates/service.yaml | 6 ++---- .../hello-world-sme-invoker/values.yaml | 2 +- .../hello-world/hello-world-chart/templates/deployment.yaml | 10 ++++------ .../hello-world/hello-world-chart/templates/service.yaml | 8 +++----- sample-services/hello-world/hello-world-chart/values.yaml | 4 ++-- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/deployment.yaml b/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/deployment.yaml index 9a31fba1..bbf621a2 100644 --- a/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/deployment.yaml +++ b/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/deployment.yaml @@ -21,18 +21,16 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "hello-world-sme-invoker.fullname" . }} - labels: - {{- include "hello-world-sme-invoker.labels" . | nindent 4 }} + name: hello-world-sme-invoker-deployment spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "hello-world-sme-invoker.selectorLabels" . | nindent 8 }} + app: hello-world-sme-invoker-container template: metadata: labels: - {{- include "hello-world-sme-invoker.selectorLabels" . | nindent 12 }} + app: hello-world-sme-invoker-container spec: containers: - name: {{ .Chart.Name }} diff --git a/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/service.yaml b/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/service.yaml index 9d214953..ffd039a8 100644 --- a/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/service.yaml +++ b/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/templates/service.yaml @@ -21,9 +21,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "hello-world-sme-invoker.fullname" . }} - labels: - {{- include "hello-world-sme-invoker.labels" . | nindent 4 }} + name: hello-world-sme-invoker-service spec: type: {{ .Values.service.type }} ports: @@ -32,5 +30,5 @@ spec: protocol: TCP name: http selector: - {{- include "hello-world-sme-invoker.selectorLabels" . | nindent 4 }} + app: hello-world-sme-invoker-container diff --git a/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/values.yaml b/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/values.yaml index 16957caa..94c3b4f0 100644 --- a/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/values.yaml +++ b/sample-services/hello-world-sme-invoker/hello-world-sme-invoker/values.yaml @@ -21,7 +21,7 @@ image: # use a released image (and port number) if one is available, or use a local/staging image in a development environment repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-sample-helloworld-sme-invoker - tag: latest + tag: 0.1.0 service: name: hello-world-sme-invoker diff --git a/sample-services/hello-world/hello-world-chart/templates/deployment.yaml b/sample-services/hello-world/hello-world-chart/templates/deployment.yaml index 57f53579..8b408ec3 100644 --- a/sample-services/hello-world/hello-world-chart/templates/deployment.yaml +++ b/sample-services/hello-world/hello-world-chart/templates/deployment.yaml @@ -2,7 +2,7 @@ # ========================LICENSE_START================================= # O-RAN-SC # %% -# Copyright (C) 2023: OpenInfra Foundation Europe +# Copyright (C) 2023-2024: OpenInfra Foundation Europe # %% # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,18 +21,16 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "hello-world-chart.fullname" . }} - labels: - {{- include "hello-world-chart.labels" . | nindent 4 }} + name: hello-world-chart-deployment spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "hello-world-chart.selectorLabels" . | nindent 8 }} + app: hello-world-chart-container template: metadata: labels: - {{- include "hello-world-chart.selectorLabels" . | nindent 12 }} + app: hello-world-chart-container spec: containers: - name: {{ .Chart.Name }} diff --git a/sample-services/hello-world/hello-world-chart/templates/service.yaml b/sample-services/hello-world/hello-world-chart/templates/service.yaml index d5b9f5d4..9fa5e7a0 100644 --- a/sample-services/hello-world/hello-world-chart/templates/service.yaml +++ b/sample-services/hello-world/hello-world-chart/templates/service.yaml @@ -2,7 +2,7 @@ # ========================LICENSE_START================================= # O-RAN-SC # %% -# Copyright (C) 2023: OpenInfra Foundation Europe +# Copyright (C) 2023-2024: OpenInfra Foundation Europe # %% # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,9 +21,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "hello-world-chart.fullname" . }} - labels: - {{- include "hello-world-chart.labels" . | nindent 4 }} + name: hello-world-chart-service spec: type: {{ .Values.service.type }} ports: @@ -32,5 +30,5 @@ spec: protocol: TCP name: http selector: - {{- include "hello-world-chart.selectorLabels" . | nindent 4 }} + app: hello-world-chart-container diff --git a/sample-services/hello-world/hello-world-chart/values.yaml b/sample-services/hello-world/hello-world-chart/values.yaml index d9aba221..3feff4cd 100644 --- a/sample-services/hello-world/hello-world-chart/values.yaml +++ b/sample-services/hello-world/hello-world-chart/values.yaml @@ -2,7 +2,7 @@ # ========================LICENSE_START================================= # O-RAN-SC # %% -# Copyright (C) 2023: OpenInfra Foundation Europe +# Copyright (C) 2023-2024: OpenInfra Foundation Europe # %% # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ image: # use a released image (and port number) if one is available, or use a local/staging image in a development environment. repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-sample-helloworld - tag: latest + tag: 0.1.0 service: name: hello-world -- 2.16.6