Skip to content

Commit

Permalink
Merge pull request #59 from holaplex/espi/credits-credit-sheet
Browse files Browse the repository at this point in the history
[Hub Credits] Credit Sheet
  • Loading branch information
kespinola authored May 3, 2023
2 parents d1c9085 + 0ffbb25 commit 19aaab7
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/hub-credits/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
25 changes: 25 additions & 0 deletions charts/hub-credits/templates/credit-sheet-cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- with .Values.creditSheet }}
{{- if .enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "hub-credits.fullname" $ }}-credit-sheet
data:
credit-sheet.toml: |-
[MintEdition]
solana = 5
polygon = 10
[CreateDrop]
solana = 5
polygon = 15
[RetryMint]
solana = 5
polygon = 10
[TransferAsset]
solana = 5
polygon = 10
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/hub-credits/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
serviceAccountName: {{ include "hub-credits.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
- name: credit-sheet
configMap:
name: {{ include "hub-credits.fullname" . }}-credit-sheet
containers:
- name: app
securityContext:
Expand All @@ -52,6 +56,10 @@ spec:
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: credit-sheet
mountPath: /credit-sheet.toml
subPath: credit-sheet.toml
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
1 change: 1 addition & 0 deletions charts/hub-credits/templates/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ data:
KAFKA_BROKERS: {{ required "must set kafka brokers" .kafkaBrokers | quote }}
KAFKA_SSL: {{ default "false" .kafkaSsl | quote }}
KAFKA_USERNAME: {{ required "must set kafka username" .kafkaUsername | quote }}
CREDIT_SHEET: {{ required "must set credit sheet path" .creditSheet | quote }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/hub-credits/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ secrets:
databaseUrl: ""
kafkaPassword: ""

creditSheet:
enabled: true

environment:
logLevel: "info"
port: 80
giftAmount: "1000"
kafkaBrokers: "hub-eventbus-cluster-0.hub-eventbus-cluster.default.svc.cluster.local.:9093"
kafkaSsl: false
kafkaUsername: ""
creditSheet: "/credit-sheet.toml"

0 comments on commit 19aaab7

Please sign in to comment.