From 3cd72d6e74b2606c271eb8216e85e534bb3264a3 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 8 May 2024 15:08:06 +0200 Subject: [PATCH] Before golang kerberos attempt --- Dockerfile | 2 ++ deploy/sthome-webhook/Chart.yaml | 4 ++-- deploy/sthome-webhook/values.yaml | 2 +- pkg/shell/shell.go | 18 ++++++++++-------- version.txt | 6 +++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8be7f93..1a1f529 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,8 @@ ENV RUNNING_IN_DOCKER true ENV DEBIAN_FRONTEND=noninteractive ENV TZ="Africa/Johannesburg" ENV WEBROOT=/webroot +ENV ACMEDIR=/acme +ENV WORKDIR=/workdir COPY --from=build /workspace/webhook /usr/local/bin/webhook diff --git a/deploy/sthome-webhook/Chart.yaml b/deploy/sthome-webhook/Chart.yaml index 507876e..c29b844 100644 --- a/deploy/sthome-webhook/Chart.yaml +++ b/deploy/sthome-webhook/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: v0.0.5-alpha.112 +appVersion: v0.0.5-alpha.113 description: Cert-Manager webhook for sthome name: sthome-webhook -version: 0.0.5-alpha.112 +version: 0.0.5-alpha.113 diff --git a/deploy/sthome-webhook/values.yaml b/deploy/sthome-webhook/values.yaml index 2e4ca7f..b32dd10 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.112 + tag: 0.0.5-alpha.113 #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 af08152..c89747a 100644 --- a/pkg/shell/shell.go +++ b/pkg/shell/shell.go @@ -16,9 +16,9 @@ import ( const ( bashShell = "/bin/bash" zshShell = "/bin/zsh" - Workdir = "/workdir" - AcmeDir = "/acme" - Shell = bashShell + //Workdir = "/workdir" + //AcmeDir = "/acme" + Shell = bashShell AuthScript = "acmeauth.sh" DnsUpdScript = "updatedns.sh" @@ -31,7 +31,9 @@ const ( ) var ( - AcmeAuthCmd = AcmeDir + "/" + AuthScript + Workdir = os.Getenv("WORKDIR") + AcmeDir = os.Getenv("ACMEDIR") + AcmeAuthCmd = Workdir + "/" + AuthScript mutex sync.Mutex // mutex is used to define a critical section of code. ) @@ -68,8 +70,8 @@ func SetChallenge(ch *v1alpha1.ChallengeRequest) (bool, error) { ch.DNSName, ch.ResolvedFQDN, ch.Key, - "-l", - "\"\"", //localip, + //"-l", + //"\"\"", //localip, //"-v", ) } @@ -83,8 +85,8 @@ func UnsetChallenge(ch *v1alpha1.ChallengeRequest) (bool, error) { ch.DNSName, ch.ResolvedFQDN, ch.Key, - "-l", - "\"\"", //localip, + //"-l", + //"\"\"", //localip, //"-v", ) } diff --git a/version.txt b/version.txt index 007ed13..2efd6fe 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ -0.0.5-alpha.112 -20240421-2058 -112 \ No newline at end of file +0.0.5-alpha.113 +20240422-0918 +113 \ No newline at end of file