Skip to content

Commit

Permalink
Merge branch 'main' into release-0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1989hu committed Oct 13, 2024
2 parents 80ecfd7 + da5e726 commit a0e35f1
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ jobs:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
uses: docker/setup-buildx-action@v3.7.1
- name: Build Container Image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/grype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
uses: docker/setup-buildx-action@v3.7.1
- name: Build Container Image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
type=ref,event=branch
type=semver,pattern={{version}}
- name: Install Cosign
uses: sigstore/cosign-installer@v3.6.0
uses: sigstore/cosign-installer@v3.7.0
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
uses: docker/setup-buildx-action@v3.7.1
- name: Login to Registry
uses: docker/[email protected]
with:
Expand All @@ -44,7 +44,7 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
uses: docker/setup-buildx-action@v3.7.1
- name: Build Container Image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand All @@ -34,7 +34,7 @@ jobs:
push: false
tags: ghcr.io/${{ github.repository }}:trivy
- name: Run Trivy Vulnerability Scanner
uses: aquasecurity/trivy-action@0.24.0
uses: aquasecurity/trivy-action@0.27.0
with:
image-ref: ghcr.io/${{ github.repository }}:trivy
format: sarif
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@

<a name="v0.8.7"></a>
## [v0.8.7](https://github.com/alex1989hu/kubelet-serving-cert-approver/compare/v0.8.6...v0.8.7) (2024-10-13)

### Chore

* bump aquasecurity/trivy-action from 0.26.0 to 0.27.0
* bump aquasecurity/trivy-action from 0.25.0 to 0.26.0
* bump aquasecurity/trivy-action from 0.24.0 to 0.25.0
* as keyword should match the case of the from keyword in Dockerfile
* bump sigstore/cosign-installer from 3.6.0 to 3.7.0
* bump docker/setup-buildx-action from 3.7.0 to 3.7.1
* bump docker/setup-buildx-action from 3.6.1 to 3.7.0
* bump docker/build-push-action from 6.7.0 to 6.9.0

### Fix

* set logger to controller-runtime


<a name="v0.8.6"></a>
## [v0.8.6](https://github.com/alex1989hu/kubelet-serving-cert-approver/compare/v0.8.5...v0.8.6) (2024-09-17)

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

FROM golang:1.23.1 as builder
FROM golang:1.23.1 AS builder

# To let GitHub CI driven buildx pass build arguments
ARG TARGETOS
Expand Down
11 changes: 6 additions & 5 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package cmd

import (
"github.com/go-logr/logr"
"github.com/go-logr/zapr"
"github.com/spf13/cobra"
uberzap "go.uber.org/zap"
Expand Down Expand Up @@ -72,7 +71,7 @@ func startServer() {
uberzap.Bool("debug", isDebug))

// Forward client-go klog calls to zap
klog.SetLogger(zapr.NewLogger(&setupLog))
klog.SetLogger(zapr.NewLogger(logger.CreateLogger().Named("client-go")))

setupLog.Info("Try to talk to Kubernetes API Server, will exit in case of failure")

Expand All @@ -84,6 +83,10 @@ func startServer() {
setupLog.Info("pprof will be enabled", uberzap.String("port", pProfBindAddress))
}

// Set zap logger to all deferred loggers of controller-runtime to prevent it from complaining
// about log.SetLogger never being called
ctrllog.SetLogger(zapr.NewLogger(logger.CreateLogger().Named("ctrllog")))

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Client: ctrlclient.Options{
Cache: &ctrlclient.CacheOptions{
Expand All @@ -99,9 +102,7 @@ func startServer() {
LeaderElectionNamespace: namespace,
LeaderElectionResourceLock: "leases",
LeaderElectionID: "kubelet-serving-certificate-approver",
// Set NullLogger: https://github.com/kubernetes-sigs/controller-runtime/issues/1122
Logger: logr.New(ctrllog.NullLogSink{}),
PprofBindAddress: pProfBindAddress,
PprofBindAddress: pProfBindAddress,
})
if err != nil {
setupLog.Fatal("Unable to start manager", uberzap.Error(err))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ toolchain go1.23.1

require (
github.com/cucumber/godog v0.14.1
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/common v0.55.0
Expand Down Expand Up @@ -34,6 +33,7 @@ require (
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
Expand Down

0 comments on commit a0e35f1

Please sign in to comment.