gitops-engine
gitops-engine copied to clipboard
How to :enable SkipHooks
How do I enable the skipHooks feature? It is not visible in the documentation how to correctly set it up.
I tried to add:
sync.WithSkipHooks(true)
The console is always logging:
"msg"="Syncing" "skipHooks"=false "
thanks for any help
I am trying to deploy a helm chart (templated one) and this is the error I get:
I0407 21:33:49.707807 1 sync_context.go:1179] "msg"="Updating resource result, status: 'Synced' -> '', phase 'Running' -> 'Succeeded', message 'rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission reconciled. reconciliation required create\n\tmissing subjects added:\n\t\t{Kind:ServiceAccount APIGroup: Name:ingress-nginx-admission Namespace:nginx}. rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission configured. Warning: resource rolebindings/ingress-nginx-admission is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by apply. apply should only be used on resources created declaratively by either create --save-config or apply. The missing annotation will be patched automatically.' -> 'ingress-nginx-admission created'" "kind"="RoleBinding" "name"="ingress-nginx-admission" "namespace"="nginx" "phase"="PreSync"
I0407 21:33:49.707924 1 sync_context.go:828] "msg"="Updating operation state. phase: Running -> Running, message: 'waiting for completion of hook /ServiceAccount/ingress-nginx-admission and 30 more hooks' -> 'waiting for completion of hook batch/Job/ingress-nginx-admission-create'"
I0407 21:33:49.708057 1 sync_context.go:369] "msg"="Syncing" "skipHooks"=false "started"=true
I0407 21:33:53.198139 1 main.go:146] "msg"="Synchronization triggered by timer"
I0407 21:33:55.038577 1 sync_context.go:377] "msg"="Tasks" "tasks"=[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]
I0407 21:33:55.038641 1 sync_context.go:369] "msg"="Syncing" "skipHooks"=false "started"=true
I0407 21:34:01.239103 1 sync_context.go:377] "msg"="Tasks" "tasks"=[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]
I think this is because of hook validation, thus I would like to disable it. It gets stuck like this forever.