Auto restart one password custom resource will be be added to converted kubernetes secret

This commit is contained in:
jillianwilson
2021-03-02 16:59:21 -04:00
parent 8635be0cab
commit d98f9172a0
8 changed files with 59 additions and 26 deletions

View File

@@ -1,5 +1,10 @@
package utils
import (
"strconv"
"strings"
)
func ContainsString(slice []string, s string) bool {
for _, item := range slice {
if item == s {
@@ -18,3 +23,11 @@ func RemoveString(slice []string, s string) (result []string) {
}
return
}
func StringToBool(str string) (bool, error) {
restartDeploymentBool, err := strconv.ParseBool(strings.ToLower(str))
if err != nil {
return false, err
}
return restartDeploymentBool, nil
}