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

PENG-2776: Bump RDS Exporter #6

Merged
merged 36 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6aff5b7
Create rds_exporter-component.yaml
EduSemensati Jun 22, 2023
d5709aa
PMM-6120 Use go 1.14 (#45)
askomorokhov Jun 30, 2020
2336521
PMM-6213 Remove go 1.13 from travis. (#46)
askomorokhov Jul 14, 2020
0e1928d
PMM-6756 Added go 1.15.x. (#48)
yareach Dec 6, 2020
23b5908
Overcome the limitation of 100 dbinstances (#47)
vlinevych Jan 7, 2021
693dfdb
ci: rotate integration keys (#52)
Apr 27, 2021
0b8fc1d
Delete .travis.yml
denisok Jun 2, 2021
a91d6e6
PMM-7602 Add GitHub Action (#53)
askomorokhov Jun 3, 2021
58114bf
PPMM-7961 Updated exporter_shared (#59)
percona-csalguero Jun 29, 2021
ab5d2f9
PMM-7902 Remove Go 1.15 (#60)
BupycHuk Jul 5, 2021
4c04681
Add docker multistage build (#61)
askomorokhov Jul 8, 2021
7e37b16
bring back maxInterval=60 sec (#63)
askomorokhov Jul 21, 2021
7c27693
PMM-8207 Cleanup. (#57)
askomorokhov Aug 11, 2021
76a1e3d
add the ReplicaLag metric (#51)
blovett Sep 14, 2021
385de07
Update README.md (#65)
rnovikovP Sep 28, 2021
6a5a4a0
PMM-6013 change default branch to main (#67)
nikita-b Oct 6, 2021
41a7a15
Support assume role (#70)
yonahd Dec 1, 2021
2d5aea0
adding .goreleaser.yml (#72)
maxknee Dec 13, 2021
7a8da6e
Update Dockerfile.releaser
denisok Dec 13, 2021
f2d9eac
Update .goreleaser.yml
denisok Dec 13, 2021
44062fa
Update .goreleaser.yml
denisok Dec 14, 2021
e8eaeb8
Update release.yml
denisok Dec 14, 2021
f2f1d61
Update release.yml
denisok Dec 14, 2021
03fafb7
cost exclaimer (#73)
yonahd Dec 27, 2021
bba25d1
PMM-9337 Update go 1.17 (#77)
BupycHuk Jan 3, 2022
aecf260
Fix incorrect version (#76)
JiriCtvrtka Jan 5, 2022
58362ae
PMM-11049 Typo present in enhanced metrics scraper for rds_exporter (…
BupycHuk Dec 14, 2022
a583c71
PMM-11312 --version (#84)
YaroslavPodorvanov Jan 18, 2023
3b16a24
PMM-7 Add dependabot (#85)
artemgavrilov Jan 25, 2023
593746c
PMM-11497 Update dependencies. (#87)
BupycHuk Feb 8, 2023
efb2cee
PMM-11632 rds_exporter ignores DisableEnhancedMetrics (#91)
pkadej May 9, 2023
b0ceb13
Discord link has been removed (#92)
dbazhenov Jul 9, 2023
bdabb45
PMM-12339 remove go tip (#94)
Jul 20, 2023
547c29b
Rename build to builder
mprokopov Jul 9, 2024
26cc0c4
golang 1.19
mprokopov Jul 9, 2024
bcdc9ff
Patch dist
mprokopov Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .backstage/rds_exporter-component.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: rds_exporter-component
title: Prometheus AWS RDS Exporter
description: AWS RDS exporter for Prometheus. Public fork!
tags:
- go
- prometheus
links:
- url: https://github.com/ozean12/rds_exporter
title: Prometheus AWS RDS Exporter GitHub Repo
icon: github
spec:
type: service
lifecycle: production
owner: infrastructure
system: observability-system
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/tools"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
54 changes: 54 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Go

on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:

jobs:
test:
name: Test
runs-on: ubuntu-latest
# The environment this job references
environment:
name: CI

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: ${{ github.workspace }}/go.mod

- name: Run checks
run: |
go build -modfile=tools/go.mod -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
go build -modfile=tools/go.mod -o bin/reviewdog github.com/reviewdog/reviewdog/cmd/reviewdog
bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-check
bin/golangci-lint run -c=.golangci.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-review

- name: Run Tests
env:
AWS_ACCESS_KEY: AKIAZPBRO3QWCEHJTL35
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
run: make test-race

- name: Run Codecov
env:
AWS_ACCESS_KEY: AKIAZPBRO3QWCEHJTL35
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
run: make codecov

- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
go version
go env
pwd
git status
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: goreleaser

on:
push:
# run when new tag is pushed
tags:
- v*
# manually trigger the release
workflow_dispatch:

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ${{ github.workspace }}/go.mod

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/.vscode/
rds_exporter
config.yml
bin/
coverage.txt
46 changes: 46 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
dist: build
builds:
- binary: rds_exporter
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm
- arm64
goarm:
- 7
ignore:
- goos: darwin
goarch: arm
flags:
- -v
ldflags:
- -s -w
- -X github.com/prometheus/common/version.Version={{ .Version }}
- -X github.com/prometheus/common/version.Revision={{ .ShortCommit }}
- -X github.com/prometheus/common/version.Branch={{ .Branch }}
- -X github.com/prometheus/common/version.BuildDate={{ .Date }}
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
wrap_in_directory: true
snapshot:
name_template: "{{ .ShortCommit }}"
changelog:
skip: true
release:
github:
owner: percona
name: rds_exporter
draft: true
prerelease: auto
dockers:
- goos: linux
goarch: amd64
image_templates:
- "ghcr.io/percona/rds_exporter:{{.Major}}.{{.Minor}}"
- "ghcr.io/percona/rds_exporter:{{.Version}}"
dockerfile: Dockerfile.releaser
use: buildx
22 changes: 0 additions & 22 deletions .promu.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ Nothing yet.
- Initial tagged release.


[Unreleased]: https:/github.com/percona/rds_exporter/compare/v0.7.0...master
[Unreleased]: https:/github.com/percona/rds_exporter/compare/v0.7.0...main
[0.7.0]: https://github.com/percona/rds_exporter/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/percona/rds_exporter/releases/tag/v0.6.0
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
FROM golang:1.16-alpine3.13 AS builder
FROM golang:1.19 as builder

RUN apk add --no-cache git build-base
COPY . /usr/src/rds_exporter

RUN cd /usr/src/rds_exporter

FROM alpine:latest

COPY --from=builder /usr/src/rds_exporter/rds_exporter /bin/
# COPY config.yml /etc/rds_exporter/config.yml

FROM alpine:3.13

Expand Down
11 changes: 11 additions & 0 deletions Dockerfile.releaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:latest

COPY ./rds_exporter /bin/

RUN apk update && \
apk add ca-certificates --no-cache && \
update-ca-certificates && \
rm -f /var/cache/apk/*

EXPOSE 9042
ENTRYPOINT [ "/bin/rds_exporter", "--config.file=/etc/rds_exporter/config.yml" ]
Loading
Loading