From 1356c61fc0de6fd033d1fb803737a300d821e339 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 19 Apr 2024 22:58:45 +0200 Subject: [PATCH] Updated shell.go --- deploy/sthome-webhook/Chart.yaml | 4 ++-- deploy/sthome-webhook/values.yaml | 2 +- pkg/shell/shell.go | 11 ++++------- version.txt | 6 +++--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/deploy/sthome-webhook/Chart.yaml b/deploy/sthome-webhook/Chart.yaml index 4453d26..9170146 100644 --- a/deploy/sthome-webhook/Chart.yaml +++ b/deploy/sthome-webhook/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: v0.0.5-alpha.110 +appVersion: v0.0.5-alpha.111 description: Cert-Manager webhook for sthome name: sthome-webhook -version: 0.0.5-alpha.110 +version: 0.0.5-alpha.111 diff --git a/deploy/sthome-webhook/values.yaml b/deploy/sthome-webhook/values.yaml index b8d88a9..eec8359 100644 --- a/deploy/sthome-webhook/values.yaml +++ b/deploy/sthome-webhook/values.yaml @@ -31,7 +31,7 @@ clusterIssuer: image: repository: stuurmcp/cert-manager-webhook-sthome #repository: wstat.sthome.net:5000/cert-manager-webhook-sthome - tag: 0.0.5-alpha.110 + tag: 0.0.5-alpha.111 #pullPolicy should be IfNotPresent. Set to Always for testing purposes pullPolicy: IfNotPresent diff --git a/pkg/shell/shell.go b/pkg/shell/shell.go index 6c69ba6..af08152 100644 --- a/pkg/shell/shell.go +++ b/pkg/shell/shell.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/jetstack/cert-manager/pkg/acme/webhook/apis/acme/v1alpha1" + "github.com/cert-manager/cert-manager/pkg/acme/webhook/apis/acme/v1alpha1" "k8s.io/klog/v2" ) @@ -32,8 +32,7 @@ const ( var ( AcmeAuthCmd = AcmeDir + "/" + AuthScript - wg sync.WaitGroup // wg is used to wait for the program to finish. - mutex sync.Mutex // mutex is used to define a critical section of code. + mutex sync.Mutex // mutex is used to define a critical section of code. ) // CapturingPassThroughWriter is a writer that remembers @@ -64,7 +63,6 @@ func SetChallenge(ch *v1alpha1.ChallengeRequest) (bool, error) { SetupWorkdir() // update workdir if any of the copied files were updated on host return Execute( Shell, - // "-c", AcmeAuthCmd, "set", ch.DNSName, @@ -80,7 +78,6 @@ func UnsetChallenge(ch *v1alpha1.ChallengeRequest) (bool, error) { SetupWorkdir() // update workdir if any of the copied files were updated on host return Execute( Shell, - // "-c", AcmeAuthCmd, "unset", ch.DNSName, @@ -155,7 +152,7 @@ func updateWorkdir() { func createWorkdir() error { finfo, err := os.Stat(Workdir) if os.IsNotExist(err) { - klog.Infof("Creating folder \"%s\".", Workdir) + klog.Infof("Creating folder \"%s\"", Workdir) err = os.Mkdir(Workdir, 0755) if err != nil { panic(err) @@ -173,7 +170,7 @@ func updateIfStale(filename string, mode os.FileMode) error { if result > 0 { err = CopyFile(sourceFile, destFile, mode) if err == nil { - klog.Infof("Updated \"%s\" from \"%s\" folder.", destFile, AcmeDir) + klog.Infof("Updated \"%s\" from \"%s\" folder", destFile, AcmeDir) } } return err diff --git a/version.txt b/version.txt index 5b0977a..63d5ccc 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ -0.0.5-alpha.110 -20240419-2130 -110 \ No newline at end of file +0.0.5-alpha.111 +20240419-2247 +111 \ No newline at end of file