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