1
0
Fork 0
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:
Charles-Edouard Brétéché 2022-10-06 09:41:05 +02:00 committed by GitHub
parent 27de93a3d2
commit 1c337bdf44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 7 deletions

View file

@ -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"' \ @bash -c 'while IFS= read -r line ; do if [[ "$$line" == "## "* && "$$line" != "## $(VERSION)" ]]; then break ; fi; echo "$$line"; done < "CHANGELOG.md"' \
true 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 # # GITHUB #
########## ##########

View file

@ -606,7 +606,7 @@ func main() {
go configurationController.Run(signalCtx, configcontroller.Workers) go configurationController.Run(signalCtx, configcontroller.Workers)
go eventGenerator.Run(signalCtx, 3) go eventGenerator.Run(signalCtx, 3)
if serverIP != "" { if serverIP == "" {
go webhookMonitor.Run(signalCtx, webhookCfg, certRenewer, eventGenerator) go webhookMonitor.Run(signalCtx, webhookCfg, certRenewer, eventGenerator)
} }

View file

@ -127,6 +127,7 @@ func (wrc *Register) Register() error {
logger := wrc.log logger := wrc.log
if wrc.serverIP != "" { if wrc.serverIP != "" {
logger.Info("Registering webhook", "url", fmt.Sprintf("https://%s", wrc.serverIP)) logger.Info("Registering webhook", "url", fmt.Sprintf("https://%s", wrc.serverIP))
} else {
if err := wrc.checkEndpoint(); err != nil { if err := wrc.checkEndpoint(); err != nil {
return err return err
} }
@ -243,12 +244,15 @@ func (wrc *Register) UpdateWebhookConfigurations(configHandler config.Configurat
logger.V(4).Info("received the signal to update webhook configurations") logger.V(4).Info("received the signal to update webhook configurations")
retry := false retry := false
deploy, err := wrc.GetKubePolicyDeployment() if wrc.serverIP != "" {
if err != nil { deploy, err := wrc.GetKubePolicyDeployment()
retry = true if err != nil {
} retry = true
if tlsutils.IsKyvernoInRollingUpdate(deploy) { } else {
retry = true if tlsutils.IsKyvernoInRollingUpdate(deploy) {
retry = true
}
}
} }
if !retry { if !retry {