helm-charts副本循环

 原文:https://*.com/questions/53973887/helm-simple-for-loop

[root@master templates]# ls
headless-srv.yaml  _helpers.tpl  out-srv.yaml  statefulset.yaml  ui-srv.yaml
[root@master templates]# cat out-srv.yaml 
{{- $num := 5 -}}
{{- range $index := untilStep 0 $num 1}}
---
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  selector:
    app: MyApp
    myLabelName: "{{ $index}}-888888"
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9376
{{- end }}

 

上一篇:使用loki+promtail实现云原生日志分析


下一篇:RDKit | 从ChEMBL数据库提取大分子HELM单体(XML转换为DataFrame并搜索部分结构)