diff --git a/Dockerfile b/Dockerfile index e1981463..f30d72d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.14.2 as builder +FROM golang:1.19 as builder # Copy in the go src WORKDIR /go/src/github.com/AliyunContainerService/kubernetes-cronhpa-controller @@ -11,7 +11,7 @@ COPY vendor/ vendor/ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=off go build -a -o kubernetes-cronhpa-controller github.com/AliyunContainerService/kubernetes-cronhpa-controller/cmd/kubernetes-cronhpa-controller # Copy the controller-manager into a thin image -FROM alpine:3.12.0 +FROM alpine:3.17 RUN apk add --no-cache tzdata WORKDIR /root/ COPY --from=builder /go/src/github.com/AliyunContainerService/kubernetes-cronhpa-controller/kubernetes-cronhpa-controller . @@ -19,4 +19,4 @@ COPY docker-entrypoint.sh . RUN chmod +x /root/docker-entrypoint.sh ENTRYPOINT ["/root/docker-entrypoint.sh"] -CMD ["/root/kubernetes-cronhpa-controller"] \ No newline at end of file +CMD ["/root/kubernetes-cronhpa-controller"] diff --git a/chart/kubernetes-cronhpa-controller/templates/rbac_role.yaml b/chart/kubernetes-cronhpa-controller/templates/rbac_role.yaml index 2cfee0f4..54fc4f93 100644 --- a/chart/kubernetes-cronhpa-controller/templates/rbac_role.yaml +++ b/chart/kubernetes-cronhpa-controller/templates/rbac_role.yaml @@ -27,6 +27,14 @@ rules: - list - watch - update + - apiGroups: + - "coordination.k8s.io" + resources: + - leases + verbs: + - get + - create + - update - apiGroups: - "" resources: