Skip to content

Commit

Permalink
feat: command update + relayer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisht13 committed Sep 4, 2024
1 parent 2587fc8 commit 54d1526
Show file tree
Hide file tree
Showing 13 changed files with 2,715 additions and 537 deletions.
57 changes: 13 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions kubernetes/cronjob.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: cronjob-service-account
namespace: ar-base-sepolia
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: ar-base-sepolia
name: deployment-restart-role
rules:
- apiGroups: ["apps", "extensions"]
resources: ["deployments"]
verbs: ["get", "list", "watch", "update", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: deployment-restart-rolebinding
namespace: ar-base-sepolia
subjects:
- kind: ServiceAccount
name: cronjob-service-account
namespace: ar-base-sepolia
roleRef:
kind: Role
name: deployment-restart-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: restart-deployment
namespace: ar-base-sepolia
spec:
schedule: "0 * * * *"
jobTemplate:
spec:
template:
spec:
serviceAccountName: cronjob-service-account
containers:
- name: kubectl
image: bitnami/kubectl:latest
command:
- /bin/sh
- -c
- |
kubectl rollout restart deployment relayer-email-auth --namespace ar-base-sepolia
restartPolicy: OnFailure
19 changes: 4 additions & 15 deletions kubernetes/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ data:
IC_REPLICA_URL: ""
JSON_LOGGER: ""
PEM_PATH: ""
SMTP_SERVER: ""

---
apiVersion: v1
Expand All @@ -30,12 +31,6 @@ type: Opaque
data:
PRIVATE_KEY:
DATABASE_URL:
IMAP_DOMAIN_NAME:
IMAP_PORT:
AUTH_TYPE:
SMTP_DOMAIN_NAME:
LOGIN_ID:
LOGIN_PASSWORD:
PROVER_ADDRESS:
ICPEM:

Expand Down Expand Up @@ -94,14 +89,14 @@ spec:
spec:
containers:
- name: relayer-container
image: bisht13/relayer-new-0:latest
image: bisht13/ar-relayer-base-1:latest
ports:
- containerPort: 4500
envFrom:
- configMapRef:
name: relayer-config
name: relayer-config-email-auth
- secretRef:
name: relayer-secret
name: relayer-secret-email-auth
livenessProbe:
httpGet:
path: /api/echo
Expand Down Expand Up @@ -131,12 +126,6 @@ spec:
- secretRef:
name: relayer-imap-secret
volumes:
- name: pem-volume
secret:
secretName: relayer-secret
items:
- key: ICPEM
path: ".ic.pem"
- name: pem-volume
secret:
secretName: relayer-secret-email-auth
Expand Down
4 changes: 2 additions & 2 deletions packages/circuits/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@zk-email/circuits": "^6.1.5",
"@zk-email/zk-regex-circom": "^2.1.0",
"@zk-email/relayer-utils": "^0.3.2",
"@zk-email/relayer-utils": "^0.3.3",
"commander": "^11.0.0",
"snarkjs": "^0.7.0"
},
Expand Down Expand Up @@ -42,4 +42,4 @@
]
]
}
}
}
28 changes: 14 additions & 14 deletions packages/circuits/src/regexes/command.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"parts": [
{
"is_public": false,
"regex_def": "<div id=3D\"zkemail\">"
},
{
"is_public": true,
"regex_def": "[^<>/]+"
},
{
"is_public": false,
"regex_def": "</div>"
}
]
"parts": [
{
"is_public": false,
"regex_def": "(<(=\r\n)?d(=\r\n)?i(=\r\n)?v(=\r\n)? (=\r\n)?i(=\r\n)?d(=\r\n)?=3D(=\r\n)?\"(=\r\n)?[^\"]*(=\r\n)?z(=\r\n)?k(=\r\n)?e(=\r\n)?m(=\r\n)?a(=\r\n)?i(=\r\n)?l(=\r\n)?[^\"]*(=\r\n)?\"(=\r\n)?[^>]*(=\r\n)?>(=\r\n)?)(=\r\n)?"
},
{
"is_public": true,
"regex_def": "[^<>/]+"
},
{
"is_public": false,
"regex_def": "(<(=\r\n)?/(=\r\n)?d(=\r\n)?i(=\r\n)?v(=\r\n)?>)"
}
]
}
Loading

0 comments on commit 54d1526

Please sign in to comment.