diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c5285a..0cb0dac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog +### Version 0.0.5 + +#### feature +* PR [#12](https://github.com/petercort/FBF-Event-Buddy/pull/12) - Update 2 + + + ### Version 0.0.4 #### bugfix diff --git a/config/event-buddy-deployment.yaml b/config/event-buddy-deployment.yaml index b0b5cb9..0e6cb74 100644 --- a/config/event-buddy-deployment.yaml +++ b/config/event-buddy-deployment.yaml @@ -14,18 +14,18 @@ spec: app: event-buddy spec: containers: - - image: ghcr.io/petercort/event-buddy:0.0.4 - name: event-buddy - ports: - - containerPort: 80 - volumeMounts: - - name: azure-secrets-store - mountPath: "/mnt/secrets-store" - readOnly: true - volumes: - - name: azure-secrets-store - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - volumeAttributes: - secretProviderClass: "sc-demo-keyvault-csi" + - image: ghcr.io/petercort/event-buddy:0.0.5 + name: event-buddy + ports: + - containerPort: 80 + volumeMounts: + - name: azure-secrets-store + mountPath: "/mnt/secrets-store" + readOnly: true + volumes: + - name: azure-secrets-store + csi: + driver: secrets-store.csi.k8s.io + readOnly: true + volumeAttributes: + secretProviderClass: "sc-demo-keyvault-csi" diff --git a/src/app.js b/src/app.js index 19984fe..84b51b8 100644 --- a/src/app.js +++ b/src/app.js @@ -6,14 +6,19 @@ require('dotenv').config() const { EventsTable } = require('./dbObjects.js'); const { exec } = require('node:child_process'); const { execute } = require('./commands/utility/create_event.js'); -const { discordToken } = process.env; +const discordToken = fs.readFileSync("/mnt/secrets-store/discordToken", 'utf8'); const client = new Client({ intents: [GatewayIntentBits.Guilds] }); // in events table we have // name, description, location, link, registration_url, event_guide, discipline, date, distances - +try { + const discordToken2 = fs.readFileSync("/mnt/secrets-store/discordToken", 'utf8'); + console.log(discordToken2); +} catch (err) { + console.error(err); +} client.commands = new Collection(); const foldersPath = path.join(__dirname, 'commands'); diff --git a/src/commands.js b/src/commands.js index fbf5256..018a655 100644 --- a/src/commands.js +++ b/src/commands.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const path = require('node:path'); const discordToken = fs.readFileSync("/mnt/secrets-store/discordToken", 'utf8'); const guildId = fs.readFileSync("/mnt/secrets-store/guildId", 'utf8'); -const appId = fs.readFileSync("/mnt/secrets-store/APPID", 'utf8'); +const appId = fs.readFileSync("/mnt/secrets-store/appId", 'utf8'); const commands = []; // Grab all the command folders from the commands directory you created earlier