Skip to content

Commit

Permalink
add index ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
nickkounz committed Aug 18, 2022
1 parent 54c03d8 commit a1c5103
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/graphprotocol-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: graphprotocol-node
description: A Helm chart for Graph Protocol Nodes
type: application
version: 0.1.7
version: 0.1.8
keywords:
- graphprotocol
- ethereum
Expand Down
38 changes: 38 additions & 0 deletions charts/graphprotocol-node/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,41 @@ spec:
servicePort: graphql-ws
{{- end }}
{{- end }}

---
{{- if .Values.ingressIndex.enabled -}}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ include "graphprotocol-node.fullname" . }}-index
labels:
{{- include "graphprotocol-node.labels" . | nindent 4 }}
{{- with .Values.ingressIndex.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingressIndex.tls }}
tls:
{{- range .Values.ingressIndex.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingressIndex.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "graphprotocol-node.fullname" $ }}
port:
number: 8030
{{- end }}
{{- end }}
23 changes: 23 additions & 0 deletions charts/graphprotocol-node/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,29 @@
}
}
},
"ingressIndex": {
"type": "object",
"required": [
"enabled",
"annotations",
"hosts",
"tls"
],
"properties": {
"enabled": {
"type": "boolean"
},
"annotations": {
"type": "object"
},
"hosts": {
"type": "array"
},
"tls": {
"type": "array"
}
}
},
"ingressWebsocket": {
"type": "object",
"required": [
Expand Down
12 changes: 12 additions & 0 deletions charts/graphprotocol-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ ingressRpc:
# hosts:
# - chart-example.local

ingressIndex:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
# - host: chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

ingressWebsocket:
enabled: false
annotations: {}
Expand Down

0 comments on commit a1c5103

Please sign in to comment.