-
Notifications
You must be signed in to change notification settings - Fork 198
feat(kiali): Standardize Certificate Authority Configuration Method #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pkg/kiali/config_test.go
Outdated
| // Create a config file with absolute path | ||
| configFile := filepath.Join(s.tempDir, "config.toml") | ||
| // Convert backslashes to forward slashes for TOML compatibility on Windows | ||
| caFileForTOML := filepath.ToSlash(s.caFile) | ||
| configContent := ` | ||
| [toolset_configs.kiali] | ||
| url = "https://kiali.example/" | ||
| certificate_authority = "` + caFileForTOML + `" | ||
| ` | ||
| err := os.WriteFile(configFile, []byte(configContent), 0644) | ||
| s.Require().NoError(err, "Failed to write config file") | ||
|
|
||
| // Read config - Read() automatically sets the config directory path | ||
| cfg, err := config.Read(configFile) | ||
| s.Require().NoError(err, "Failed to read config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be replaced with the logic we have in place for other tests e.g.
kubernetes-mcp-server/pkg/kiali/kiali_test.go
Lines 31 to 35 in 8d76426
| s.Config = test.Must(config.ReadToml([]byte(` | |
| [toolset_configs.kiali] | |
| url = "https://kiali.example/" | |
| insecure = true | |
| `))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
Yes please, The idea is to replace the inline CA by path |
aljesusg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good only this 2 minor things, I am going to test it locally
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Signed-off-by: josunect <[email protected]>
Co-authored-by: Alberto Gutierrez <[email protected]> Signed-off-by: josunect <[email protected]>
manusa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
This PR keeps the inline option for back-comp, but I can remove it if it is not required.
How to manually test it:
echo | openssl s_client -showcerts -connect kiali-istio-system.apps-crc.testing:443 2>/dev/null | openssl x509 > /tmp/kiali.crtConfiguration (Using a kiali https route):
Run the MCP server: