Skip to content

Commit

Permalink
Feature k8s 1.27 (#333)
Browse files Browse the repository at this point in the history
* add configmap history

* update k8s mod to 1.27

---------

Co-authored-by: weilaaa <[email protected]>
  • Loading branch information
tiancandevloper and weilaaa authored Sep 11, 2023
1 parent d4c5e5d commit 9ecaeaa
Show file tree
Hide file tree
Showing 5,994 changed files with 805,855 additions and 171,704 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.20.1

- name: go fmt check
run: make fmt-check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
- name: Set up Go 1.20
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.20.1
id: go
- uses: actions/checkout@v2
- name: Run golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,6 @@ golangci-lint: ## Download golangci-lint locally if necessary.
define get-golangci-lint
@[ -f $(1) ] || { \
set -e ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.45.2 ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.0 ;\
}
endef
6 changes: 3 additions & 3 deletions build/cube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#limitations under the License.

# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.20.7-alpine3.18 as builder

WORKDIR /workspace

Expand All @@ -28,11 +28,11 @@ COPY vendor/ vendor/
COPY Makefile Makefile

# Build
RUN make build-cube
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor -a -o cube cmd/cube/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM alpine:3.13.4
FROM alpine:3.18
WORKDIR /
COPY --from=builder /workspace/cube .

Expand Down
6 changes: 3 additions & 3 deletions build/warden/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#limitations under the License.

# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.20.7-alpine3.18 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -26,11 +26,11 @@ COPY vendor/ vendor/
COPY Makefile Makefile

# Build
RUN make build-warden
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o warden cmd/warden/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM alpine:3.13.4
FROM alpine:3.18
WORKDIR /
COPY --from=builder /workspace/warden .

Expand Down
2 changes: 1 addition & 1 deletion build/warden/init.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#See the License for the specific language governing permissions and
#limitations under the License.

FROM alpine:3.13.4
FROM alpine:3.18

COPY hack/install_hotplug.sh install_hotplug.sh

Expand Down
3 changes: 2 additions & 1 deletion cmd/cube/app/cube.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (
"github.com/kubecube-io/kubecube/pkg/ctrlmgr"
"github.com/kubecube-io/kubecube/pkg/cube"
"github.com/kubecube-io/kubecube/pkg/utils/international"

"github.com/urfave/cli/v2"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/klog/v2"
"k8s.io/sample-controller/pkg/signals"
"sigs.k8s.io/controller-runtime/pkg/log"
)

var (
Expand Down Expand Up @@ -69,6 +69,7 @@ func run(s *options.CubeOptions, stop <-chan struct{}) {
clog.Fatal("klog level set failed: %v", err)
}

log.SetLogger(klog.NewKlogr())
// initialize cube client set
clients.InitCubeClientSetWithOpts(s.ClientMgrOpts)

Expand Down
2 changes: 2 additions & 0 deletions cmd/warden/app/warden.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/klog/v2"
"k8s.io/sample-controller/pkg/signals"
"sigs.k8s.io/controller-runtime/pkg/log"
)

var (
Expand All @@ -49,6 +50,7 @@ func run(s *options.WardenOptions, stop <-chan struct{}) {
clog.Fatal("klog level set failed: %v", err)
}

log.SetLogger(klog.NewKlogr())
w := warden.NewWardenWithOpts(s.GenericWardenOpts)

err := w.Initialize()
Expand Down
Loading

0 comments on commit 9ecaeaa

Please sign in to comment.