fix tls and key secrets

This commit is contained in:
2026-02-25 21:17:00 -06:00
parent 97b6c45bc0
commit 3779cdc379
4 changed files with 13 additions and 6 deletions
+2
View File
@@ -20,6 +20,8 @@ spec:
envFrom:
- secretRef:
name: api-env-secret
- secretRef:
name: optima-keys-secret
ports:
- containerPort: 3000
imagePullSecrets:
+2 -1
View File
@@ -4,7 +4,8 @@ metadata:
name: optima-api-ingress
namespace: optima
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
tls:
- secretName: osdci-net-cert
+2
View File
@@ -16,6 +16,8 @@ spec:
envFrom:
- secretRef:
name: api-env-secret
- secretRef:
name: optima-keys-secret
restartPolicy: Never
imagePullSecrets:
- name: github-container-registry
+7 -5
View File
@@ -26,21 +26,23 @@ export const refreshTokenDuration = "30d";
const isProduction = process.env.NODE_ENV === "production";
const readKeyFile = (path: string) => readFileSync(path).toString();
export const accessTokenPrivateKey = isProduction
? process.env.ACCESS_TOKEN_PRIVATE_KEY!
: readFileSync(`.accessToken.key`).toString();
: readKeyFile(`.accessToken.key`);
export const refreshTokenPrivateKey = isProduction
? process.env.REFRESH_TOKEN_PRIVATE_KEY!
: readFileSync(`.refreshToken.key`).toString();
: readKeyFile(`.refreshToken.key`);
export const permissionsPrivateKey = isProduction
? process.env.PERMISSIONS_PRIVATE_KEY!
: readFileSync(`.permissions.key`).toString();
: readKeyFile(`.permissions.key`);
export const secureValuesPrivateKey = isProduction
? process.env.SECURE_VALUES_PRIVATE_KEY!
: readFileSync(`.secureValues.key`).toString();
: readKeyFile(`.secureValues.key`);
export const secureValuesPublicKey = isProduction
? process.env.SECURE_VALUES_PUBLIC_KEY!
: readFileSync(`public-keys/.secureValues.pub`).toString();
: readKeyFile(`public-keys/.secureValues.pub`);
// Microsoft Auth Constants
const msalConfig: msal.Configuration = {