mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
Signed-off-by: Damien Degois <damien@degois.info> Co-authored-by: shuting <shuting@nirmata.com>
15 lines
394 B
Go
15 lines
394 B
Go
package globalcontext
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-logr/logr"
|
|
kyvernov2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1"
|
|
)
|
|
|
|
// Validate checks global context entry is valid
|
|
func Validate(ctx context.Context, logger logr.Logger, gctx *kyvernov2alpha1.GlobalContextEntry) ([]string, error) {
|
|
var warnings []string
|
|
errs := gctx.Validate()
|
|
return warnings, errs.ToAggregate()
|
|
}
|