From 9afe0592783b3541ba16a3a1be5dbb39329b2927 Mon Sep 17 00:00:00 2001 From: Niall Thomson Date: Thu, 14 Nov 2024 20:50:22 -0700 Subject: [PATCH] Changed helm chart naming to facilitate publishing --- deploy/kubernetes/charts/assets/Chart.yaml | 2 +- deploy/kubernetes/charts/assets/templates/_helpers.tpl | 6 +++--- deploy/kubernetes/charts/assets/templates/deployment.yaml | 2 +- deploy/kubernetes/charts/carts/Chart.yaml | 2 +- deploy/kubernetes/charts/carts/templates/_helpers.tpl | 6 +++--- deploy/kubernetes/charts/carts/templates/deployment.yaml | 2 +- deploy/kubernetes/charts/catalog/Chart.yaml | 2 +- deploy/kubernetes/charts/catalog/templates/_helpers.tpl | 6 +++--- deploy/kubernetes/charts/catalog/templates/deployment.yaml | 2 +- deploy/kubernetes/charts/checkout/Chart.yaml | 2 +- deploy/kubernetes/charts/checkout/templates/_helpers.tpl | 6 +++--- deploy/kubernetes/charts/checkout/templates/deployment.yaml | 2 +- deploy/kubernetes/charts/orders/Chart.yaml | 2 +- deploy/kubernetes/charts/orders/templates/_helpers.tpl | 6 +++--- deploy/kubernetes/charts/orders/templates/deployment.yaml | 2 +- deploy/kubernetes/charts/ui/Chart.yaml | 2 +- deploy/kubernetes/charts/ui/templates/_helpers.tpl | 6 +++--- deploy/kubernetes/charts/ui/templates/deployment.yaml | 2 +- 18 files changed, 30 insertions(+), 30 deletions(-) diff --git a/deploy/kubernetes/charts/assets/Chart.yaml b/deploy/kubernetes/charts/assets/Chart.yaml index 06f61f345..d5b153aa4 100644 --- a/deploy/kubernetes/charts/assets/Chart.yaml +++ b/deploy/kubernetes/charts/assets/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: assets +name: retail-store-sample-assets-chart description: A Helm chart for the AWS retail store containers sample application assets service type: application version: 0.8.3 diff --git a/deploy/kubernetes/charts/assets/templates/_helpers.tpl b/deploy/kubernetes/charts/assets/templates/_helpers.tpl index d6b371665..9daab9ea4 100644 --- a/deploy/kubernetes/charts/assets/templates/_helpers.tpl +++ b/deploy/kubernetes/charts/assets/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "assets.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- default "assets" .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -15,7 +15,7 @@ If release name contains chart name it will be used as a full name. {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default "assets" .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} @@ -28,7 +28,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "assets.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" "assets" .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* diff --git a/deploy/kubernetes/charts/assets/templates/deployment.yaml b/deploy/kubernetes/charts/assets/templates/deployment.yaml index 7b6b5b242..0fde08077 100644 --- a/deploy/kubernetes/charts/assets/templates/deployment.yaml +++ b/deploy/kubernetes/charts/assets/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: {{ "assets" }} envFrom: - configMapRef: name: {{ include "assets.configMapName" . }} diff --git a/deploy/kubernetes/charts/carts/Chart.yaml b/deploy/kubernetes/charts/carts/Chart.yaml index 5780df797..56e6ff9cb 100644 --- a/deploy/kubernetes/charts/carts/Chart.yaml +++ b/deploy/kubernetes/charts/carts/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: carts +name: retail-store-sample-cart-chart description: A Helm chart for the AWS retail store containers sample application carts service type: application version: 0.8.3 diff --git a/deploy/kubernetes/charts/carts/templates/_helpers.tpl b/deploy/kubernetes/charts/carts/templates/_helpers.tpl index 2afa676e7..38397762d 100644 --- a/deploy/kubernetes/charts/carts/templates/_helpers.tpl +++ b/deploy/kubernetes/charts/carts/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "carts.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- default "carts" .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -15,7 +15,7 @@ If release name contains chart name it will be used as a full name. {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default "carts" .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} @@ -28,7 +28,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "carts.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" "carts" .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* diff --git a/deploy/kubernetes/charts/carts/templates/deployment.yaml b/deploy/kubernetes/charts/carts/templates/deployment.yaml index b5c9933f7..2a4640b61 100644 --- a/deploy/kubernetes/charts/carts/templates/deployment.yaml +++ b/deploy/kubernetes/charts/carts/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: {{ "carts" }} env: - name: JAVA_OPTS value: -XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom diff --git a/deploy/kubernetes/charts/catalog/Chart.yaml b/deploy/kubernetes/charts/catalog/Chart.yaml index ec3afdaf6..e6e37242a 100644 --- a/deploy/kubernetes/charts/catalog/Chart.yaml +++ b/deploy/kubernetes/charts/catalog/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: catalog +name: retail-store-sample-catalog-chart description: A Helm chart for the AWS retail store containers sample application catalog service type: application version: 0.8.3 diff --git a/deploy/kubernetes/charts/catalog/templates/_helpers.tpl b/deploy/kubernetes/charts/catalog/templates/_helpers.tpl index 9e6a4430b..d7dc66840 100644 --- a/deploy/kubernetes/charts/catalog/templates/_helpers.tpl +++ b/deploy/kubernetes/charts/catalog/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "catalog.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- default "catalog" .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -15,7 +15,7 @@ If release name contains chart name it will be used as a full name. {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default "catalog" .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} @@ -28,7 +28,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "catalog.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" "catalog" .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* diff --git a/deploy/kubernetes/charts/catalog/templates/deployment.yaml b/deploy/kubernetes/charts/catalog/templates/deployment.yaml index 3477544e4..72d161233 100644 --- a/deploy/kubernetes/charts/catalog/templates/deployment.yaml +++ b/deploy/kubernetes/charts/catalog/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: {{ "catalog" }} env: - name: DB_USER valueFrom: diff --git a/deploy/kubernetes/charts/checkout/Chart.yaml b/deploy/kubernetes/charts/checkout/Chart.yaml index 08f51554c..120d37e6c 100644 --- a/deploy/kubernetes/charts/checkout/Chart.yaml +++ b/deploy/kubernetes/charts/checkout/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: checkout +name: retail-store-sample-checkout-chart description: A Helm chart for the AWS retail store containers sample application checkout service type: application version: 0.8.3 diff --git a/deploy/kubernetes/charts/checkout/templates/_helpers.tpl b/deploy/kubernetes/charts/checkout/templates/_helpers.tpl index 992f33c4a..fccba852e 100644 --- a/deploy/kubernetes/charts/checkout/templates/_helpers.tpl +++ b/deploy/kubernetes/charts/checkout/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "checkout.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- default "checkout" .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -15,7 +15,7 @@ If release name contains chart name it will be used as a full name. {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default "checkout" .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} @@ -28,7 +28,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "checkout.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" "checkout" .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* diff --git a/deploy/kubernetes/charts/checkout/templates/deployment.yaml b/deploy/kubernetes/charts/checkout/templates/deployment.yaml index b747397c4..eda0c45f9 100644 --- a/deploy/kubernetes/charts/checkout/templates/deployment.yaml +++ b/deploy/kubernetes/charts/checkout/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: {{ "checkout" }} envFrom: - configMapRef: name: {{ include "checkout.configMapName" . }} diff --git a/deploy/kubernetes/charts/orders/Chart.yaml b/deploy/kubernetes/charts/orders/Chart.yaml index 64dbb45e5..fd6a5821e 100644 --- a/deploy/kubernetes/charts/orders/Chart.yaml +++ b/deploy/kubernetes/charts/orders/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: orders +name: retail-store-sample-orders-chart description: A Helm chart for the AWS retail store containers sample application orders service type: application version: 0.8.3 diff --git a/deploy/kubernetes/charts/orders/templates/_helpers.tpl b/deploy/kubernetes/charts/orders/templates/_helpers.tpl index 1c5c6c6ae..0a55c2632 100644 --- a/deploy/kubernetes/charts/orders/templates/_helpers.tpl +++ b/deploy/kubernetes/charts/orders/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "orders.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- default "orders" .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -15,7 +15,7 @@ If release name contains chart name it will be used as a full name. {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default "orders" .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} @@ -28,7 +28,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "orders.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" "orders" .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* diff --git a/deploy/kubernetes/charts/orders/templates/deployment.yaml b/deploy/kubernetes/charts/orders/templates/deployment.yaml index f1e4de848..08429bb37 100644 --- a/deploy/kubernetes/charts/orders/templates/deployment.yaml +++ b/deploy/kubernetes/charts/orders/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: {{ "orders" }} env: - name: JAVA_OPTS value: -XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom diff --git a/deploy/kubernetes/charts/ui/Chart.yaml b/deploy/kubernetes/charts/ui/Chart.yaml index b5a7926ce..2f66a5b28 100644 --- a/deploy/kubernetes/charts/ui/Chart.yaml +++ b/deploy/kubernetes/charts/ui/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: ui +name: retail-store-sample-ui-chart description: A Helm chart for the AWS retail store containers sample application UI service type: application version: 0.8.3 diff --git a/deploy/kubernetes/charts/ui/templates/_helpers.tpl b/deploy/kubernetes/charts/ui/templates/_helpers.tpl index 7e7a8fb9a..e40d84dec 100644 --- a/deploy/kubernetes/charts/ui/templates/_helpers.tpl +++ b/deploy/kubernetes/charts/ui/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "ui.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- default "ui" .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -15,7 +15,7 @@ If release name contains chart name it will be used as a full name. {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default "ui" .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} @@ -28,7 +28,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "ui.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" "ui" .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* diff --git a/deploy/kubernetes/charts/ui/templates/deployment.yaml b/deploy/kubernetes/charts/ui/templates/deployment.yaml index 8c35a0084..c4130de6e 100644 --- a/deploy/kubernetes/charts/ui/templates/deployment.yaml +++ b/deploy/kubernetes/charts/ui/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: {{ "ui" }} env: - name: JAVA_OPTS value: -XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom