From fb9170ec5bc403b81b44724e8b1e053aa84394bd Mon Sep 17 00:00:00 2001 From: chemavx Date: Sat, 20 Jun 2026 10:16:24 +0000 Subject: [PATCH] Add bot-secrets InfisicalStaticSecret + bot-config ConfigMap (parallel, polymarket-bot 3a) Co-Authored-By: Claude Opus 4.8 --- polymarket-bot/configmap-bot-config.yaml | 14 +++++++++++ polymarket-bot/infisical-bot-secrets.yaml | 30 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 polymarket-bot/configmap-bot-config.yaml create mode 100644 polymarket-bot/infisical-bot-secrets.yaml diff --git a/polymarket-bot/configmap-bot-config.yaml b/polymarket-bot/configmap-bot-config.yaml new file mode 100644 index 0000000..342244f --- /dev/null +++ b/polymarket-bot/configmap-bot-config.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: bot-config + namespace: polymarket-bot +# Non-secret config split out of the old bot-secrets Secret. PAPER_* are plain +# operating params; WALLET_PRIVATE_KEY and COINGECKO_API_KEY are kept here as +# empty placeholders (preserving the "present-but-empty" env semantics the bot +# was started with — avoids a KeyError if the code reads them unconditionally). +data: + PAPER_BANKROLL: "10000" + PAPER_MODE: "true" + WALLET_PRIVATE_KEY: "" + COINGECKO_API_KEY: "" diff --git a/polymarket-bot/infisical-bot-secrets.yaml b/polymarket-bot/infisical-bot-secrets.yaml new file mode 100644 index 0000000..41a1529 --- /dev/null +++ b/polymarket-bot/infisical-bot-secrets.yaml @@ -0,0 +1,30 @@ +apiVersion: secrets.infisical.com/v1beta1 +kind: InfisicalStaticSecret +metadata: + name: bot-secrets + namespace: polymarket-bot +spec: + # Shared, read-only machine identity (no write grant, no PushSecret). + infisicalAuthRef: + name: infisical-auth + namespace: infisical-operator + sources: + # App-specific secrets (4): DATABASE_URL, POLYMARKET_API_KEY/SECRET/PASSPHRASE + - projectId: 17e98e9d-70f5-43d1-8382-7da818dfcdd0 # project "homelab" + environmentSlug: prod + secretPath: /polymarket-bot + # Telegram (2): TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID — reused from the shared + # /telegram path (deduplicated; same token as the other 5 namespaces). + - projectId: 17e98e9d-70f5-43d1-8382-7da818dfcdd0 + environmentSlug: prod + secretPath: /telegram + syncOptions: + refreshInterval: 60s + targets: + - kind: Secret + name: bot-secrets-infisical # parallel name — old bot-secrets stays live until 3c + namespace: polymarket-bot + creationPolicy: Owner + # key passthrough: synced Secret carries all 6 keys verbatim. + # PAPER_* and the empty WALLET_PRIVATE_KEY/COINGECKO_API_KEY are config, + # not secrets — they live in the bot-config ConfigMap, not here.