Skip to content

Commit

Permalink
Merge branch 'master' into evm_rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Nov 15, 2023
2 parents f69fc07 + fa60fa2 commit 80af9d2
Show file tree
Hide file tree
Showing 52 changed files with 1,417 additions and 559 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ build

# Ignore mkchain generated files
*_values.yaml
*-values.yaml

charts/tezos/charts
127 changes: 0 additions & 127 deletions charts/snapshotEngine/scripts/snapshot-warmer.sh

This file was deleted.

4 changes: 4 additions & 0 deletions charts/snapshotEngine/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ data:
ARCHIVE_SLEEP_DELAY: {{ $.Values.artifactDelay.archive }}
ROLLING_SLEEP_DELAY: {{ $.Values.artifactDelay.rolling }}
SCHEMA_URL: {{ $.Values.schemaUrl }}
S3_BUCKET: {{ $.Values.s3BucketOverride }}
CLOUD_PROVIDER: {{ $.Values.cloudProvider }}
STORAGE_CLASS: {{ $.Values.volumeSnapClass }}
NODES: {{ $.Values.nodes }}
kind: ConfigMap
metadata:
name: snapshot-configmap
Expand Down
47 changes: 0 additions & 47 deletions charts/snapshotEngine/templates/snapshot-warmer.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion charts/snapshotEngine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tezos_k8s_images:

# the tezos version used to run `octez-node snapshot import/export`
images:
octez: tezos/tezos:v16.1
octez: tezos/tezos:v17.1

# snapshotEngine containers interact with the kubernetes control
# plane to create volume snapshots. This requires a special IAM role
Expand Down Expand Up @@ -99,3 +99,5 @@ artifactDelay:

# URL to schema.json file to validate generated metadata against
schemaUrl: "https://oxheadalpha.com/tezos-snapshot-metadata.schema.1.0.json"

s3BucketOverride: ""
4 changes: 2 additions & 2 deletions charts/tezos-faucet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ 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.0
version: 2.0.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
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0
appVersion: 2.0.0
31 changes: 23 additions & 8 deletions charts/tezos-faucet/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
{{- if .Values.enableUI }}
apiVersion: v1
data:
config.json: |
{{ .Values.config | mustToPrettyJson | indent 4 }}
kind: ConfigMap
metadata:
name: faucet-config
namespace: {{ .Release.Namespace }}
data:
config.json: |
{{- $_ := set .Values.config.application "disableChallenges" .Values.disableChallenges }}
{{- $_ := set .Values.config.application "minTez" .Values.minTez }}
{{- $_ := set .Values.config.application "maxTez" .Values.maxTez }}
{{ .Values.config | mustToPrettyJson | indent 4 }}
---
{{- end }}

apiVersion: v1
kind: ConfigMap
metadata:
name: faucet-backend-config
namespace: {{ .Release.Namespace }}
data:
FAUCET_ADDRESS: {{ .Values.config.network.faucetAddress }}
RPC_URL: {{ .Values.config.network.rpcUrl }}
AUTHORIZED_HOST: {{ .Values.authorizedHost }}
FAUCET_AMOUNT_USER: "{{ .Values.config.application.profiles.user.amount}}"
FAUCET_AMOUNT_BAKER: "{{ .Values.config.application.profiles.baker.amount}}"
AUTHORIZED_HOST: "{{ .Values.authorizedHost }}"
DISABLE_CHALLENGES: "{{ .Values.disableChallenges }}"
ENABLE_CAPTCHA: "{{ .Values.enableCaptcha }}"
{{- if .Values.maxBalance }}
MAX_BALANCE: "{{ .Values.maxBalance }}"
{{- end }}
REDIS_URL: "{{ .Values.redis.url }}"
RPC_URL: "{{ .Values.backendRpcUrl | default .Values.config.network.rpcUrl | required "An rpc url is required." }}"
MIN_TEZ: "{{ .Values.minTez }}"
MAX_TEZ: "{{ .Values.maxTez }}"
MIN_CHALLENGES: "{{ .Values.minChallenges }}"
MAX_CHALLENGES: "{{ .Values.maxChallenges }}"
MAX_CHALLENGES_WITH_CAPTCHA: "{{ .Values.maxChallengesWithCaptcha }}"
CHALLENGE_SIZE: "{{ .Values.challengeSize }}"
DIFFICULTY: "{{ .Values.difficulty }}"
86 changes: 59 additions & 27 deletions charts/tezos-faucet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,66 @@ spec:
annotations:
# ensure that the pod bounces each time configmap changes
# https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
restartPolicy: Always
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "tezos-faucet.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- image: {{ .Values.images.tezos_faucet_backend }}
name: faucet-backend
ports:
- name: backend
containerPort: 3000
protocol: TCP
envFrom:
- configMapRef:
- name: faucet-backend
image: {{ .Values.images.tezosFaucetBackend }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
- name: backend
containerPort: 3000
protocol: TCP
envFrom:
- configMapRef:
name: faucet-backend-config
- secretRef:
name: faucet-backend-secret
{{- if .Values.enableUI }}
- name: faucet
image: {{ .Values.images.tezosFaucet }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
- name: frontend
containerPort: 8080
protocol: TCP
volumeMounts:
- name: faucet-config
mountPath: /app/public/config.json
subPath: config.json
readOnly: true
{{- end }}
volumes:
- name: faucet-backend-config
configMap:
name: faucet-backend-config
- secretRef:
name: faucet-backend-secret
- image: {{ .Values.images.tezos_faucet }}
name: faucet
ports:
- name: frontend
containerPort: 8080
protocol: TCP
volumeMounts:
{{- if .Values.enableUI }}
- name: faucet-config
mountPath: "/app/src/config.json"
subPath: "config.json"
readOnly: true
restartPolicy: Always
volumes:
- name: faucet-config
configMap:
name: faucet-config
status: {}
configMap:
name: faucet-config
{{- end }}

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
Loading

0 comments on commit 80af9d2

Please sign in to comment.