Skip to content

Commit

Permalink
infra: fix blockfrost deployment environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
gytis-ivaskevicius committed May 26, 2023
1 parent faf63dd commit 1ca3c33
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 4 additions & 4 deletions flake.lock

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

Expand Up @@ -35,6 +35,10 @@
port = 3000;
};
};
securityContext = {
runAsUser = 0;
runAsGroup = 0;
};
env = lib.mkPodEnv ({
NETWORK = values.network;
LOGGER_MIN_SEVERITY = "debug";
Expand All @@ -44,27 +48,27 @@
key = "api-key";
};
};
POSTGRES_HOST = values.postgresName;
POSTGRES_PORT = "5432";
POSTGRES_DB = "cardano";
POSTGRES_HOST_DB_SYNC = values.postgresName;
POSTGRES_PORT_DB_SYNC = "5432";
POSTGRES_DB_DB_SYNC = "cardano";
# Actually, we'd need blokfrost-owner-user (for create table)
# and cardano-public-reader-user (for accessing dbsync source data).
# Howerver, quoting https://postgres-operator.readthedocs.io/en/refactoring-sidecars/user/#manifest-roles:
# > At the moment it is not possible to define membership of the manifest role in other roles.
POSTGRES_PASSWORD = {
POSTGRES_PASSWORD_DB_SYNC = {
valueFrom.secretKeyRef = {
name = "cardano-owner-user.${values.postgresName}.credentials.postgresql.acid.zalan.do";
key = "password";
};
};
POSTGRES_USER = {
POSTGRES_USER_DB_SYNC = {
valueFrom.secretKeyRef = {
name = "cardano-owner-user.${values.postgresName}.credentials.postgresql.acid.zalan.do";
key = "username";
};
};
POSTGRES_SSL = "true";
POSTGRES_SSL_CA_FILE = "/tls/ca.crt";
POSTGRES_SSL_DB_SYNC = "true";
POSTGRES_SSL_CA_FILE_DB_SYNC = "/tls/ca.crt";
}
// lib.optionalAttrs (values.blockfrost-worker ? env) values.blockfrost-worker.env);
volumeMounts = [
Expand Down

0 comments on commit 1ca3c33

Please sign in to comment.