Support getting logs in ns restricted mode (#168)

This commit is contained in:
Igor Gov
2021-08-05 12:12:01 +03:00
committed by GitHub
parent 683d199774
commit 90f0f603c7
9 changed files with 102 additions and 94 deletions

View File

@@ -13,7 +13,9 @@ import (
func FormatError(err error) error {
var errorNew error
if k8serrors.IsForbidden(err) {
errorNew = fmt.Errorf("Insufficient permissions: %w. Supply the required permission or control Mizu's access to namespaces by setting MizuNamespace in the config file or setting the tapped namespace with --set mizu-namespace=<NAMEPSACE>.", err)
errorNew = fmt.Errorf("Insufficient permissions: %w. "+
"Supply the required permission or control Mizu's access to namespaces by setting MizuResourcesNamespace "+
"in the config file or setting the tapped namespace with --set mizu-resources-namespace=<NAMEPSACE>.", err)
} else if syntaxError, isSyntaxError := asRegexSyntaxError(err); isSyntaxError {
errorNew = fmt.Errorf("Regex %s is invalid: %w", syntaxError.Expr, err)
} else {