We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddcf144 commit 3950809Copy full SHA for 3950809
src/ES.Kubernetes.Reflector.Secrets/FortiMirror.cs
@@ -127,7 +127,10 @@ private async Task OnEvent(WatcherEvent<V1Secret> e)
127
string fortiPassword;
128
try
129
{
130
- var hostSecret = await _apiClient.ReadNamespacedSecretAsync(hostSecretId.Name, hostSecretId.Namespace);
+ var hostSecret = await _apiClient.ReadNamespacedSecretAsync(hostSecretId.Name,
131
+ string.IsNullOrWhiteSpace(hostSecretId.Namespace)
132
+ ? e.Item.Metadata.NamespaceProperty
133
+ : hostSecretId.Namespace);
134
if (hostSecret.Data is null || !hostSecret.Data.Keys.Any())
135
136
_logger.LogWarning("Cannot reflect {secretId} to {hostSecretId}. " +
0 commit comments