mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-16 20:48:42 +00:00
- update install_debug.yaml - add debug log
This commit is contained in:
parent
999c91d9d9
commit
6d49a728a1
7 changed files with 10 additions and 10 deletions
|
@ -125,8 +125,3 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
data:
|
data:
|
||||||
AnyValue: {}
|
AnyValue: {}
|
||||||
---
|
|
||||||
kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: "kyverno"
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
// HandleMutation handles mutating webhook admission request
|
// HandleMutation handles mutating webhook admission request
|
||||||
func (ws *WebhookServer) HandleMutation(request *v1beta1.AdmissionRequest) *v1beta1.AdmissionResponse {
|
func (ws *WebhookServer) HandleMutation(request *v1beta1.AdmissionRequest) *v1beta1.AdmissionResponse {
|
||||||
|
|
||||||
glog.V(3).Infof("Handling mutation for Kind=%s, Namespace=%s Name=%s UID=%s patchOperation=%s",
|
glog.V(4).Infof("Receive request in mutating webhook: Kind=%s, Namespace=%s Name=%s UID=%s patchOperation=%s",
|
||||||
request.Kind.Kind, request.Namespace, request.Name, request.UID, request.Operation)
|
request.Kind.Kind, request.Namespace, request.Name, request.UID, request.Operation)
|
||||||
|
|
||||||
policies, err := ws.policyLister.List(labels.NewSelector())
|
policies, err := ws.policyLister.List(labels.NewSelector())
|
||||||
|
|
|
@ -33,6 +33,8 @@ func NewWebhookRegistrationClient(clientConfig *rest.Config, client *client.Clie
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glog.V(3).Infof("Registering webhook client using serverIP %s\n", serverIP)
|
||||||
|
|
||||||
return &WebhookRegistrationClient{
|
return &WebhookRegistrationClient{
|
||||||
registrationClient: registrationClient,
|
registrationClient: registrationClient,
|
||||||
client: client,
|
client: client,
|
||||||
|
|
|
@ -137,9 +137,10 @@ func (ws *WebhookServer) serve(w http.ResponseWriter, r *http.Request) {
|
||||||
// RunAsync TLS server in separate thread and returns control immediately
|
// RunAsync TLS server in separate thread and returns control immediately
|
||||||
func (ws *WebhookServer) RunAsync() {
|
func (ws *WebhookServer) RunAsync() {
|
||||||
go func(ws *WebhookServer) {
|
go func(ws *WebhookServer) {
|
||||||
|
glog.V(3).Infof("serving on %s\n", ws.server.Addr)
|
||||||
err := ws.server.ListenAndServeTLS("", "")
|
err := ws.server.ListenAndServeTLS("", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatal(err)
|
glog.Fatalf("error serving TLS: %v\n", err)
|
||||||
}
|
}
|
||||||
}(ws)
|
}(ws)
|
||||||
glog.Info("Started Webhook Server")
|
glog.Info("Started Webhook Server")
|
||||||
|
|
|
@ -13,7 +13,8 @@ import (
|
||||||
// HandleValidation handles validating webhook admission request
|
// HandleValidation handles validating webhook admission request
|
||||||
// If there are no errors in validating rule we apply generation rules
|
// If there are no errors in validating rule we apply generation rules
|
||||||
func (ws *WebhookServer) HandleValidation(request *v1beta1.AdmissionRequest) *v1beta1.AdmissionResponse {
|
func (ws *WebhookServer) HandleValidation(request *v1beta1.AdmissionRequest) *v1beta1.AdmissionResponse {
|
||||||
glog.V(3).Infof("Handling mutation for Kind=%s, Namespace=%s Name=%s UID=%s patchOperation=%s",
|
|
||||||
|
glog.V(4).Infof("Receive request in validating webhook: Kind=%s, Namespace=%s Name=%s UID=%s patchOperation=%s",
|
||||||
request.Kind.Kind, request.Namespace, request.Name, request.UID, request.Operation)
|
request.Kind.Kind, request.Namespace, request.Name, request.UID, request.Operation)
|
||||||
|
|
||||||
policyInfos := []*info.PolicyInfo{}
|
policyInfos := []*info.PolicyInfo{}
|
||||||
|
|
|
@ -13,7 +13,7 @@ hub_user_name="nirmata"
|
||||||
project_name="kyverno"
|
project_name="kyverno"
|
||||||
|
|
||||||
echo "# Ensuring Go dependencies..."
|
echo "# Ensuring Go dependencies..."
|
||||||
dep ensure || exit 2
|
dep ensure -v || exit 2
|
||||||
|
|
||||||
echo "# Building executable ${project_name}..."
|
echo "# Building executable ${project_name}..."
|
||||||
chmod +x scripts/update-codegen.sh
|
chmod +x scripts/update-codegen.sh
|
||||||
|
|
|
@ -55,6 +55,7 @@ openssl x509 -req -in ${destdir}/webhook.csr -CA ${destdir}/rootCA.crt -CAkey ${
|
||||||
|
|
||||||
|
|
||||||
kubectl delete -f definitions/install_debug.yaml 2>/dev/null
|
kubectl delete -f definitions/install_debug.yaml 2>/dev/null
|
||||||
|
kubectl delete namespace kyverno 2>/dev/null
|
||||||
|
|
||||||
echo "Generating corresponding kubernetes secrets for TLS pair and root CA"
|
echo "Generating corresponding kubernetes secrets for TLS pair and root CA"
|
||||||
# create project namespace
|
# create project namespace
|
||||||
|
|
Loading…
Add table
Reference in a new issue