mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-02-08 13:48:19 +00:00
* Changed: avoid latest image
* Changed: version bump
* Fixed: pull policy
* Removed: specific ci for glue since now it's on by default
* Fixed: don't refresh dependencies
* Changed: testing chart action version update
* Fixed: action
* Changed: dependency updates required
* Fixed: lint and install
* Revert "Changed: dependency updates required"
This reverts commit 34ee22d7d0
.
* Changed: use copy of dep charts because ththey may become unavailable
* Changed: updated readme
47 lines
1.9 KiB
YAML
47 lines
1.9 KiB
YAML
{{- if and (eq .Values.architecture "replicaset") .Values.externalAccess.enabled }}
|
|
{{- $fullName := include "mongodb.fullname" . }}
|
|
{{- $replicaCount := .Values.replicaCount | int }}
|
|
{{- $root := . }}
|
|
|
|
{{- range $i, $e := until $replicaCount }}
|
|
{{- $targetPod := printf "%s-%d" (printf "%s" $fullName) $i }}
|
|
{{- $_ := set $ "targetPod" $targetPod }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ $fullName }}-{{ $i }}-external
|
|
namespace: {{ include "mongodb.namespace" $ }}
|
|
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
|
app.kubernetes.io/component: mongodb
|
|
pod: {{ $targetPod }}
|
|
{{- if $root.Values.externalAccess.service.annotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" $root.Values.externalAccess.service.annotations "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ $root.Values.externalAccess.service.type }}
|
|
{{- if eq $root.Values.externalAccess.service.type "LoadBalancer" }}
|
|
{{- if not (empty $root.Values.externalAccess.service.loadBalancerIPs) }}
|
|
loadBalancerIP: {{ index $root.Values.externalAccess.service.loadBalancerIPs $i }}
|
|
{{- end }}
|
|
{{- if $root.Values.externalAccess.service.loadBalancerSourceRanges }}
|
|
loadBalancerSourceRanges: {{- toYaml $root.Values.externalAccess.service.loadBalancerSourceRanges | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
publishNotReadyAddresses: true
|
|
ports:
|
|
- name: {{ $root.Values.service.portName }}
|
|
port: {{ $root.Values.externalAccess.service.port }}
|
|
{{- if not (empty $root.Values.externalAccess.service.nodePorts) }}
|
|
nodePort: {{ index $root.Values.externalAccess.service.nodePorts $i }}
|
|
{{- else }}
|
|
nodePort: null
|
|
{{- end }}
|
|
targetPort: mongodb
|
|
selector: {{- include "common.labels.matchLabels" $ | nindent 4 }}
|
|
app.kubernetes.io/component: mongodb
|
|
statefulset.kubernetes.io/pod-name: {{ $targetPod }}
|
|
---
|
|
{{- end }}
|
|
{{- end }}
|