Skip to content

Commit

Permalink
Merge branch 'master' into configuerable-histogram-buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
clementnuss committed Dec 27, 2023
2 parents 69467af + c4bf82f commit 68bf7ce
Show file tree
Hide file tree
Showing 26 changed files with 648 additions and 341 deletions.
4 changes: 2 additions & 2 deletions .cc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sections:
- type: build
title: Build System
hidden: true
title: Dependencies
hidden: false
- type: docs
title: Documentation
hidden: true
Expand Down
21 changes: 21 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
labels:
- "go"
- "dependencies"
schedule:
interval: "weekly"
target-branch: master
commit-message:
prefix: "build(deps)"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
10 changes: 6 additions & 4 deletions .github/workflows/ci-helm-deploy-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: '1.20'
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --snapshot --rm-dist --skip-publish
Expand Down Expand Up @@ -56,6 +56,8 @@ jobs:
sleep 15 # wait for the scheduler to create pods
kubectl -n kube-system wait pods -l app.kubernetes.io/name=kubenurse --for=condition=Ready
kubectl -n kube-system get pods -l app.kubernetes.io/name=kubenurse
kubectl rollout restart daemonset kubenurse
kubectl rollout status daemonset kubenurse --timeout=1m
sleep 60 # Wait to generate some checks etc.
- name: Check deployment
uses: ./.github/actions/check-deployment
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci-helm-deploy-traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: '1.20'
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --snapshot --rm-dist --skip-publish
Expand Down Expand Up @@ -60,6 +60,8 @@ jobs:
sleep 15 # wait for the scheduler to create pods
kubectl -n kube-system wait pods -l app=kubenurse --for=condition=Ready
kubectl -n kube-system get pods -l app=kubenurse
kubectl rollout restart daemonset kubenurse
kubectl rollout status daemonset kubenurse --timeout=1m
sleep 60 # Wait to generate some checks etc.
- name: Check deployment
uses: ./.github/actions/check-deployment
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci-kustomize-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: '1.20'
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --snapshot --rm-dist --skip-publish
Expand Down Expand Up @@ -52,6 +52,8 @@ jobs:
sleep 15 # wait for the scheduler to create pods
kubectl wait pods -l app.kubernetes.io/name=kubenurse --for=condition=Ready
kubectl get pods -l app.kubernetes.io/name=kubenurse
kubectl rollout restart daemonset kubenurse
kubectl rollout status daemonset kubenurse --timeout=1m
sleep 60 # Wait to generate some checks etc.
- name: Check deployment
uses: ./.github/actions/check-deployment
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ jobs:
lint-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v3
with:
version: v1.46
version: v1.55
args: --timeout 5m
lint-helm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Helm lint
shell: bash
run: |
helm lint ./helm/kubenurse/
test-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: '1.20'
- name: Run unit tests
run: go test -race -covermode atomic -coverprofile=profile.cov ./...
- name: Send coverage report
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/release-helm-chart.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
name: Release Helm Charts
on:
push:
branches:
- master
- main
tags:
- v*
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v3
with:
version: v3.8.1


- name: Prepare version
run: |
export TAG=$(echo ${{ github.ref }} | cut -d '/' -f 3 - )
export VERSION=${TAG#v} # tag without leading v
echo TAG=${TAG} >> $GITHUB_ENV
echo VERSION=${VERSION} >> $GITHUB_ENV
echo "TAG: ${TAG}"
echo "(unused, but still: ) VERSION: ${VERSION}"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
uses: stefanprodan/helm-gh-pages@v1.7.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
app_version: "${{env.TAG}}"
charts_dir: helm
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: '1.20'
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
Expand Down
8 changes: 2 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ linters-settings:
- gocognit
- funlen
- gocyclo

linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
Expand All @@ -71,19 +68,18 @@ linters:
- misspell
- nakedret
- prealloc
- protogetter
- rowserrcheck
- exportloopref
- staticcheck
- structcheck
- stylecheck
- sqlclosecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- wsl
issues:
exclude:
# Very commonly not checked.
- 'Error return value of .(l.Sync|.*Close|.*.Write|.*Flush|os\.Remove(All)?|os\.(Un)?Setenv). is not checked'
Expand Down
Loading

0 comments on commit 68bf7ce

Please sign in to comment.