Skip to content

Commit a296b4b

Browse files
committed
Corrected handling of absent configuration ref.
1 parent 73d5430 commit a296b4b

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

src/Contrast.K8s.AgentOperator/Core/State/StateContainerExtensions.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ public static class StateContainerExtensions
1818
var injector = await state.GetById<AgentInjectorResource>(name, @namespace, cancellationToken);
1919
if (injector is { Enabled: true })
2020
{
21-
var configurationReferenceFound = injector.ConfigurationReference is not { } configurationRef
22-
|| await state.ExistsById<AgentConfigurationResource>(
23-
configurationRef.Name,
24-
configurationRef.Namespace,
25-
cancellationToken
26-
);
27-
2821
var connectionResourceFound = injector.ConnectionReference is { } connectionRef
2922
&& await state.GetReadyAgentConnectionById(
3023
connectionRef.Name,
@@ -35,7 +28,7 @@ public static class StateContainerExtensions
3528
var pullSecretFound = injector.ImagePullSecret == null
3629
|| await state.HasSecretKey(injector.ImagePullSecret, cancellationToken);
3730

38-
if (configurationReferenceFound && connectionResourceFound && pullSecretFound)
31+
if (connectionResourceFound && pullSecretFound)
3932
{
4033
return injector;
4134
}

0 commit comments

Comments
 (0)