mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
Fix conflict issue
Signed-off-by: Yuvraj <yuvraj.yad001@gmail.com>
This commit is contained in:
parent
2a356d1c46
commit
43a9139303
3 changed files with 1 additions and 41 deletions
|
@ -102,27 +102,6 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
func init() {
|
||||
// arguments
|
||||
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
|
||||
err := flag.Set("logtostderr", "true")
|
||||
if err != nil {
|
||||
glog.Errorf("failed to set flag %v", err)
|
||||
}
|
||||
err = flag.Set("stderrthreshold", "WARNING")
|
||||
if err != nil {
|
||||
glog.Errorf("failed to set flag %v", err)
|
||||
}
|
||||
err = flag.Set("v", "2")
|
||||
if err != nil {
|
||||
glog.Errorf("failed to set flag %v", err)
|
||||
}
|
||||
flag.Parse()
|
||||
}
|
||||
>>>>>>> 010bc2b43d99e27daf8709baca5b02ac5ca10011
|
||||
|
||||
func removeWebhookIfExists(client *client.Client, kind string, name string) error {
|
||||
logger := log.Log.WithName("removeExistingWebhook").WithValues("kind", kind, "name", name)
|
||||
var err error
|
||||
|
|
|
@ -71,25 +71,6 @@ var (
|
|||
//VerifyMutatingWebhookServicePath is the path for verify webhook(used to veryfing if admission control is enabled and active)
|
||||
VerifyMutatingWebhookServicePath = "/verifymutate"
|
||||
)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
//LogDefaultFlags sets default glog flags
|
||||
func LogDefaultFlags() {
|
||||
var err error
|
||||
err = flag.Set("logtostderr", "true")
|
||||
if err != nil {
|
||||
glog.Fatalf("failed to set flag 'logtostderr' to 'true':%v", err)
|
||||
}
|
||||
err = flag.Set("stderrthreshold", "WARNING")
|
||||
if err != nil {
|
||||
glog.Fatalf("failed to set flag 'stderrthreshold' to 'WARNING':%v", err)
|
||||
}
|
||||
err = flag.Set("v", "2")
|
||||
if err != nil {
|
||||
glog.Fatalf("failed to set flag 'v' to '2':%v", err)
|
||||
}
|
||||
}
|
||||
>>>>>>> 010bc2b43d99e27daf8709baca5b02ac5ca10011
|
||||
|
||||
//CreateClientConfig creates client config
|
||||
func CreateClientConfig(kubeconfig string, log logr.Logger) (*rest.Config, error) {
|
||||
|
|
|
@ -34,7 +34,7 @@ func applyPolicy(policy kyverno.ClusterPolicy, resource unstructured.Unstructure
|
|||
ctx := context.NewContext()
|
||||
err = ctx.AddResource(transformResource(resource))
|
||||
if err != nil {
|
||||
glog.Errorf("enable to add transform resource to ctx: %v", err)
|
||||
logger.Error(err, "enable to add transform resource to ctx")
|
||||
}
|
||||
//MUTATION
|
||||
engineResponse, err = mutation(policy, resource, ctx, logger)
|
||||
|
|
Loading…
Reference in a new issue