Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Update golang 1.22 #117

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
/.charts-build-scripts
*.DS_Store
dev/
kubeconfig.yaml
get_helm.sh
kubeconfig*.yaml
get_helm.sh
Dockerfile.dapper*
!Dockerfile.dapper
5 changes: 3 additions & 2 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM registry.suse.com/bci/golang:1.22 AS helm
ARG HELM_VERSION=v3.13.3-rancher1
RUN zypper -n install git
RUN git -C / clone --branch release-v3.9.0 --depth=1 https://github.com/rancher/helm
RUN git -C / clone --branch $HELM_VERSION --depth=1 https://github.com/rancher/helm
RUN make -C /helm

FROM registry.suse.com/bci/golang:1.22
Expand All @@ -10,7 +11,7 @@ COPY --from=docker.io/docker/buildx-bin:0.17.1 /buildx /usr/libexec/docker/cli-p
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH

RUN zypper -n install git docker vim less file curl wget
RUN zypper -n install git docker vim less file curl wget patch
RUN go install golang.org/x/tools/cmd/goimports@latest
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.2; \
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ For more info on _Helm Locker_, see the [dedicated README file](README-helm-lock

For more information, see the [Getting Started guide](docs/prometheus-federator/gettingstarted.md).

### Branches and Releases
This is the current branch strategy for `rancher/backup-restore-operator`, it may change in the future.

| Branch | Tag | Rancher |
|----------------|----------|------------------------|
| `main` | `head` | `main` branch (`head`) |
| `release/v0.0` | `v0.x.x` | `v2.9.x`, `v2.8.x` |

> [!NOTE]
> We are starting our new Branch strategy officially in 2.10, the prior Rancher versions will receive updates to their new versions once cleared for backporting.


## More Info

Prometheus Federator is an operator (powered by [`rancher/helm-project-operator`](README-helm-project-operator.md) and [`rancher/charts-build-scripts`](README-helm-locker.md)) that manages deploying one or more Project Monitoring Stacks composed of the following set of resources that are scoped to project namespaces:
Expand Down Expand Up @@ -54,6 +66,10 @@ For more information, see the [Developing guide](docs/prometheus-federator/devel

## Versioning and Releasing For Rancher

> [!NOTE]
> We are starting our new Branch strategy officially in 2.10, the prior Rancher versions will receive updates to their new versions once cleared for backporting.
> Once we fully adopt this branching and release process, we will remove this note.

While this repository does maintain a standalone Helm repository for vanilla Helm users to consume directly, users of Rancher will see forked versions of these chart releases available on Rancher's Apps & Marketplace; the forked chart releases are maintained in the [`rancher/charts`](https://github.com/rancher/charts) repository on being released from a `dev-vX.X` branch to a `release-vX.X` branch, where `X.X` corresponds to the Rancher `${Major}.${Minor}` version that the users is using (i.e. Rancher `2.7`).

**The chart in rancher/charts is generally the version that is intended for use in production since that is the chart that will be tested by Rancher's QA team.** Generally, these charts will match stable versions of charts available in this repository, so non-Rancher users **should** be able to safely use those versions in this repository for production use cases (at their own risk).
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/rancher/prometheus-federator

go 1.22.3
go 1.22

toolchain go1.22.8

replace (
k8s.io/api => k8s.io/api v0.22.3
Expand Down
2 changes: 1 addition & 1 deletion package/Dockerfile-prometheus-federator
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM --platform=$BUILDPLATFORM rancher/mirrored-tonistiigi-xx:1.3.0 AS xx
FROM --platform=$BUILDPLATFORM registry.suse.com/bci/golang:1.22 AS helm

# Clone repository once, and reuse it for target archs.
ARG HELM_VERSION=release-v3.9.0
ARG HELM_VERSION=v3.13.3-rancher1
ADD --keep-git-dir=true https://github.com/rancher/helm.git#${HELM_VERSION} /helm
RUN cd /helm && go mod download

Expand Down
1 change: 1 addition & 0 deletions pkg/helm-locker/codegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func main() {
}

os.Unsetenv("GOPATH")
logrus.Info("Generating controller boilerplate")
controllergen.Run(args.Options{
OutputPackage: "github.com/rancher/prometheus-federator/pkg/helm-locker/generated",
Boilerplate: "gen/boilerplate.go.txt",
Expand Down
4 changes: 3 additions & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module example.com

go 1.22.3
go 1.22.0

toolchain go1.23.1

require (
github.com/caarlos0/env/v11 v11.0.0
Expand Down
Loading