Skip to content

Commit

Permalink
fix injector ValidateKubernetesAppID
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet committed Oct 18, 2021
1 parent 6c8db44 commit 2173a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/injector/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"github.com/pkg/errors"
"regexp"
"strings"
)

// The consts and vars beginning with dns* were taken from: https://github.com/kubernetes/apimachinery/blob/fc49b38c19f02a58ebc476347e622142f19820b9/pkg/util/validation/validation.go
Expand All @@ -21,12 +20,7 @@ func ValidateKubernetesAppID(appID string) error {
if appID == "" {
return errors.New("value for the rusi.io/app-id annotation is empty")
}
r := isDNS1123Label(appID)
if len(r) == 0 {
return nil
}
s := fmt.Sprintf("invalid app id(input: %s): %s", appID, strings.Join(r, ","))
return errors.New(s)
return nil
}

// The function was taken as-is from: https://github.com/kubernetes/apimachinery/blob/fc49b38c19f02a58ebc476347e622142f19820b9/pkg/util/validation/validation.go
Expand Down
1 change: 1 addition & 0 deletions pkg/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func NewRuntime(ctx context.Context, config Config, api runtime_api.Api,
}

//block until config arrives
klog.InfoS("waiting for configuration")
rt := &runtime{
api: api,
ctx: ctx,
Expand Down

0 comments on commit 2173a40

Please sign in to comment.