79180198

Date: 2024-11-12 07:44:02
Score: 2.5
Natty:
Report link

@Gakio's solution did not work in werf yaml template (got the error "range can't iterate over ..."). The following improvement helped:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: some-app
  name: some-service
  namespace: some-namespace
spec:
  ports:
  {{ range untilStep 40000 42000 1 }}   # start stop step
  - port: {{ . }}
    targetPort: {{ . }}
    name: exposed-port-{{ . }}
  {{ end }}
  selector:
    app: some-app
  sessionAffinity: None
  type: ClusterIP
Reasons:
  • Blacklisted phrase (1): did not work
  • Has code block (-0.5):
  • User mentioned (1): @Gakio's
  • Low reputation (1):
Posted by: user149598