Commit Graph

232 Commits

Author SHA1 Message Date
a64e9c8e86
core(deps): update git.cryptic.systems/volker.raschek/git to 1.3.1 2023-10-02 12:28:28 +02:00
535cbe329d
style(REAMDE): break lines at 80chars
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-04 21:40:09 +02:00
e6abacc330
style(REAMDE): adapt headlines
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-04 21:38:16 +02:00
af284a1a98
fix(ci): add pipeline to release container images
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-09-04 21:35:18 +02:00
555a7ce696
fix(makefile): use podman instead of docker 2023-07-09 12:59:32 +02:00
c38e6019ca
fix(ci): remove gitlab-ci 2023-07-09 12:58:36 +02:00
815b50bcd9
fix(ci): goreleaser 2023-07-09 12:57:54 +02:00
9de2fe131f
fix(ci): remove gitlab-ci 2023-07-09 12:57:41 +02:00
c7b68277d5
fix: rename application 2023-07-09 12:57:07 +02:00
5aee3ba3e7
fix: add LICENSE owner 2023-07-09 12:54:50 +02:00
2434615258
feat: multi-stage build for container image
Adapt the Makefile and Dockerfile for a multi-stage build of the
container image. It is now not anymore required to have go locally
installed to build the container image.

Inside the multi-stage build, the newly create make install command will
be executed. The compbiled files will than be copied to a new base image
with less dependencies.

Further improvement would be to use instead of debian:10 scratch,
because the application does not have any C dependencies
(CGO_ENABLED=0).

Additionally it is not possible to build the container image with
alternative container runtimes like podman instead of docker.

make build/container-image CONTAINER_RUNTIME=podman

The used base image names are now defined as fully qualified image names
(with registry host), to support local container registry mirror
configurations.
2023-07-07 14:42:42 +02:00
3639b7a3f4
fix(Makefile): add uninstall target 2023-07-07 13:33:21 +02:00
099694c636
fix(Makefile): add install target 2023-07-07 13:30:23 +02:00
003f740c2d
fix(Makefile): trim pkg path 2023-07-07 13:29:55 +02:00
Hector
235d34114b merge: chore/exclude-new-merge-messages-from-changelog
* Merge branch 'chore/exclude-new-merge-messages-from-changelog' into 'main'
* See merge request hectorjsmith/fail2ban-prometheus-exporter!104
* Merged by: Hector <hector@hjs.dev>
2023-07-03 07:18:37 +00:00
Hector
29d03c5a88 chore: exclude new merge messages from changelog (!104)
* Update the goreleaser config to exclude the new merge commit messages

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/104
2023-07-03 07:18:37 +00:00
Hector
a388773836 merge: chore/dependency-updates
* Merge branch 'chore/dependency-updates' into 'main'
* See merge request hectorjsmith/fail2ban-prometheus-exporter!103
* Merged by: Hector <hector@hjs.dev>
2023-07-03 07:03:14 +00:00
Hector
fdd223c96b chore: dependency updates (!103)
* Update dependencies to their latest versions

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/103
2023-07-03 07:03:14 +00:00
Hector
fe039c0787 Merge branch 'docs/add-go-report-card-to-readme' into 'main'
docs: add go report card to readme

See merge request hectorjsmith/fail2ban-prometheus-exporter!102
2023-06-23 20:42:46 +00:00
Hector
426011fe14 docs: add go report card to readme (!102)
* Add a badge with the project's go report card to the project `README` file

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/102
2023-06-23 20:42:46 +00:00
Hector
f877fcb79d Merge branch 'ci/fix-release-step-script' into 'main'
ci: fix release step script

See merge request hectorjsmith/fail2ban-prometheus-exporter!101
2023-06-22 21:52:31 +00:00
Hector
8c67048868 ci: fix release step script (!101)
* Fix the yaml config for the release step to handle a multi-line command

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/101
2023-06-22 21:52:31 +00:00
Hector
0a132c83df Merge branch 'docs/add-dry-run-command-to-readme' into 'main'
docs: add dry run flag to readme

See merge request hectorjsmith/fail2ban-prometheus-exporter!100
2023-06-22 18:37:01 +00:00
Hector
e46da3e7dd docs: add dry run flag to readme (!100)
* Update `README` to include the new `--dry-run` flag

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/100
2023-06-22 18:37:01 +00:00
Hector
18000cf9ef Merge branch 'ci/add-go-vet-to-test-stage' into 'main'
ci: add go vet to test stage

See merge request hectorjsmith/fail2ban-prometheus-exporter!99
2023-06-22 18:24:15 +00:00
Hector
b6cec83503 ci: add go vet to test stage (!99)
* Add `go vet` to the test stage of the Gitlab CI/CD pipeline
* Fix issues raised by `go vet`

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/99
2023-06-22 18:24:15 +00:00
Hector
8d457da2b9 Merge branch 'feat/add-new-dry-run-mode' into 'main'
feat: add new dry run mode

See merge request hectorjsmith/fail2ban-prometheus-exporter!98
2023-06-22 16:09:36 +00:00
Hector
9c1a10e309 feat: add new dry run mode (!98)
* Add a new *dry-run* mode to exit just before running the server
* This allows testing that the socket is working before starting the server

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/98
2023-06-22 16:09:36 +00:00
Hector
5275d280be Merge branch 'build/disable-cgo-for-makefile-build' into 'main'
build: disable cgo for makefile build

See merge request hectorjsmith/fail2ban-prometheus-exporter!97
2023-06-22 15:22:42 +00:00
Hector
b9ab77d62d build: disable cgo for makefile build (!97)
* Disable `CGO` in the makefile build to avoid dependencies on external C libraries
* This also aligns with the build done for releases and docker images

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/97
2023-06-22 15:22:42 +00:00
Hector
5f879e1921 Merge branch 'feat/print-fail2ban-version-on-startup' into 'main'
feat: print fail2ban version on startup

See merge request hectorjsmith/fail2ban-prometheus-exporter!96
2023-06-22 15:16:12 +00:00
Hector
8e0284d9f0 feat: print fail2ban version on startup (!96)
* Print the version reported by `fail2ban-server` when the exporter starts up
* Logs an error if the connection to the server fails

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/96
2023-06-22 15:16:12 +00:00
Hector
d1b65a2134 Merge branch 'chore/replace-ioutils-with-os-calls' into 'main'
chore: replace ioutil with os calls

See merge request hectorjsmith/fail2ban-prometheus-exporter!95
2023-06-22 14:33:57 +00:00
Hector
dc342e3051 chore: replace ioutil with os calls (!95)
* Replace calls to deprecated `ioutil` functions with the `os` package

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/95
2023-06-22 14:33:56 +00:00
Hector
1508693dd6 Merge branch 'chore/rename-examples-folder' into 'main'
chore: rename examples folder

See merge request hectorjsmith/fail2ban-prometheus-exporter!94
2023-06-22 14:22:31 +00:00
Hector
594d9f26a1 chore: rename examples folder (!94)
* Rename the `examples` folder to `_examples` to distinguish it from source code folders

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/94
2023-06-22 14:22:31 +00:00
Hector
938860d5dc Merge branch 'set-dependency-scanning-config-1' into 'main'
ci: configure dependency scanning

See merge request hectorjsmith/fail2ban-prometheus-exporter!93
2023-06-21 17:50:43 +00:00
Hector
cfa20f6c1d ci: configure dependency scanning (!93)
* Enable dependency scanning CI pipeline

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/93
2023-06-21 17:50:43 +00:00
Hector
211a5015d0 Merge branch 'chore/update-makefile-commands' into 'main'
chore: update makefile commands

See merge request hectorjsmith/fail2ban-prometheus-exporter!92
2023-06-21 15:02:11 +00:00
Hector
56ecc03341 chore: update makefile commands (!92)
* Tweak makefile commands and file formatting
* Remove command and build step for go mod formatting
* Add command to update project dependencies
* Add make command to list all make commands

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/92
2023-06-21 15:02:11 +00:00
Hector
b32bbeb1cd Merge branch 'fix/set-http-server-timeouts' into 'main'
fix: set http server timeouts

See merge request hectorjsmith/fail2ban-prometheus-exporter!91
2023-06-21 11:09:39 +00:00
Hector
37b67643e8 fix: set http server timeouts (!91)
* Set timeout values when configuring the HTTP server to mitigate "Slowloris" vulnerability

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/91
2023-06-21 11:09:39 +00:00
Hector
1eec68b49b Merge branch 'refactor/move-server-setup-code-to-new-package' into 'main'
refactor: move server setup code to new package

See merge request hectorjsmith/fail2ban-prometheus-exporter!90
2023-06-21 10:58:43 +00:00
Hector
11c4b26c0b refactor: move server setup code to new package (!90)
* Move code setting up the HTTP server to it's own package
* This helps clean up the `main` function and make it easier to read
* Rename the `BasicAuthMiddleware` to remove reference to Basic since it can now handle any type of auth type

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/90
2023-06-21 10:58:43 +00:00
Hector
41b05f7e16 Merge branch 'refactor/rewrite-auth-handler-code' into 'main'
refactor: rewrite auth handler code

See merge request hectorjsmith/fail2ban-prometheus-exporter!89
2023-06-21 10:31:33 +00:00
Hector
3cff8ccd64 refactor: rewrite auth handler code (!89)
* Rewrite the code handling basic auth to make it easier to extend for other types of auth.
* The behaviour of the existing code is maintained.
* No changes to how basic auth is configured from a user's perspective.

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/89
2023-06-21 10:31:33 +00:00
Hector
3215fe5f4c Merge branch 'refactor/replace-cli-parser-with-kong' into 'main'
refactor: replace cli parser with kong

See merge request hectorjsmith/fail2ban-prometheus-exporter!88
2023-06-20 20:16:23 +00:00
Hector
43cab7adc2 refactor: replace cli parser with kong (!88)
https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/88
2023-06-20 20:16:23 +00:00
Hector
d584345fc6 Merge branch 'ci/add-sast-step-to-pipeline' into 'main'
ci: add sast step to pipeline

See merge request hectorjsmith/fail2ban-prometheus-exporter!87
2023-06-20 17:24:16 +00:00
Hector
8974395bba ci: add sast step to pipeline (!87)
https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/87
2023-06-20 17:24:16 +00:00