Skip to content

Commit

Permalink
fix: update k3s version and improve TLS certificate logging
Browse files Browse the repository at this point in the history
- Update k3s download URLs to version 1.28.15 for both amd64 and arm64 binaries
- Enhance certificate checking to log a warning for expired TLS certificates

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Oct 30, 2024
1 parent aca16d5 commit e6582d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/scripts/getk3s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
set -xe

if [ ! -f "hack/bin/k3s-linux-amd64" ]; then
wget -O hack/bin/k3s-linux-amd64 https://github.com/k3s-io/k3s/releases/download/v1.28.14%2Bk3s1/k3s
wget -O hack/bin/k3s-linux-amd64 https://github.com/k3s-io/k3s/releases/download/v1.28.15%2Bk3s1/k3s
fi
if [ ! -f "hack/bin/k3s-linux-arm64" ]; then
wget -O hack/bin/k3s-linux-arm64 https://github.com/k3s-io/k3s/releases/download/v1.28.14%2Bk3s1/k3s-arm64
wget -O hack/bin/k3s-linux-arm64 https://github.com/k3s-io/k3s/releases/download/v1.28.15%2Bk3s1/k3s-arm64
fi

chmod +x hack/bin/k3s-linux-amd64 hack/bin/k3s-linux-arm64
4 changes: 4 additions & 0 deletions internal/pkg/util/httptls/httptls.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func checkCertificate(domain string) (bool, error) {
log.Warnf("domain %s use self-signed certificate", domain)
return true, nil
}
if strings.Contains(err.Error(), "x509: certificate has expired or is not vet valid") {
log.Warnf("domain %s tls expired", domain)
return true, nil
}
return false, err
}
defer func() { _ = resp.Body.Close() }()
Expand Down

0 comments on commit e6582d2

Please sign in to comment.