Several SidecarGateway CRs point to the same Pod
As described in CR SidecarGateway, the podSelector selects the Pods to which the CustomResource SidecarGateway should be applied. 
Two different SidecarGateway CRs might point to the same Pod. That is an invalid configuration and could be detected as follows:
- List the 
SidecarGatewayCustomResources - Example
kubectl get sidecargateways.microgateway.airlock.com NAME STATUS AGE webapp Active 140m webapp2 Error 21m
 - The status 
Errorindicates that something is wrong. - Use 
kubectl describe sidecargateways.microgateway.airlock.comto inspect the status. - Example
kubectl describe sidecargateways.microgateway.airlock.com webapp2 ... ... Status: Conditions: Last Transition Time: 2022-09-13T14:55:26Z Status: True Type: ConfigReferencesLoaded Last Transition Time: 2022-09-13T14:55:26Z Message: The Pod 'webapp-84b785f954-r49wt' is already owned by the SidecarGateway 'webapp' Reason: PodAlreadyOwned Status: False Type: PodsSelected Last Transition Time: 2022-09-13T14:55:26Z Status: True Type: EnvoyConfigSynced Pods: Envoy Config: webapp-84b785f954-r49wt Name: webapp-84b785f954-r49wt Status: Error Events: <none> The
Status.Conditions.Messagefield contains the reason for the issue and says, that already another SidecarGateway is configuring the same Pod.- Adjust the existing 
SidecarGatewayCustomResources which point to the same Pod. - The status of the 
SidecarGatewayCRs has changed toActive. 
Further information and links
Internal links: