Skip to content

Commit

Permalink
Break horizon resources into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
travertischio committed Oct 22, 2024
1 parent 0919a5d commit b657a3e
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 87 deletions.
2 changes: 2 additions & 0 deletions charts/horizon/templates/core-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.ingest.enabled }}
---
apiVersion: v1
kind: ConfigMap
Expand All @@ -12,3 +13,4 @@ metadata:
data:
stellar-core.cfg: |
{{ include "core.config" . | indent 4 }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/horizon/templates/ingest-core-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.ingest.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.fullname" . }}-ingest-core
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "common.fullname" . }}-ingest-core
chart: {{ template "common.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- name: core
port: 11626
targetPort: 11626
selector:
app: {{ template "common.fullname" . }}-ingest
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,3 @@ spec:
port:
number: 80
{{- end }}
{{- if and .Values.web.enabled .Values.web.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "common.fullname" . }}-web
namespace: {{ .Release.Namespace }}
{{- if .Values.web.ingress.annotations }}
annotations:
{{- range $key, $value := .Values.web.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
tls:
- secretName: {{ template "common.fullname" . }}-web-cert
hosts:
- {{ .Values.web.ingress.host }}
rules:
- host: {{ .Values.web.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "common.fullname" . }}-web
port:
number: 80
{{- end }}
21 changes: 21 additions & 0 deletions charts/horizon/templates/ingest-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.ingest.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.fullname" . }}-ingest
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "common.fullname" . }}-ingest
chart: {{ template "common.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- name: horizon
port: 80
targetPort: {{ .Values.ingest.config.port }}
selector:
app: {{ template "common.fullname" . }}-ingest
{{- end }}
38 changes: 0 additions & 38 deletions charts/horizon/templates/ingest-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,42 +107,4 @@ spec:
requests:
storage: {{ .Values.ingest.persistence.size | quote }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.fullname" . }}-ingest-core
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "common.fullname" . }}-ingest-core
chart: {{ template "common.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- name: core
port: 11626
targetPort: 11626
selector:
app: {{ template "common.fullname" . }}-ingest
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.fullname" . }}-ingest
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "common.fullname" . }}-ingest
chart: {{ template "common.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- name: horizon
port: 80
targetPort: {{ .Values.ingest.horizonConfig.port | default 8000 }}
selector:
app: {{ template "common.fullname" . }}-ingest
{{- end }}
19 changes: 0 additions & 19 deletions charts/horizon/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,4 @@ spec:
resources:
{{ toYaml .Values.web.resources | indent 10 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.fullname" . }}-web
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "common.fullname" . }}-web
chart: {{ template "common.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- name: core
port: 80
targetPort: {{ .Values.web.horizonConfig.port | default 8000 }}
selector:
app: {{ template "common.fullname" . }}-web
{{- end }}
30 changes: 30 additions & 0 deletions charts/horizon/templates/web-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if and .Values.web.enabled .Values.web.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "common.fullname" . }}-web
namespace: {{ .Release.Namespace }}
{{- if .Values.web.ingress.annotations }}
annotations:
{{- range $key, $value := .Values.web.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
tls:
- secretName: {{ template "common.fullname" . }}-web-cert
hosts:
- {{ .Values.web.ingress.host }}
rules:
- host: {{ .Values.web.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "common.fullname" . }}-web
port:
number: 80
{{- end }}
21 changes: 21 additions & 0 deletions charts/horizon/templates/web-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.web.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.fullname" . }}-web
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "common.fullname" . }}-web
chart: {{ template "common.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- name: core
port: 80
targetPort: {{ .Values.web.config.port }}
selector:
app: {{ template "common.fullname" . }}-web
{{- end }}

0 comments on commit b657a3e

Please sign in to comment.