diff --git a/charts/hub-credits/Chart.yaml b/charts/hub-credits/Chart.yaml index 6afea0b..aa00caa 100644 --- a/charts/hub-credits/Chart.yaml +++ b/charts/hub-credits/Chart.yaml @@ -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 diff --git a/charts/hub-credits/templates/credit-sheet-cm.yaml b/charts/hub-credits/templates/credit-sheet-cm.yaml new file mode 100644 index 0000000..74fac2d --- /dev/null +++ b/charts/hub-credits/templates/credit-sheet-cm.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/hub-credits/templates/deployment.yaml b/charts/hub-credits/templates/deployment.yaml index 9574fd8..7734c03 100644 --- a/charts/hub-credits/templates/deployment.yaml +++ b/charts/hub-credits/templates/deployment.yaml @@ -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: @@ -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 }} diff --git a/charts/hub-credits/templates/environment.yaml b/charts/hub-credits/templates/environment.yaml index 03ab2af..b83a3d2 100644 --- a/charts/hub-credits/templates/environment.yaml +++ b/charts/hub-credits/templates/environment.yaml @@ -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 }} diff --git a/charts/hub-credits/values.yaml b/charts/hub-credits/values.yaml index 83f86b2..261dcd9 100644 --- a/charts/hub-credits/values.yaml +++ b/charts/hub-credits/values.yaml @@ -78,6 +78,9 @@ secrets: databaseUrl: "" kafkaPassword: "" +creditSheet: + enabled: true + environment: logLevel: "info" port: 80 @@ -85,3 +88,4 @@ environment: kafkaBrokers: "hub-eventbus-cluster-0.hub-eventbus-cluster.default.svc.cluster.local.:9093" kafkaSsl: false kafkaUsername: "" + creditSheet: "/credit-sheet.toml"