umi-mo--chart模版(一)

韵味老鸟 2024-07-08 17:05:04

umi-mo -- chart模版

步骤1:创建业务程序模块样例

如:helm create umi-mo

步骤2:删除charts

rm -rf charts 文件夹,如果不存在相关依赖

步骤3:修改配置文件

#Chart.yaml文件

apiVersion: v2name: umi-modescription: A Helm chart for Kubernetestype: applicationversion: 0.1.0appVersion: 0.0.1

#values.yaml 每个业务程序特性的公共文件,可以配置默认参数,在具体的value-xx.yaml中开启,在发布时更新value-xxx.yaml文件

#名称nameOverride: "umi-mo"fullnameOverride: "umi-mo"#服务service: enabled: true type: ClusterIP ports: - name: http port: 80 targetPort: 80 protocol: TCP#控制器服务 controller: type: deployment image: repository: harbor.umi-meta.com pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" envs: [] replicaCount: 1 imagePullSecrets: - name: meta-harbor persistence: enabled: false volumeMounts: - name: host-time mountPath: /etc/localtime volumes: - name: host-time hostPath: path: /etc/localtime readinessProbe: enabled: true initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 livenessProbe: enabled: true initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 podAnnotations: {} podSecurityContext: {} securityContext: {} resources: {} nodeSelector: {} tolerations: [] affinity: {}config: enabled: falseingress: enabled: true Name: "nginx" annotations: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" nginx.ingress.kubernetes.io/proxy-body-size: 3072m serviceAccount: create: false annotations: {} name: ""autoscaling: enabled: false minReplicas: 1 maxReplicas: 100 targetCPUUtilizationPercentage: 80 targetMemoryUtilizationPercentage: 80testpod: create: false

#根据不同环境,有不同文件,dev/sit/uat/staging/prod等

#values-dev.yaml

cluster: "dev"controller: image: repository: harbor.umi-meta.com/meta/dev/umi-mo tag: "" replicaCount: 1 resources: {} nodeSelector: {} tolerations: [] affinity: {}ingress: hosts: - host: sz-umi-mo-dev.umi-meta.com paths: - path: / pathType: Prefix serviceName: umi-mo servicePort: 80 - path: /admin pathType: Prefix serviceName: umi-admin servicePort: 80 - path: /company pathType: Prefix serviceName: umi-company servicePort: 80 - path: /api pathType: Prefix serviceName: umi-gateway servicePort: 80 tls: - secretName: umi-meta-tls hosts: - sz-umi-mo-dev.umi-meta.com

0 阅读:0