{{ range $i ,$version := .Values.replica.versions }} apiVersion: v1 kind: Service metadata: name: service-replica-{{ $version | toString | replace "." "-" }} spec: selector: app.kubernetes.io/name: adguardhome-replica-{{ $version | toString | replace "." "-" }} ports: - protocol: TCP port: 3000 targetPort: 3000 --- {{- end }}