# limitations under the License. #
################################################################################
{{- $topCtx := . }}
-{{- range keys .Values.e2term }}
-{{- $key := . }}
+{{- range $index, $element := keys .Values.e2term }}
+{{- $key := . }}
{{- with index $topCtx.Values.e2term . }}
---
apiVersion: v1
name: {{ include "common.servicename.e2term.sctp" $topCtx }}-{{ $key }}
namespace: {{ include "common.namespace.platform" $topCtx }}
labels:
- app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}
+ app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }}
release: {{ $topCtx.Release.Name }}
heritage: {{ $topCtx.Release.Service }}
type: NodePort
ports:
- port: {{ include "common.serviceport.e2term.sctp" $topCtx }}
- #nodePort: 32222
+ nodePort: {{ add 32222 $index }}
protocol: "SCTP"
targetPort: {{ include "common.serviceport.e2term.sctp" $topCtx }}
- name: "rmrsctp-{{ $key }}"
+ name: "sctp-{{ $key }}"
selector:
- app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}
+ app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
release: {{ $topCtx.Release.Name }}
{{- end }}
{{- end }}