feat: 初始化 Helm Chart 结构
- 新增 .helmignore 文件,定义打包时忽略的文件模式 - 创建 Chart.yaml,配置 Chart 基本信息 - 重命名部署、Ingress和服务文件,统一到 templates 目录 - 新增 values.yaml,定义默认值和可配置参数
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: consul
|
||||
labels:
|
||||
app: consul
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: consul
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: consul
|
||||
spec:
|
||||
containers:
|
||||
- image: docker.m.daocloud.io/hashicorp/consul:1.20
|
||||
name: badger
|
||||
ports:
|
||||
- containerPort: 8500
|
||||
protocol: TCP
|
||||
- containerPort: 8600
|
||||
protocol: UDP
|
||||
resources:
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "250m"
|
||||
restartPolicy: Always
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: consul-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- consul.kl.suyiiyii.top
|
||||
secretName: consul-tls
|
||||
rules:
|
||||
- host: consul.kl.suyiiyii.top
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: consul
|
||||
port:
|
||||
number: 8500
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: consul-http-ingress
|
||||
spec:
|
||||
rules:
|
||||
- host: consul.kl.suyiiyii.top
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: consul
|
||||
port:
|
||||
number: 8500
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: consul
|
||||
spec:
|
||||
ports:
|
||||
- name: "8500"
|
||||
port: 8500
|
||||
targetPort: 8500
|
||||
- name: "8600"
|
||||
port: 8600
|
||||
protocol: UDP
|
||||
targetPort: 8600
|
||||
selector:
|
||||
app: consul
|
||||
Reference in New Issue
Block a user