Skip to content

Commit

Permalink
Merge branch 'main' into renovate/patch-github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matofeder authored Dec 19, 2023
2 parents 18aa4e1 + 4693c2d commit 6107701
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 28 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ jobs:
# GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
# run: make test-integration

# - name: Test Summary
# uses: test-summary/action@62bc5c68de2a6a0d02039763b8c754569df99e3f # v2.1
# with:
# paths: ".coverage/junit.xml"
# - name: Test Summary
# uses: test-summary/action@62bc5c68de2a6a0d02039763b8c754569df99e3f # v2.1
# with:
# paths: ".coverage/junit.xml"

# - name: Upload Report
# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
# with:
# name: reports-${{ steps.name.outputs.name }}
# path: .reports
# retention-days: 30
# - name: Upload Report
# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
# with:
# name: reports-${{ steps.name.outputs.name }}
# path: .reports
# retention-days: 30
8 changes: 6 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ linters:
- exportloopref
- forcetypeassert
- gci
- goconst
# - goconst
- gocritic
- godot
- gofmt
- gofumpt
- goimports
# - goimports
- goprintffuncname
- gosec
- gosimple
Expand Down Expand Up @@ -104,6 +104,10 @@ linters-settings:
revive:
enable-all-rules: true
rules:
- name: import-alias-naming
disabled: true
- name: redundant-import-alias
disabled: true
- name: dot-imports
disabled: true
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ else
go version
golangci-lint version
golangci-lint run -v
cd $(TEST_DIR); golangci-lint run -v
endif

.PHONY: lint-golang-ci
Expand All @@ -361,7 +360,6 @@ else
go version
golangci-lint version
golangci-lint run -v --out-format=github-actions
cd $(TEST_DIR); golangci-lint run -v --out-format=github-actions
endif

.PHONY: lint-yaml
Expand Down
1 change: 0 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"

// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
_ "k8s.io/client-go/plugin/pkg/client/auth"
Expand Down
2 changes: 1 addition & 1 deletion hack/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ version::get_version_vars() {
fi
fi

GIT_RELEASE_TAG=$(git describe --abbrev=0 --tags)
GIT_RELEASE_TAG=$(git describe --abbrev=0 --tags 2>/dev/null)
}

# borrowed from k8s.io/hack/lib/version.sh and modified
Expand Down
4 changes: 2 additions & 2 deletions images/cache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


FROM docker.io/library/alpine:3.18.5@sha256:34871e7290500828b39e22294660bee86d966bc0017544e848dd9a255cdf59e0 as import-cache
FROM docker.io/library/alpine:3.19.0@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48 as import-cache

RUN --mount=type=bind,target=/host-tmp \
--mount=type=cache,target=/root/.cache \
Expand All @@ -27,7 +27,7 @@ RUN --mount=type=bind,target=/host-tmp \
tar xzf /host-tmp/go-pkg-cache.tar.gz --no-same-owner -C /go/pkg; \
fi

FROM docker.io/library/alpine:3.18.5@sha256:34871e7290500828b39e22294660bee86d966bc0017544e848dd9a255cdf59e0 as cache-creator
FROM docker.io/library/alpine:3.19.0@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48 as cache-creator
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/go/pkg \
tar czf /tmp/go-build-cache.tar.gz -C /root/.cache/go-build . ; \
Expand Down
4 changes: 2 additions & 2 deletions images/cspo/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 --platform=${BUILDPLATFORM} docker.io/library/golang:1.21.4-bullseye as build
FROM --platform=${BUILDPLATFORM} docker.io/library/golang:1.21.5-bullseye as build
ARG TARGETOS TARGETARCH

COPY . /src/cluster-stack-provider-openstack
Expand All @@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/root/.cache --mount=type=cache,target=/go/pkg \
go build -mod=vendor -trimpath -ldflags "-s -w ${LDFLAGS} -extldflags '-static'" \
-o manager cmd/main.go

FROM --platform=${BUILDPLATFORM} docker.io/library/alpine:3.18.4
FROM --platform=${BUILDPLATFORM} docker.io/library/alpine:3.19.0
WORKDIR /
COPY --from=build /src/cluster-stack-provider-openstack/manager .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package controller
import (
"context"

infrastructureclusterstackxk8siov1alpha1 "github.com/sovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
infrav1alpha1 "github.com/sovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -48,6 +48,9 @@ type OpenstackClusterStackReleaseReconciler struct {
func (r *OpenstackClusterStackReleaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = log.FromContext(ctx)

openstackclusterstackrelease := &infrav1alpha1.OpenstackClusterStackRelease{}
_ = r.Client.Get(ctx, req.NamespacedName, openstackclusterstackrelease)

// TODO(user): your logic here

return ctrl.Result{}, nil
Expand All @@ -56,6 +59,6 @@ func (r *OpenstackClusterStackReleaseReconciler) Reconcile(ctx context.Context,
// SetupWithManager sets up the controller with the Manager.
func (r *OpenstackClusterStackReleaseReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&infrastructureclusterstackxk8siov1alpha1.OpenstackClusterStackRelease{}).
For(&infrav1alpha1.OpenstackClusterStackRelease{}).
Complete(r)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package controller
import (
"context"

infrastructureclusterstackxk8siov1alpha1 "github.com/sovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
infrav1alpha1 "github.com/sovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -48,14 +48,15 @@ type OpenstackClusterStackReleaseTemplateReconciler struct {
func (r *OpenstackClusterStackReleaseTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = log.FromContext(ctx)

// TODO(user): your logic here
openstackclusterstackreleasetemplate := &infrav1alpha1.OpenstackClusterStackReleaseTemplate{}
_ = r.Client.Get(ctx, req.NamespacedName, openstackclusterstackreleasetemplate)

return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *OpenstackClusterStackReleaseTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&infrastructureclusterstackxk8siov1alpha1.OpenstackClusterStackReleaseTemplate{}).
For(&infrav1alpha1.OpenstackClusterStackReleaseTemplate{}).
Complete(r)
}
7 changes: 4 additions & 3 deletions internal/controller/openstacknodeimagerelease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package controller
import (
"context"

infrastructureclusterstackxk8siov1alpha1 "github.com/sovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
infrav1alpha1 "github.com/sovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -49,14 +49,15 @@ type OpenstackNodeImageReleaseReconciler struct {
func (r *OpenstackNodeImageReleaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = log.FromContext(ctx)

// TODO(user): your logic here
openstacknodeimagerelease := infrav1alpha1.OpenstackNodeImageRelease{}
_ = r.Client.Get(ctx, req.NamespacedName, &openstacknodeimagerelease)

return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *OpenstackNodeImageReleaseReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&infrastructureclusterstackxk8siov1alpha1.OpenstackNodeImageRelease{}).
For(&infrav1alpha1.OpenstackNodeImageRelease{}).
Complete(r)
}

0 comments on commit 6107701

Please sign in to comment.