change name
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: fastapi-k8s-app
|
||||
name: mark-word-fastapi
|
||||
description: A Helm chart for deploying FastAPI application on Kubernetes
|
||||
version: 0.1.0 # Chart 版本
|
||||
appVersion: "1.0.0" # 应用版本,通常与镜像版本关联
|
||||
@@ -1,7 +1,7 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "fastapi-k8s-app.name" -}}
|
||||
{{- define "mark-word-fastapi.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
@@ -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 "fastapi-k8s-app.fullname" -}}
|
||||
{{- define "mark-word-fastapi.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
|
||||
{{/*
|
||||
Create chart name and version as part of the label.
|
||||
*/}}
|
||||
{{- define "fastapi-k8s-app.chart" -}}
|
||||
{{- define "mark-word-fastapi.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "fastapi-k8s-app.labels" -}}
|
||||
helm.sh/chart: {{ include "fastapi-k8s-app.chart" . }}
|
||||
{{ include "fastapi-k8s-app.selectorLabels" . }}
|
||||
{{- define "mark-word-fastapi.labels" -}}
|
||||
helm.sh/chart: {{ include "mark-word-fastapi.chart" . }}
|
||||
{{ include "mark-word-fastapi.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
@@ -45,7 +45,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "fastapi-k8s-app.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "fastapi-k8s-app.name" . }}
|
||||
{{- define "mark-word-fastapi.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "mark-word-fastapi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
@@ -1,18 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "fastapi-k8s-app.fullname" . }}
|
||||
name: {{ include "mark-word-fastapi.fullname" . }}
|
||||
labels:
|
||||
{{- include "fastapi-k8s-app.labels" . | nindent 4 }}
|
||||
{{- include "mark-word-fastapi.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "fastapi-k8s-app.selectorLabels" . | nindent 6 }}
|
||||
{{- include "mark-word-fastapi.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "fastapi-k8s-app.selectorLabels" . | nindent 8 }}
|
||||
{{- include "mark-word-fastapi.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "fastapi-k8s-app.fullname" . }}
|
||||
name: {{ include "mark-word-fastapi.fullname" . }}
|
||||
labels:
|
||||
{{- include "fastapi-k8s-app.labels" . | nindent 4 }}
|
||||
{{- include "mark-word-fastapi.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
@@ -12,4 +12,4 @@ spec:
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "fastapi-k8s-app.selectorLabels" . | nindent 4 }}
|
||||
{{- include "mark-word-fastapi.selectorLabels" . | nindent 4 }}
|
||||
Reference in New Issue
Block a user