diff --git a/charts/graph-node/templates/deployment.yaml b/charts/graph-node/templates/deployment.yaml index 785faab6f7..0cb64bc6b7 100644 --- a/charts/graph-node/templates/deployment.yaml +++ b/charts/graph-node/templates/deployment.yaml @@ -38,86 +38,3 @@ spec: value: {{ .Values.environment.ethereumNetwork }}:{{ .Values.environment.ethereumRPC }} - name: GRAPH_LOG value: info - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: ipfs - namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }} -spec: - replicas: 1 - selector: - matchLabels: - app: ipfs - template: - metadata: - labels: - app: ipfs - spec: - containers: - - name: ipfs - image: {{ .Values.ipfs.image }}:{{ .Values.ipfs.tag }} - ports: - - containerPort: {{ .Values.ipfs.ports.api | default 5001 }} - volumeMounts: - - name: ipfs-storage - mountPath: /data/ipfs - volumes: - - name: ipfs-storage - persistentVolumeClaim: - claimName: ipfs-pvc - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgres - namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }} -spec: - replicas: 1 - selector: - matchLabels: - app: postgres - template: - metadata: - labels: - app: postgres - spec: - securityContext: - fsGroup: 999 - containers: - - name: postgres - image: {{ .Values.postgres.image }}:{{ .Values.postgres.tag }} - ports: - - containerPort: {{ .Values.postgres.ports.postgres | default 5432 }} - env: - - name: POSTGRES_USER - value: {{ .Values.postgres.user }} - - name: POSTGRES_PASSWORD - value: {{ .Values.postgres.password }} - - name: POSTGRES_DB - value: {{ .Values.postgres.database }} - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - - name: POSTGRES_INITDB_ARGS - value: "--lc-collate=C --lc-ctype=C --encoding=UTF8" - securityContext: - runAsUser: 999 - runAsGroup: 999 - volumeMounts: - - name: postgres-storage - mountPath: /var/lib/postgresql/data - readinessProbe: - exec: - command: ["pg_isready", "-U", "{{ .Values.postgres.user }}"] - initialDelaySeconds: 10 - periodSeconds: 5 - resources: - requests: - cpu: 100m - memory: 256Mi - volumes: - - name: postgres-storage - persistentVolumeClaim: - claimName: postgres-pvc diff --git a/charts/graph-node/templates/ingress.yaml b/charts/graph-node/templates/ingress.yaml index 353af76907..e2d20b99e2 100644 --- a/charts/graph-node/templates/ingress.yaml +++ b/charts/graph-node/templates/ingress.yaml @@ -21,7 +21,7 @@ spec: service: name: graph-node port: - number: 8000 + number: {{ .Values.graphNode.ports.http | default 8000 }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} diff --git a/charts/graph-node/templates/statefulsets.yaml b/charts/graph-node/templates/statefulsets.yaml new file mode 100644 index 0000000000..eea5b50828 --- /dev/null +++ b/charts/graph-node/templates/statefulsets.yaml @@ -0,0 +1,81 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: ipfs + namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + app: ipfs + template: + metadata: + labels: + app: ipfs + spec: + containers: + - name: ipfs + image: {{ .Values.ipfs.image }}:{{ .Values.ipfs.tag }} + ports: + - containerPort: {{ .Values.ipfs.ports.api | default 5001 }} + volumeMounts: + - name: ipfs-storage + mountPath: /data/ipfs + volumes: + - name: ipfs-storage + persistentVolumeClaim: + claimName: ipfs-pvc + +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: postgres + namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + app: postgres + template: + metadata: + labels: + app: postgres + spec: + securityContext: + fsGroup: 999 + containers: + - name: postgres + image: {{ .Values.postgres.image }}:{{ .Values.postgres.tag }} + ports: + - containerPort: {{ .Values.postgres.ports.postgres | default 5432 }} + env: + - name: POSTGRES_USER + value: {{ .Values.postgres.user }} + - name: POSTGRES_PASSWORD + value: {{ .Values.postgres.password }} + - name: POSTGRES_DB + value: {{ .Values.postgres.database }} + - name: PGDATA + value: /var/lib/postgresql/data/pgdata + - name: POSTGRES_INITDB_ARGS + value: "--lc-collate=C --lc-ctype=C --encoding=UTF8" + securityContext: + runAsUser: 999 + runAsGroup: 999 + volumeMounts: + - name: postgres-storage + mountPath: /var/lib/postgresql/data + readinessProbe: + exec: + command: ["pg_isready", "-U", "{{ .Values.postgres.user }}"] + initialDelaySeconds: 10 + periodSeconds: 5 + resources: + requests: + cpu: 100m + memory: 256Mi + volumes: + - name: postgres-storage + persistentVolumeClaim: + claimName: postgres-pvc