Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow external cardano-wallet (tls) and cardano-db-sync #856

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

womfoo
Copy link
Contributor

@womfoo womfoo commented May 27, 2024

Overview

Screenshots

Checklists

Pre-submit checklist:

  • Self-reviewed the diff
  • New code has proper comments/documentation/tests
  • Any changes not covered by tests have been tested manually
  • The README files are updated
  • If new libraries are included, they have licenses compatible with our project
  • If there is a db migration altering existing tables, there is a proper migration test

Pre-merge checklist:

  • Commits have useful messages
  • Review clarifications made it into the code

Copy link

github-actions bot commented May 27, 2024

Unit Test Results

289 tests  ±0   288 ✔️ ±0   23s ⏱️ -1s
  36 suites ±0       1 💤 ±0 
  36 files   ±0       0 ±0 

Results for commit 0ccfa70. ± Comparison against base commit 94a31c5.

♻️ This comment has been updated with latest results.

@atala-dev
Copy link
Contributor

atala-dev commented May 27, 2024

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors
✅ REPOSITORY dustilock yes no
✅ REPOSITORY git_diff yes no
❌ REPOSITORY grype yes 1
⚠️ REPOSITORY kics yes 47
✅ REPOSITORY syft yes no
✅ REPOSITORY trivy-sbom yes no
⚠️ REPOSITORY trufflehog yes 1

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@womfoo womfoo force-pushed the external-cardano-wallet-db-sync branch from 9b1a053 to 8e8c8d1 Compare May 27, 2024 08:31
Copy link
Contributor

@yshyn-iohk yshyn-iohk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but I cannot test it by reading ;)

@womfoo
Copy link
Contributor Author

womfoo commented May 27, 2024

Adding diffs from
values config:

$ diff -u before-values.yaml after-values.yaml
--- before-values.yaml
+++ after-values.yaml
@@ -2,12 +2,13 @@
   enabled: true
   applicationUrls:
   - legacy-preprod.atalaprism.io
   platformIngressUrl: internal-useast1-sjd4e.atalaprism.io
   consumers: ["key1"]
 secrets:
   secretStore: prism-v2-dev-sjd4e-us-east-1-externalsecrets
   dockerRegistryToken: dev-sjd4e-argocd-github-docker-registry-token
+  cardanoWallet: dev-sjd4e-demeter-preprod-v14-wallet
+  cardanoDbSync: dev-sjd4e-demeter-preprod-v14-dbsync
 server:
   image:
     version: "v1.4.0"
@@ -17,6 +18,9 @@
     AUTH_ENABLED: true
     AUTH_TOKENS: c0aXYu6PaLqGtZUuzeoc6wLETf74wjlKqixjM
 vdr:
-  cardanoNamespace: cardano-stack
-  cardanoWallet: dev-sjd4e-cardano-wallet
-  cardanoNode: atala-cardano-dev-sjd4e-preprod
+  externalResources:
+    db_sync:
+      host: dbsync-v3.demeter.run
+      database: dbsync-preprod
+    wallet:
+      host: 8090-cardano-wallet-preprod-bdj2f7.workloads-m1.demeter.run

and rendered helm:

$ diff -u before-helm.yaml after-helm.yaml
--- before-helm.yaml
+++ after-helm.yaml
+---                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               20:29:57 [41/987]
+# Source: prism-node/templates/configmap-nginx.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: wallet-nginx-proxy
+data:
+  server-block.conf: |
+    server {
+      listen 8080;
+      location / {
+        resolver 8.8.8.8;
+        proxy_pass https://8090-cardano-wallet-preprod-bdj2f7.workloads-m1.demeter.run$uri$is_args$args;
+      }
+    }
@@ -371,43 +386,39 @@
           - name: NODE_CARDANO_CONFIRMATION_BLOCKS
             value: "1"
           - name: NODE_CARDANO_WALLET_API_HOST
-            value: "atala-cardano-dev-sjd4e-preprod.cardano-stack"
+            value: "legacy-prism-preprod-wallet"
           - name: NODE_CARDANO_WALLET_ID
             valueFrom:
               secretKeyRef:
-                name: "atala-cardano-dev-sjd4e-preprod-dev-sjd4e-cardano-wallet"
-                key: wallet_id
+                name: "dev-sjd4e-demeter-preprod-v14-wallet"
+                key: id
                 optional: false
           - name: NODE_CARDANO_WALLET_PASSPHRASE
             valueFrom:
               secretKeyRef:
-                name: "atala-cardano-dev-sjd4e-preprod-dev-sjd4e-cardano-wallet"
+                name: "dev-sjd4e-demeter-preprod-v14-wallet"
                 key: passphrase
                 optional: false
           - name: NODE_CARDANO_WALLET_API_PORT
-            value: "8090"
+            value: "80"
           - name: NODE_CARDANO_PAYMENT_ADDRESS
-            valueFrom:
-              secretKeyRef:
-                name: "atala-cardano-dev-sjd4e-preprod-dev-sjd4e-cardano-wallet"
-                key: address
-                optional: false
+            value: ""
           - name: NODE_CARDANO_DB_SYNC_USERNAME
             valueFrom:
               secretKeyRef:
-                name: "legacy-prism-preprod.cardano.atala-cardano-dev-sjd4e-preprod-postgres-cluster.credentials.postgresql.acid.zalan.do"
+                name: "dev-sjd4e-demeter-preprod-v14-dbsync"
                 key: username
                 optional: false
           - name: NODE_CARDANO_DB_SYNC_PASSWORD
             valueFrom:
               secretKeyRef:
-                name: "legacy-prism-preprod.cardano.atala-cardano-dev-sjd4e-preprod-postgres-cluster.credentials.postgresql.acid.zalan.do"
+                name: "dev-sjd4e-demeter-preprod-v14-dbsync"
                 key: password
                 optional: false
           - name: NODE_CARDANO_DB_SYNC_DATABASE
-            value: "cardano"
+            value: "dbsync-preprod"
           - name: NODE_CARDANO_DB_SYNC_HOST
-            value: "atala-cardano-dev-sjd4e-preprod-postgres-cluster.cardano-stack"
+            value: "dbsync-v3.demeter.run"
           # Prism Node Variables
           - name: NODE_PSQL_USERNAME
             valueFrom:
@@ -546,6 +554,57 @@
     - extract:
         key: dev-sjd4e-argocd-github-docker-registry-token
 ---
+# Source: prism-node/templates/externalsecret.yaml
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  name: "atala-cardano-dev-preprod-dev-k8s-cardano-wallet"
+  namespace: legacy-prism-preprod
+  labels:
+      app.kubernetes.io/part-of: prism-node
+spec:
+  refreshInterval: "0"
+  secretStoreRef:
+    name: prism-v2-dev-sjd4e-us-east-1-externalsecrets
+    kind: ClusterSecretStore
+  dataFrom:
+    - extract:
+        key: dev-k8s-cardano-wallet
+---
+# Source: prism-node/templates/externalsecret.yaml
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  name: "dev-sjd4e-demeter-preprod-v14-wallet"
+  namespace: legacy-prism-preprod
+  labels:
+      app.kubernetes.io/part-of: prism-node
+spec:
+  refreshInterval: "0"
+  secretStoreRef:
+    name: prism-v2-dev-sjd4e-us-east-1-externalsecrets
+    kind: ClusterSecretStore
+  dataFrom:
+    - extract:
+        key: "dev-sjd4e-demeter-preprod-v14-wallet"
+---
+# Source: prism-node/templates/externalsecret.yaml
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  name: "dev-sjd4e-demeter-preprod-v14-dbsync"
+  namespace: legacy-prism-preprod
+  labels:
+      app.kubernetes.io/part-of: prism-node
+spec:
+  refreshInterval: "0"
+  secretStoreRef:
+    name: prism-v2-dev-sjd4e-us-east-1-externalsecrets
+    kind: ClusterSecretStore
+  dataFrom:
+    - extract:
+        key: "dev-sjd4e-demeter-preprod-v14-dbsync"
+---
 # Source: prism-node/templates/postgresql.yaml
 apiVersion: "acid.zalan.do/v1"
 kind: postgresql

Signed-off-by: Kranium Gikos Mendoza <kraniumgikos.mendoza@iohk.io>
@womfoo womfoo force-pushed the external-cardano-wallet-db-sync branch from 84f995c to 0ccfa70 Compare June 7, 2024 12:46
@Dale-iohk
Copy link

@womfoo womfoo merged commit 2fbaa3d into main Jun 20, 2024
4 of 5 checks passed
@womfoo womfoo deleted the external-cardano-wallet-db-sync branch June 20, 2024 10:21
atala-dev added a commit that referenced this pull request Jul 4, 2024
# [2.5.0](v2.4.1...v2.5.0) (2024-07-04)

### Features

* allow external cardano-wallet and cardano-db-sync ([#856](#856)) ([2fbaa3d](2fbaa3d))
* bump lint action versions ([#864](#864)) ([7bf57d9](7bf57d9))
* temporarily test release on self hosted ([#860](#860)) ([114a204](114a204))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants