Skip to content

Commit

Permalink
changing chart name and apiVersion in secretproviderclass.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
SMANUM committed Nov 13, 2023
1 parent f67c2df commit d6198bb
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: chart-1
name: atm-layer-model
description: |
Helm Chart for Model ATM Layer
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/environments/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for chart-1.
# Default values for atm-layer-model.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand Down
2 changes: 1 addition & 1 deletion helm-chart/environments/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for chart-1.
# Default values for atm-layer-model.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand Down
2 changes: 1 addition & 1 deletion helm-chart/environments/values-uat.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for chart-1.
# Default values for atm-layer-model.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand Down
8 changes: 4 additions & 4 deletions helm-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "chart-1.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "atm-layer-model.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "chart-1.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "chart-1.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "atm-layer-model.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "atm-layer-model.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "chart-1.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "atm-layer-model.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Expand Down
20 changes: 10 additions & 10 deletions helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "chart-1.name" -}}
{{- define "atm-layer-model.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "chart-1.fullname" -}}
{{- define "atm-layer-model.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ 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 "chart-1.chart" -}}
{{- define "atm-layer-model.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "chart-1.labels" -}}
helm.sh/chart: {{ include "chart-1.chart" . }}
{{ include "chart-1.selectorLabels" . }}
{{- define "atm-layer-model.labels" -}}
helm.sh/chart: {{ include "atm-layer-model.chart" . }}
{{ include "atm-layer-model.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "chart-1.selectorLabels" -}}
app.kubernetes.io/name: {{ include "chart-1.name" . }}
{{- define "atm-layer-model.selectorLabels" -}}
app.kubernetes.io/name: {{ include "atm-layer-model.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "chart-1.serviceAccountName" -}}
{{- define "atm-layer-model.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "chart-1.fullname" .) .Values.serviceAccount.name }}
{{- default (include "atm-layer-model.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
App: {{ .Values.deployment.name }}
force-recreate: {{ randAlphaNum 5 | quote }}
spec:
serviceAccountName: {{ include "chart-1.serviceAccountName" . }}
serviceAccountName: {{ include "atm-layer-model.serviceAccountName" . }}
volumes:
- name: secrets-store-inline
csi:
Expand Down
6 changes: 3 additions & 3 deletions helm-chart/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "chart-1.fullname" . }}
name: {{ include "atm-layer-model.fullname" . }}
labels:
{{- include "chart-1.labels" . | nindent 4 }}
{{- include "atm-layer-model.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "chart-1.fullname" . }}
name: {{ include "atm-layer-model.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/secretproviderclass.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
name: {{ .Values.secretProviderClass.name }}
Expand Down
6 changes: 3 additions & 3 deletions helm-chart/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "chart-1.fullname" . }}-test-connection"
name: "{{ include "atm-layer-model.fullname" . }}-test-connection"
labels:
{{- include "chart-1.labels" . | nindent 4 }}
{{- include "atm-layer-model.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "chart-1.fullname" . }}:{{ .Values.service.port }}']
args: ['{{ include "atm-layer-model.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

0 comments on commit d6198bb

Please sign in to comment.