Skip to content

Commit

Permalink
[BLOCK-2374] create ingress for testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan-Ultra committed Jul 22, 2024
1 parent 7ed9f5d commit 5c52bdf
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/firehose-antelope/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 0.1.0
description: A Helm chart for firehose-antelope components
name: firehose-antelope
type: application
version: 1.1.0
version: 1.1.1

dependencies:
- name: reader-node
Expand Down
46 changes: 46 additions & 0 deletions charts/firehose-antelope/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "firehose-antelope.fullname" . -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "firehose-antelope.labels" . | nindent 4 }}
annotations:
kubernetes.io/ingress.global-static-ip-name: ingress-{{ .Release.Namespace }}
cert-manager.io/cluster-issuer: letsencrypt-prod-dns
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ $fullName }}-{{ .secretName }}
{{- end }}
{{- end }}
{{- with .Values.ingress.url }}
rules:
- host: {{ .substreams }}
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: substreams-tier1
port:
number: 9000
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/firehose-antelope/templates/tls-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "firehose-antelope.fullname" . -}}
{{- $labels := include "firehose-antelope.labels" . -}}

{{- range .Values.ingress.tls }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $fullName }}-{{ .secretName }}
labels:
{{- $labels | nindent 4 }}
type: kubernetes.io/tls
stringData:
tls.key: ""
tls.crt: ""
---
{{- end }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/firehose-antelope/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@ serviceAccount:
writerAnnotations: {}
readerName: ""
readerAnnotations: {}
ingress:
enabled: false
className: ""
annotations: {}
tls: []
url:
substreams:
# Only enable if testing locally
persistentVolumeEnabled: false

0 comments on commit 5c52bdf

Please sign in to comment.