Skip to content

Commit

Permalink
✨ update images and go version (#203)
Browse files Browse the repository at this point in the history
feat: update images and go version

Signed-off-by: Jan Schoone <[email protected]>
  • Loading branch information
jschoone authored Sep 10, 2024
1 parent 9b8db45 commit 3278995
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .builder-image-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
1 change: 1 addition & 0 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ runs:
- name: Install go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.sum
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate/golang.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
// https://docs.renovatebot.com/configuration-options/#constraints
"constraints": {
"go": "1.21"
"go": "1.22"
},
packageRules: [
{
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
container:
image: ghcr.io/sovereigncloudstack/cspo-builder:0.1.2
image: ghcr.io/sovereigncloudstack/cspo-builder:0.1.3
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
Expand All @@ -32,6 +32,8 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/setup-go

- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, mode=max, scope=${{ github.workflow }}


- name: Sign Container Images
run: |
cosign sign --yes ghcr.io/sovereigncloudstack/cspo@${{ steps.docker_build_release_cspo.outputs.digest }}
Expand Down Expand Up @@ -140,11 +139,7 @@ jobs:
fetch-depth: 0

- name: Install go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.sum
uses: ./.github/actions/setup-go

- name: install kustomize
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-scan-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Trivy
runs-on: ubuntu-latest
container:
image: ghcr.io/sovereigncloudstack/cspo-builder:0.1.2
image: ghcr.io/sovereigncloudstack/cspo-builder:0.1.3
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ tmp_*
.cspotemplate.yaml
.secret.yaml
.release

.config
27 changes: 17 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ linters:
- bodyclose
- containedctx
- contextcheck
- copyloopvar
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- gci
# - goconst
Expand Down Expand Up @@ -86,10 +86,6 @@ linters-settings:
allow-unused: false
allow-leading-space: false
require-specific: true
staticcheck:
go: "1.21"
stylecheck:
go: "1.21"
checks: ["all", "-ST1006"]
dot-import-whitelist:
- "github.com/onsi/gomega"
Expand All @@ -101,6 +97,9 @@ linters-settings:
- performance
- experimental
- opinionated
settings:
hugeParam:
sizeThreshold: 120
revive:
enable-all-rules: true
rules:
Expand Down Expand Up @@ -141,7 +140,14 @@ linters-settings:
severity: warning
disabled: false
arguments:
- [ "call-chain", "loop", "method-call", "recover", "immediate-recover", "return"] # yamllint disable-line rule:line-length
- [
"call-chain",
"loop",
"method-call",
"recover",
"immediate-recover",
"return",
] # yamllint disable-line rule:line-length
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
- name: exported
severity: warning
Expand Down Expand Up @@ -224,7 +230,7 @@ linters-settings:
- name: struct-tag
disabled: true
unused:
go: "1.21"
go: "1.22"
usestdlibvars:
# Suggest the use of http.MethodXX.
# Default: true
Expand Down Expand Up @@ -285,10 +291,11 @@ issues:
- linters:
- wrapcheck
path: _test\.go
exclude-dirs:
- vendor$

run:
timeout: 10m
go: "1.21"
go: "1.22"
allow-parallel-runners: true
modules-download-mode: vendor
skip-dirs:
- vendor$
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.28.0
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/controller-gen)
controller-gen: $(CONTROLLER_GEN) ## Build a local copy of controller-gen
$(CONTROLLER_GEN): # Build controller-gen from tools folder.
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.2

KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/kustomize)
kustomize: $(KUSTOMIZE) ## Build a local copy of kustomize
Expand Down Expand Up @@ -338,7 +338,7 @@ ifeq ($(BUILD_IN_CONTAINER),true)
else
go version
golangci-lint version
golangci-lint run -v --out-format=github-actions
golangci-lint run -v --out-format=colored-line-number
endif

.PHONY: lint-yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.2
name: openstackclusterstackreleases.infrastructure.clusterstack.x-k8s.io
spec:
group: infrastructure.clusterstack.x-k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.2
name: openstackclusterstackreleasetemplates.infrastructure.clusterstack.x-k8s.io
spec:
group: infrastructure.clusterstack.x-k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.2
name: openstacknodeimagereleases.infrastructure.clusterstack.x-k8s.io
spec:
group: infrastructure.clusterstack.x-k8s.io
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This document has been moved.

You can find the current version of the quickstart guide [here](https://github.com/SovereignCloudStack/cluster-stacks/blob/main/providers/openstack/README.md).
You can find the current version of the quickstart guide [here](https://docs.scs.community/docs/container/components/cluster-stacks/components/cluster-stack-provider-openstack/docs/quickstart).
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module github.com/SovereignCloudStack/cluster-stack-provider-openstack

go 1.21.6
go 1.22

toolchain go1.22.1
toolchain go1.23.0

require (
github.com/SovereignCloudStack/cluster-stack-operator v0.1.0-alpha.5
github.com/google/go-github/v52 v52.0.0
github.com/gophercloud/gophercloud/v2 v2.0.0-beta.2
github.com/gophercloud/utils/v2 v2.0.0-20240305212012-b57aefba4cdb
github.com/onsi/ginkgo/v2 v2.17.1
Expand All @@ -22,6 +21,8 @@ require (
sigs.k8s.io/yaml v1.4.0
)

require github.com/google/go-github/v52 v52.0.0

require (
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions images/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ENV GOLANGCI_VERSION="v1.59.1"
# update: datasource=github-tags depName=kubernetes-sigs/kind
ENV KIND_VERSION="v0.23.0"
# update: datasource=github-tags depName=kubernetes/kubernetes
ARG KUBECTL_VERSION="v1.27.3"
ARG KUBECTL_VERSION="v1.31.0"
# update: datasource=github-tags depName=kubernetes-sigs/kustomize extractVersion=^kustomize\/v(?<version>.+)$
ENV KUSTOMIZE_VERSION="v5.3.0"
# update: datasource=github-tags depName=aquasecurity/trivy
Expand All @@ -54,7 +54,7 @@ RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/in
############################
# CSPO Build Image Base #
############################
FROM docker.io/library/golang:1.21.8-bullseye
FROM docker.io/library/golang:1.23.0-bullseye

# update: datasource=github-tags depName=adrienverge/yamllint versioning=semver
ENV YAMLLINT_VERSION="v1.35.1"
Expand Down
2 changes: 1 addition & 1 deletion 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.8-bullseye as build
FROM --platform=${BUILDPLATFORM} docker.io/library/golang:1.23.0-bullseye as build

Check warning on line 16 in images/cspo/Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push manager image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG TARGETOS TARGETARCH

COPY . /src/cluster-stack-provider-openstack
Expand Down

0 comments on commit 3278995

Please sign in to comment.