mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: debug mode (#4785)
* fix: debug mode Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> * fix Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
parent
27de93a3d2
commit
1c337bdf44
3 changed files with 19 additions and 7 deletions
8
Makefile
8
Makefile
|
@ -646,6 +646,14 @@ release-notes:
|
|||
@bash -c 'while IFS= read -r line ; do if [[ "$$line" == "## "* && "$$line" != "## $(VERSION)" ]]; then break ; fi; echo "$$line"; done < "CHANGELOG.md"' \
|
||||
true
|
||||
|
||||
#########
|
||||
# DEBUG #
|
||||
#########
|
||||
|
||||
.PHONY: debug-deploy
|
||||
debug-deploy: codegen-install ## Install debug manifests
|
||||
@kubectl create -f ./config/install_debug.yaml || kubectl replace -f ./config/install_debug.yaml
|
||||
|
||||
##########
|
||||
# GITHUB #
|
||||
##########
|
||||
|
|
|
@ -606,7 +606,7 @@ func main() {
|
|||
go configurationController.Run(signalCtx, configcontroller.Workers)
|
||||
go eventGenerator.Run(signalCtx, 3)
|
||||
|
||||
if serverIP != "" {
|
||||
if serverIP == "" {
|
||||
go webhookMonitor.Run(signalCtx, webhookCfg, certRenewer, eventGenerator)
|
||||
}
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ func (wrc *Register) Register() error {
|
|||
logger := wrc.log
|
||||
if wrc.serverIP != "" {
|
||||
logger.Info("Registering webhook", "url", fmt.Sprintf("https://%s", wrc.serverIP))
|
||||
} else {
|
||||
if err := wrc.checkEndpoint(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -243,12 +244,15 @@ func (wrc *Register) UpdateWebhookConfigurations(configHandler config.Configurat
|
|||
logger.V(4).Info("received the signal to update webhook configurations")
|
||||
|
||||
retry := false
|
||||
deploy, err := wrc.GetKubePolicyDeployment()
|
||||
if err != nil {
|
||||
retry = true
|
||||
}
|
||||
if tlsutils.IsKyvernoInRollingUpdate(deploy) {
|
||||
retry = true
|
||||
if wrc.serverIP != "" {
|
||||
deploy, err := wrc.GetKubePolicyDeployment()
|
||||
if err != nil {
|
||||
retry = true
|
||||
} else {
|
||||
if tlsutils.IsKyvernoInRollingUpdate(deploy) {
|
||||
retry = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !retry {
|
||||
|
|
Loading…
Reference in a new issue