Skip to content

Commit

Permalink
regex replace special characters with _
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Dec 12, 2024
1 parent 71bf6e8 commit c7c0905
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/kustomize/base/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ objects:
data:
aws-credentials: ${AWS_CREDENTIALS_EPH}
stringData:
aws-access-key-id: ${AWS_ACCESS_KEY_ID_EPH}
aws-secret-access-key: ${AWS_SECRET_ACCESS_KEY_EPH}
aws-access-key-id: "${AWS_ACCESS_KEY_ID_EPH}"
aws-secret-access-key: "${AWS_SECRET_ACCESS_KEY_EPH}"
- apiVersion: v1
kind: Secret # For ephemeral/local environment only
metadata:
Expand Down
3 changes: 2 additions & 1 deletion koku/koku/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
import logging
import os
import re
import secrets
import sys
from json import JSONDecodeError
Expand Down Expand Up @@ -137,7 +138,7 @@
MIDDLEWARE_TIME_TO_LIVE = ENVIRONMENT.int("MIDDLEWARE_TIME_TO_LIVE", default=900) # in seconds (default = 15 minutes)

DEVELOPMENT = ENVIRONMENT.bool("DEVELOPMENT", default=False)
ORG_ID_SUFFIX = ENVIRONMENT.get_value("ORG_ID_SUFFIX", default="")
ORG_ID_SUFFIX = re.sub("[^a-zA-Z0-9_]", "_", ENVIRONMENT.get_value("ORG_ID_SUFFIX", default=""))
print(f"ORG ID SUFFIX: {ORG_ID_SUFFIX}")
if DEVELOPMENT:
if ORG_ID_SUFFIX in ("_CHANGEME", ""):
Expand Down

0 comments on commit c7c0905

Please sign in to comment.