Actually the code I pointed at _is_ the swagger-codegen generated client.
I have got a very small wrapper around it:
```
listService :: (MonadIO m, MonadCatch m, MonadReader Config m, MonadLog Text m) =>
Text
-> m ServiceList.ServiceList
listService labelSelector = namespacedF $ \namespace -> Kube.listNamespacedService namespace Nothing (Just labelSelector) Nothing Nothing Nothing Nothing
listSecret :: (MonadIO m, MonadThrow m, MonadReader Config m, MonadLog Text m) =>
Text
-> m SecretList.SecretList
listSecret labelSelector = namespacedF $ \namespace -> Kube.listNamespacedSecret namespace Nothing (Just labelSelector) Nothing Nothing Nothing Nothing
namespacedF :: (MonadIO m, MonadThrow m, MonadReader Config m, MonadLog Text m) =>
NamespacedF model
-> m model
namespacedF f = do
config <- ask
result <- let
baseUrl = apiEndpoint config
tlsSettings = Base.tlsSettings baseUrl (credentials config)
kubeNamespace = namespace config
in do
manager <- liftIO $ newManager $ (mkManagerSettings tlsSettings Nothing)
{
managerModifyRequest = \req ->
return req {
checkResponse = \req res -> do
Text.IO.hPutStrLn stderr (Text.pack (show req))
responseMessage <- showResponse res
Text.IO.hPutStrLn stderr responseMessage
return ()
}
}
liftIO $ runExceptT $ f kubeNamespace manager baseUrl
either throwM return result
```
I call them like:
```
do
let Just agentId = ...
selector = "agentId" <> "=" <> agentId
logMessage $ "listSecret selector: '" <> selector <> "'"
secretList <- listSecret selector
```
`logMessage` gives a literal equals sign in both cases.
`Text.IO.hPutStrLn stderr (Text.pack (show req))` from namespacedF gives `%3D` and `%!D(MISSING)` depending on which function I call.
From what I understand this is definitely happening on the client side. Do you still think a tcpdump might be worth it?
```
listSecret selector: 'agentId=b49d4406-8020-44e6-7788-6f92d5c0e732'
Request {
host = "192.168.99.100"
port = 8443
secure = True
requestHeaders = [("Accept","application/json")]
path = "/api/v1/namespaces/default/secrets"
queryString = "?labelSelector=agentId%!D(MISSING)b49d4406-8020-44e6-7788-6f92d5c0e732"
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
```
```
listService selector: 'agentId=24f99a4b-1682-44da-7ba4-dba935d107d2'
Request {
host = "192.168.99.100"
port = 8443
secure = True
requestHeaders = [("Accept","application/json")]
path = "/api/v1/namespaces/default/services"
queryString = "?labelSelector=agentId%3D24f99a4b-1682-44da-7ba4-dba935d107d2"
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
```
Thanks for the time you already invested. I am completely puzzled because I see no chance how the code could behave as it does. (From my experience that points out I am looking at the wrong place ;) )
Best
Jan