Skip to content

Commit

Permalink
Fix #2202
Browse files Browse the repository at this point in the history
  • Loading branch information
titilambert authored and Flynn committed Jan 24, 2020
1 parent e9ea054 commit b4c27d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/ambassador/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Config:
ambassador_id: ClassVar[str] = os.environ.get('AMBASSADOR_ID', 'default')
ambassador_namespace: ClassVar[str] = os.environ.get('AMBASSADOR_NAMESPACE', 'default')
single_namespace: ClassVar[bool] = bool(os.environ.get('AMBASSADOR_SINGLE_NAMESPACE'))
certs_single_namespace: ClassVar[bool] = bool(os.environ.get('AMBASSADOR_CERTS_SINGLE_NAMESPACE', os.environ.get('AMBASSADOR_SINGLE_NAMESPACE')))
enable_endpoints: ClassVar[bool] = not bool(os.environ.get('AMBASSADOR_DISABLE_ENDPOINTS'))

StorageByKind: ClassVar[Dict[str, str]] = {
Expand Down
2 changes: 1 addition & 1 deletion python/ambassador/config/resourcefetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def handle_k8s_secret(self, k8s_object: AnyDict) -> HandlerResult:
self.logger.debug("ignoring K8s Secret with no name")
skip = True

if not skip and (Config.single_namespace and (resource_namespace != Config.ambassador_namespace)):
if not skip and (Config.single_namespace and (resource_namespace != Config.ambassador_namespace) and Config.certs_single_namespace):
# This should never happen in actual usage, since we shouldn't be given things
# in the wrong namespace. However, in development, this can happen a lot.
self.logger.debug("ignoring K8s Secret in wrong namespace")
Expand Down

0 comments on commit b4c27d8

Please sign in to comment.