diff options
| author | Saumit <justsaumit@protonmail.com> | 2025-10-11 02:34:38 +0530 |
|---|---|---|
| committer | Saumit <justsaumit@protonmail.com> | 2025-10-11 02:34:38 +0530 |
| commit | 88a326bacdffde9e065b08ba893a17149584e72e (patch) | |
| tree | 20e380438497afb8c4b33a932505602590721690 /astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-ha-announce-service.yaml | |
| parent | ef773bd27019ec6597bd12237e3b4f4f0f46f244 (diff) | |
platform: Adding argocd helm chart
Diffstat (limited to 'astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-ha-announce-service.yaml')
| -rw-r--r-- | astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-ha-announce-service.yaml | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-ha-announce-service.yaml b/astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-ha-announce-service.yaml new file mode 100644 index 0000000..dc24249 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-ha-announce-service.yaml @@ -0,0 +1,64 @@ +{{- $fullName := include "redis-ha.fullname" . }} +{{- $namespace := .Release.Namespace -}} +{{- $replicas := int (toString .Values.replicas) }} +{{- $root := . }} +{{- range $i := until $replicas }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ $fullName }}-announce-{{ $i }} + namespace: {{ $namespace | quote}} + labels: +{{ include "labels.standard" $root | indent 4 }} + {{- range $key, $value := $root.Values.extraLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + annotations: +{{- if (semverCompare "<=1.10-0" $.Capabilities.KubeVersion.GitVersion) }} + service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" +{{- end }} + {{- if $root.Values.serviceAnnotations }} +{{ toYaml $root.Values.serviceAnnotations | indent 4 }} + {{- end }} +spec: +{{- if (semverCompare ">=1.11-0" $.Capabilities.KubeVersion.GitVersion) }} + publishNotReadyAddresses: true +{{- end }} + type: ClusterIP + ports: + {{- if ne (int $root.Values.redis.port) 0 }} + - name: tcp-server + port: {{ $root.Values.redis.port }} + protocol: TCP + targetPort: redis + {{- end }} + {{- if $root.Values.redis.tlsPort }} + - name: server-tls + port: {{ $root.Values.redis.tlsPort }} + protocol: TCP + targetPort: redis-tls + {{- end }} + {{- if ne (int $root.Values.sentinel.port) 0 }} + - name: tcp-sentinel + port: {{ $root.Values.sentinel.port }} + protocol: TCP + targetPort: sentinel + {{- end }} + {{- if $root.Values.sentinel.tlsPort }} + - name: sentinel-tls + port: {{ $root.Values.sentinel.tlsPort }} + protocol: TCP + targetPort: sentinel-tls + {{- end }} + {{- if $root.Values.exporter.enabled }} + - name: http-exporter + port: {{ $root.Values.exporter.port }} + protocol: TCP + targetPort: {{ $root.Values.exporter.portName }} + {{- end }} + selector: + release: {{ $root.Release.Name }} + app: {{ include "redis-ha.name" $root }} + "statefulset.kubernetes.io/pod-name": {{ $fullName }}-server-{{ $i }} +{{- end }} |
