-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set correct k8s version in tests and fix secretname in status
Signed-off-by: Felix Breuer <fbreuer@pm.me>
- Loading branch information
1 parent
c61eeae
commit 467023f
Showing
4 changed files
with
98 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package kubernetes | ||
|
||
import ( | ||
"errors" | ||
"strings" | ||
|
||
"k8s.io/apimachinery/pkg/types" | ||
) | ||
|
||
var ErrNamespacedNameSplit = errors.New("unable to decode string into NamespacedName") | ||
|
||
func ToNamespacedName(nnString string) (types.NamespacedName, error) { | ||
splittedNN := strings.Split(nnString, string(types.Separator)) | ||
if len(splittedNN) != 2 { | ||
return types.NamespacedName{}, ErrNamespacedNameSplit | ||
} | ||
|
||
return types.NamespacedName{ | ||
Namespace: splittedNN[0], | ||
Name: splittedNN[1], | ||
}, nil | ||
} |