Skip to content

Commit

Permalink
Merge branch 'master' into salka1988/add_update
Browse files Browse the repository at this point in the history
# Conflicts:
#	helm/fuel-subgraph/templates/deployment.yaml
#	helm/fuel-subgraph/templates/service.yaml
#	helm/fuel-subgraph/values.yaml
  • Loading branch information
Salka1988 committed Apr 19, 2024
2 parents 617b16b + 252ed58 commit f52448b
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/helm-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build and publish Helm Chart

on:
push:
branches:
- master
paths:
- "helm/fuel-subgraph/Chart.yaml"
workflow_dispatch:
inputs:
deploy:
description: "deploy: false|true"
required: false

permissions:
contents: read
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
version: "3"
services:
firehose:
build:
context: firehose
ports:
- '10015:10015'
- '10016:10016'
- '10017:10017'
- "10015:10015"
- "10016:10016"
- "10017:10017"
volumes:
- './data/firehose:/data/storage_dir'
command: beta-5.fuel.network
- "./data/firehose:/data/storage_dir"
command: beta-5.fuel.network
84 changes: 84 additions & 0 deletions helm/fuel-subgraph/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "fuel-subgraph.fullname" . }}
labels:
{{- include "fuel-subgraph.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "fuel-subgraph.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "fuel-subgraph.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "fuel-subgraph.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [ "./fuel-subgraph" ]
args:
- "--host"
- "0.0.0.0"
- "--port"
- "8080"
- "--db-path"
- "/mnt/db/db.db3"
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
- name: firehose_port1
containerPort: {{ .Values.firehose.port1 }}
protocol: TCP
- name: firehose_port2
containerPort: {{ .Values.firehose.port2 }}
protocol: TCP
- name: firehose_port3
containerPort: {{ .Values.firehose.port3 }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
volumeMounts:
- name: {{ include "fuel-subgraph.fullname" . }}
mountPath: "/mnt/db"
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: fuel-subgraph-vol
persistentVolumeClaim:
claimName: {{ include "fuel-subgraph.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
25 changes: 25 additions & 0 deletions helm/fuel-subgraph/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: Service
metadata:
name: { { include "fuel-subgraph.fullname" . } }
labels: { { - include "fuel-subgraph.labels" . | nindent 4 } }
spec:
type: { { .Values.service.type } }
ports:
- port: { { .Values.service.port } }
targetPort: http
protocol: TCP
name: http
- port: { { .Values.firehose.port1 } }
targetPort: firehose_port1
protocol: TCP
name: firehose_port1
- port: { { .Values.firehose.port2 } }
targetPort: firehose_port2
protocol: TCP
name: firehose_port2
- port: { { .Values.firehose.port3 } }
targetPort: firehose_port3
protocol: TCP
name: firehose_port3
selector: { { - include "fuel-subgraph.selectorLabels" . | nindent 4 } }
100 changes: 100 additions & 0 deletions helm/fuel-subgraph/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Default values for fuel-subgraph.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: ghcr.io/fuellabs/fuel-subgraph
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

podAnnotations: {}

podSecurityContext:
{}
# fsGroup: 2000

securityContext:
{}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 8080

firehose:
port1: 10015
port2: 10016
port3: 10017

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

resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

affinity: {}

app:
volume:
storageclass: gp3-generic
accessmodes: ReadWriteOnce
storagerequests: 4Gi
serviceMonitor:
enabled: true
prometheusRelease: kube-prometheus

0 comments on commit f52448b

Please sign in to comment.