Commit graph

50 commits

Author SHA1 Message Date
Damien Grisonnet
01b29a6578 *: fix openapi-gen options
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2024-05-16 14:26:37 +02:00
Damien Grisonnet
1d31a46aa1 *: update-lint
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2024-05-16 14:26:37 +02:00
Damien Grisonnet
fdde189945 *: bump deps
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2024-05-16 14:26:36 +02:00
Jason
a64d132d91 Update prometheus-adapter go patch versions 2023-11-07 02:48:54 +00:00
Jason Booth
6a1ba321da Update prometheus-adapter go patch versions
Upgrade to 1.20.7 to address multiple CVE security findings
    CVE-2023-29404
    CVE-2023-29402
    CVE-2023-29405
    CVE-2023-29403
    CVE-2023-39533
    CVE-2023-29409
    CVE-2023-29406
2023-08-30 13:53:44 -04:00
Damien Grisonnet
e69388346f *: bump go to 1.20 and k8s deps to 0.27.2
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-06-20 18:39:50 +02:00
Damien Grisonnet
86efb37019 Update golangci-lint to 1.53.2
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-06-13 15:02:46 +02:00
Kubernetes Prow Robot
f607905cf6
Merge pull request #539 from olivierlemasle/e2e
Add initial e2e tests
2023-01-19 03:30:34 -08:00
Olivier Lemasle
1145dbfe93 Add initial e2e tests 2023-01-19 12:20:42 +01:00
Greg Burton
d341e8f67b Patch upgrade of Golang to 1.18.9
Signed-off-by: Greg Burton <9094087+gburton1@users.noreply.github.com>
2022-12-27 16:15:18 -08:00
Olivier Lemasle
0ea1c1b8d3 Use Golangci-lint 2022-11-28 23:17:16 +01:00
Damien Grisonnet
d2ae4c1569 go.mod: bump golang and k8s deps to 0.24.3
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2022-08-11 15:04:43 +02:00
Damien Grisonnet
9fd8918914 image: fix push-multi-arch image deployment
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-07-06 16:51:17 +02:00
Damien Grisonnet
670b3def30 Makefile: stop populating IMAGE env variable
The IMAGE env variable is used by prow when building images, so it was
replacing what we would have expected to be the `prometheus-adapter`
image by the container image used to build the prometheus-adapter image.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-07-01 15:18:12 +02:00
Damien Grisonnet
467f24d45c image: default to gcr.io instead of hub.docker.com
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-06-30 19:27:04 +02:00
Damien Grisonnet
046b970edb deploy: improve container push rules
Improve and cleanup container push rules to prepare for the move to the
official gcr.k8s.io registry.
As part of the improvements, I replaced the non cross platform busybox
image by gcr.io/distroless/static:latest which is platform agnostic.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-06-30 15:03:49 +02:00
paulfantom
aae4ef6b51
*: add version file
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-06-03 16:02:21 +02:00
Damien Grisonnet
03e8eb8ddb Makefile: consolidate docker-build
As part of this commit, I upgraded the golang image used for building to
1.16 and consolidated how the docker-build rule was working. Previously,
it was failing in master's CI because the go modules were not downloaded
in the build image. To improve that, I replaced the combination of
docker run and docker build by a multi-stage Dockerfile responsible for
building the adapter and running it.

In addition to that, I removed the `_output` directory completely as it
wasn't really meaningful to have it anymore. I also removed the
`build-local-image` rule as it was a duplicate of the `docker-build`
rule with the only different of using a scratch base image.

Also, since all the base images that we are using by default are based
on busybox, I change the UID used in the image to 65534 which correspond
to the nobody user in busybox.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-06-02 17:12:27 +02:00
Damien Grisonnet
9dfbca09ca go.mod: move to sigs.k8s.io golang package
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-06-01 17:35:45 +02:00
Damien Grisonnet
39b782bce9 chore: remove vendor directory
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-05-26 09:41:03 +02:00
Damien Grisonnet
7bc0f0473d hack/tools: remove openapi-gen install in vendor
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-05-25 19:13:16 +02:00
Damien Grisonnet
737c8232e1 Makefile: include tests from cmd directory
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-03-10 16:53:26 +01:00
paulfantom
cd55a67b89
*: move all imports to github.com/kubernetes-sigs/prometheus-adapter
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-22 15:49:03 +01:00
Sergiusz Urbaniak
96cdc4d143 Makefile: bump to Go 1.15 2020-12-14 12:54:22 +01:00
Johannes Würbach
b09c680295
ensure openapi is up-to-date and use same kube-openapi version 2020-11-10 16:07:17 +01:00
Johannes Würbach
1d44cbbbb8
Serve openapi spec 2020-10-23 11:06:41 +02:00
Johannes Würbach
d6b587d52b
Use build args to fix building on macos 2020-04-15 13:51:44 +02:00
Sergiusz Urbaniak
cd12d4a020 Makefile, go.mod: bump to 1.13 2020-02-13 12:08:03 +01:00
dbenoit
dce4c3f75f remove hard-coded amd64 arch 2019-07-16 10:08:31 -04:00
paulfantom
3365677208
*: use proper golang image and always set go111module in build pipeline 2019-06-20 14:47:40 +02:00
paulfantom
a47edfe5a9
*: move to go1.12 and go modules 2019-06-20 13:50:10 +02:00
root
a02ca0fbad Edited Makefile to add cross build support for s390x. As golang:1.10 has multi-arch support added for s390x. 2019-01-08 16:02:17 +05:30
Solly Ross
a293b2bf94 Check in the vendor directory
Travis seems to be having issues pulling deps, so we'll have to check in
the vendor directory and prevent the makefile from trying to regenerate
it normally.
2018-07-13 17:32:49 -04:00
Solly Ross
ec335c0777 Fix cross-compile typo in Makefile
The makefile target for the output directory was hardcoded to $(ARCH),
independent of the actual target input in the makefile.  This fixes
that.
2018-07-12 15:05:43 -04:00
Solly Ross
8e91086e1e dep ensure verbosely
This makes the Makefile run `dep ensure` verbosely for easier debugging on
Travis.
2018-07-03 11:36:35 -04:00
Solly Ross
be018f76e3 Update dependencies to Kubernetes 1.11
This updates our dependencies to the Kubernetes 1.11 versions.
In the future, this will also allow us to support the external
metrics API.
2018-06-27 16:57:50 -04:00
Solly Ross
1e5cd68533 Makefile with actual deps
This makes the makefile's build target have actual dependencies, so that
it only rebuilds any given adapter if that adapter's actual go files
have changed (yes, this is mostly redundant with Go 1.10, but it makes
working on read-only filesystems a bit nicer).
2018-06-27 16:56:20 -04:00
Solly Ross
ad1837e9b5 Switch to dep for dependency management
I find it to be a bit faster in some cases, and easier to work with.
2018-06-22 16:06:12 -04:00
Duane D'Souza
5e307fb2b4
Update Makefile to support s390x
Updated Makefile to include changes to the docker-build step, to add support for s390x.
2018-05-15 11:40:37 +05:30
Arto Jantunen
0eddfe5e6d Use rm -rf instead of sudo when removing the temp dir 2018-01-23 13:35:02 +02:00
Lucas Käldström
bc8fd52523
add option to fetch vendor dockerized 2017-07-06 14:31:32 +03:00
Solly Ross
417f5a9f99 [build] Add gofmt-related Makefile targets
This adds `verify-gofmt` and `gofmt` make targets for quick go-fmting.
It also adds a `verify` target which verifies `gofmt` and the runs the
unit tests.

Travis now runs `make verify` instead of just `make test` as the tests.
2017-06-27 19:01:39 -04:00
Solly Ross
d46c73ae6f [build] mark phony targets as such
This commit marks the phony targets in the Makefile as phony, following
good Makefile practices (for example, so we don't have have issues with
someone creating a file with a matching name in the future, etc).
2017-06-27 11:07:35 -04:00
Solly Ross
88b3531ef5 [build] add a test target
This commit adds a target for running `go test`.
2017-06-27 11:07:34 -04:00
Solly Ross
91bc1dcd71 [build] cause all to trigger build
This commit causes the `all` Makefile rule to trigger `build` instead
of `docker-build`.  This allows people with convoluted setups that
involve `go build`-ing and `docker build`-ing on different machines (like
@directxman12) to not complain as much.
2017-06-26 16:27:53 -04:00
Solly Ross
a723582f58 [build] add make rule for vendor
This commit adds a Makefile rule for installing the vendor directory.
Both the `build` and `docker-build` phony rules depend on the `vendor`
rule, which in turn depends on the `glide.lock` rule.  This means that
any time the `glide.lock` file is updated, the vendor directory will be
re-installed.
2017-06-26 16:27:53 -04:00
Solly Ross
3618aafca4 [build] fix build makefile target path
The `build` Makefile target attempted to place the generated artifact in
`/build`, where it should have used a local directory instead.  This
commit makes the directory configurable using the `OUT_DIR` argument,
and defaults it to ./_output
2017-06-26 16:27:26 -04:00
Lucas Käldström
a4aac78cca
Move the adapter binary to a separate subdir 2017-06-26 22:09:22 +03:00
Lucas Käldström
c4e6f3307f
Update Makefile to release and build for multiple platforms 2017-06-26 20:11:15 +03:00
Solly Ross
66cf5eaafb Provide basic deployment instructions
This commit introduces a Dockerfile with some basic deployment
instructions, as well as a makefile for convinience.
2017-06-24 01:42:10 -04:00