Skip to content

Commit 04cd8bb

Browse files
authored
Merge pull request #120 from holaplex/espi/polygon-indexer
Polygon deployment indexer
2 parents e39d4ef + e535923 commit 04cd8bb

File tree

5 files changed

+79
-23
lines changed

5 files changed

+79
-23
lines changed

charts/hub-nfts-polygon/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type: application
1818
# This is the chart version. This version number should be incremented each time you make changes
1919
# to the chart and its templates, including the app version.
2020
# Versions are expected to follow Semantic Versioning (https://semver.org/)
21-
version: 0.3.0
21+
version: 0.4.0
2222

2323
# This is the version number of the application being deployed. This version number should be
2424
# incremented each time you make changes to the application. Versions are not expected to

charts/hub-nfts-polygon/templates/deployment.yaml renamed to charts/hub-nfts-polygon/templates/consumer.yaml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ metadata:
44
name: {{ include "hub-nfts-polygon.fullname" . }}
55
labels:
66
{{- include "hub-nfts-polygon.labels" . | nindent 4 }}
7+
app.kubernetes.io/component: consumer
78
spec:
89
{{- if not .Values.autoscaling.enabled }}
910
replicas: {{ .Values.replicaCount }}
1011
{{- end }}
1112
selector:
1213
matchLabels:
1314
{{- include "hub-nfts-polygon.selectorLabels" . | nindent 6 }}
15+
app.kubernetes.io/component: consumer
1416
template:
1517
metadata:
1618
{{- with .Values.podAnnotations }}
@@ -19,6 +21,7 @@ spec:
1921
{{- end }}
2022
labels:
2123
{{- include "hub-nfts-polygon.selectorLabels" . | nindent 8 }}
24+
app.kubernetes.io/component: consumer
2225
spec:
2326
{{- with .Values.imagePullSecrets }}
2427
imagePullSecrets:
@@ -40,25 +43,6 @@ spec:
4043
name: {{ include "hub-nfts-polygon.fullname" . }}
4144
resources:
4245
{{- toYaml .Values.resources | nindent 12 }}
43-
{{- if .Values.indexer.enabled }}
44-
- name: {{ .Chart.Name }}-indexer
45-
securityContext:
46-
{{- toYaml .Values.securityContext | nindent 12 }}
47-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
48-
imagePullPolicy: {{ .Values.image.pullPolicy }}
49-
envFrom:
50-
- configMapRef:
51-
name: {{ include "hub-nfts-polygon.fullname" . }}
52-
- secretRef:
53-
name: {{ include "hub-nfts-polygon.fullname" . }}
54-
command: ["/usr/local/bin/holaplex-hub-nfts-polygon-indexer"]
55-
ports:
56-
- name: http
57-
containerPort: {{ .Values.environment.port }}
58-
protocol: TCP
59-
resources:
60-
{{- toYaml .Values.resources | nindent 12 }}
61-
{{- end }}
6246
{{- with .Values.nodeSelector }}
6347
nodeSelector:
6448
{{- toYaml . | nindent 8 }}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{{- if .Values.indexer.enabled }}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "hub-nfts-polygon.fullname" . }}-indexer
6+
labels:
7+
{{- include "hub-nfts-polygon.labels" . | nindent 4 }}
8+
app.kubernetes.io/component: indexer
9+
spec:
10+
{{- if not .Values.autoscaling.enabled }}
11+
replicas: {{ .Values.replicaCount }}
12+
{{- end }}
13+
selector:
14+
matchLabels:
15+
{{- include "hub-nfts-polygon.selectorLabels" . | nindent 6 }}
16+
app.kubernetes.io/component: indexer
17+
template:
18+
metadata:
19+
{{- with .Values.podAnnotations }}
20+
annotations:
21+
{{- toYaml . | nindent 8 }}
22+
{{- end }}
23+
labels:
24+
{{- include "hub-nfts-polygon.selectorLabels" . | nindent 8 }}
25+
app.kubernetes.io/component: indexer
26+
spec:
27+
{{- with .Values.imagePullSecrets }}
28+
imagePullSecrets:
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
serviceAccountName: {{ include "hub-nfts-polygon.serviceAccountName" . }}
32+
securityContext:
33+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
34+
containers:
35+
- name: indexer
36+
securityContext:
37+
{{- toYaml .Values.securityContext | nindent 12 }}
38+
{{- with .Values.indexer.image }}
39+
image: "{{ .repository }}:{{ .tag }}"
40+
imagePullPolicy: {{ .pullPolicy }}
41+
{{- end }}
42+
envFrom:
43+
- configMapRef:
44+
name: {{ include "hub-nfts-polygon.fullname" . }}
45+
- secretRef:
46+
name: {{ include "hub-nfts-polygon.fullname" . }}
47+
ports:
48+
- name: http
49+
containerPort: {{ .Values.environment.port }}
50+
protocol: TCP
51+
resources:
52+
{{- toYaml .Values.resources | nindent 12 }}
53+
{{- with .Values.nodeSelector }}
54+
nodeSelector:
55+
{{- toYaml . | nindent 8 }}
56+
{{- end }}
57+
{{- with .Values.affinity }}
58+
affinity:
59+
{{- toYaml . | nindent 8 }}
60+
{{- end }}
61+
{{- with .Values.tolerations }}
62+
tolerations:
63+
{{- toYaml . | nindent 8 }}
64+
{{- end }}
65+
{{- end }}

charts/hub-nfts-polygon/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: {{ include "hub-nfts-polygon.fullname" . }}
55
labels:
66
{{- include "hub-nfts-polygon.labels" . | nindent 4 }}
7+
app.kubernetes.io/component: indexer
78
spec:
89
type: {{ .Values.service.type }}
910
ports:
@@ -13,3 +14,4 @@ spec:
1314
name: http
1415
selector:
1516
{{- include "hub-nfts-polygon.selectorLabels" . | nindent 4 }}
17+
app.kubernetes.io/component: indexer

charts/hub-nfts-polygon/values.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ migrate:
1111
# Overrides the image tag whose default is the chart appVersion.
1212
tag: "latest"
1313

14+
indexer:
15+
enabled: false
16+
image:
17+
repository: holaplex/hub-nfts-polygon-indexer
18+
pullPolicy: IfNotPresent
19+
# Overrides the image tag whose default is the chart appVersion.
20+
tag: "latest"
21+
1422
image:
1523
repository: holaplex/hub-nfts-polygon
1624
pullPolicy: IfNotPresent
@@ -86,9 +94,6 @@ tolerations: []
8694

8795
affinity: {}
8896

89-
indexer:
90-
enabled: true
91-
9297
secrets:
9398
enabled: true
9499
entries:

0 commit comments

Comments
 (0)