Commit Graph

56 Commits

Author SHA1 Message Date
Arthur Silva Sens
931af3241d Drop Linux capabilities
Signed-off-by: GitHub <noreply@github.com>
2022-02-01 09:25:21 +00:00
ArthurSens
98664db925 Adjust Kubescape threshold
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-27 16:05:39 +00:00
Philip Gough
586fc87b81 make: Lower the threshold for the security scan to account for documented exceptions 2022-01-24 10:58:08 +00:00
Arthur Silva Sens
2d02121731 kubescape: Adjust risk threshold
Signed-off-by: GitHub <noreply@github.com>
2022-01-24 10:31:48 +00:00
Philip Gough
e286f74647 make: Target for security scan 2022-01-17 16:08:19 +00:00
Philip Gough
56aa1a4dc4 make: validate against k8s 1.23.x 2021-12-17 12:40:50 +00:00
Saswata Mukherjee
13cfbe3b3d Setup mdox
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
2021-10-21 19:12:30 +05:30
Arthur Silva Sens
6239bc017a Better ephemeral workspace support with Codespaces
Signed-off-by: GitHub <noreply@github.com>
2021-09-30 21:00:50 +00:00
Damien Grisonnet
76d7cc342b validate: run kubeconform on supported versions
Instead of running kubeconform on only one version of Kubernetes, it
would be better to run it against the 2 latests versions of Kubernetes
that kube-prometheus supports, so that the validation will be in line
with our support policy.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-09-06 18:41:00 +02:00
paulfantom
ed2ffe9d05 *: add "update" target to makefile and use it in automatic updater
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-07-07 10:19:07 +02:00
Sunil Thaha
86d8ed0004 Fix make manifests not building every time
Make target `manifests` has a dependency on build.sh which if untouched
wouldn't generate the manifests after the first run. This patch fixes it
by removing the `build.sh` dependency

Signed-off-by: Sunil Thaha <sthaha@redhat.com>
2021-07-01 12:10:48 +10:00
paulfantom
6dc90593f9 scripts: move test.sh script into scripts dir 2021-06-14 22:47:22 +02:00
fpetkovski
5fbdddf92e Update kubeconform to 0.4.7
This change updates the version of kubeconform to 0.4.7. It simplifies the
`validate` Makefile target and extracts the kubernetes version into a variable.
2021-05-25 15:33:47 +02:00
paulfantom
3670d5bf7d *: add resource validation
Co-Authored-By: Yann Hamon <yann.hamon@contentful.com>
Co-Authored-By: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-29 12:25:28 +01:00
paulfantom
ecbaa85d81 *: add jsonnet-lint to tooling
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-12 15:19:43 +01:00
Ali Akca
2a49d0f8aa Do not export GO111MODULE 2020-11-16 13:50:45 +01:00
Ali Akca
1b12e6882d Migrate tool dependencies to scripts/go.mod 2020-11-16 13:50:43 +01:00
Ali Akca
ead1c35fac Replace go install with go build -o in $TOOLING rule 2020-11-12 23:42:54 +01:00
Alex Sears
fae7e1a987 Add print to find
The `find` call in the Makefile doesn't actually output any `*.libsonnet` file due to the way `find` handles operators. This was discovered using GNU `find` on a Mac. From the manpages:

> Please  note  that -a when specified implicitly (for example by two tests appearing without an explicit operator between them) or explicitly has higher precedence than -o.  This means that find . -name afile -o -name bfile -print will never print afile.

A simple addition of `-print` to force the print fixes the issue.
2020-10-21 15:38:46 -04:00
Damien Grisonnet
c9900d6a57 Makefile: export GO111MODULE=on
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-04-07 10:38:13 +02:00
Damien Grisonnet
026425117d Makefile: use go install instead of go build
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-04-06 18:50:56 +02:00
Damien Grisonnet
9a7ba10755 build.sh: update PATH to use project tooling
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-04-06 18:15:34 +02:00
Damien Grisonnet
0f6cd6d0a8 Makefile: remove containerized tooling
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-04-06 12:47:57 +02:00
paulfantom
4541b9e10c *: bump jb to 0.3.1 to be on par with latest tooling container 2020-03-24 10:38:38 +01:00
Paul Gier
199d619741 Makefile: lock jsonnet-bundler version
The new version (v0.3.1) of jsonnet bundler causes some changes
to go.mod and jsonnetfile.json.  The build should 'go get' a
specific version instead of the latest to prevent new releases
from breaking existing builds.
2020-03-02 21:11:11 -06:00
Paul Gier
92212085c6 Makefile: set bash -o pipefail
Fails if any command in a pipe fails.  Similar to the
prometheus-operator Makefile.
2020-02-06 16:11:13 -06:00
Paul Gier
37c8d369ee generate jsonnet-bundler binary if it's not available
Also locks jsonnet-bundler to version v0.2.0
2020-02-06 16:11:09 -06:00
Benoît Knecht
5686d7b439 Makefile: Fix manifests target dependency (#285)
Since 1664600, manifests are built using `examples/kustomize.jsonnet`
instead of `example.jsonnet`.

This commit updates the dependencies in the `manifests` target to
reflect that change.
2019-10-24 13:37:11 +02:00
paulfantom
7a2befe7fa *: Assume jb and embedmd are already available 2019-10-14 13:49:33 +02:00
Simon Pasquier
e0c232df8b Update Makefile to support jsonnet >= 0.13 2019-09-25 09:16:23 +02:00
Kyle Byerly
3d40f41381 Add proxy for those that are behind one 2019-08-28 15:35:22 -06:00
Frederic Branczyk
c8c850ef2b jsonnet: Use upstream prometheus-mixin 2019-07-11 15:35:48 +02:00
zzg
f21a134fa4 jsonnetfile.lock.json: Update kube-prometheus and regenerate 2019-05-18 04:51:41 +08:00
paulfantom
5fe3df56be Use prebuilt container with jsonnet in it 2019-05-14 14:21:42 +02:00
Matthias Loibl
3c109369d4 Add a working Travis pipeline 2019-04-15 12:17:04 +02:00
Frederic Branczyk
7d1c0bdd73 Merge pull request #2494 from goll/travis-minikube
Update travis to latest minikube, k8s, jsonnet
2019-04-01 18:31:38 +02:00
goll
10bd451f89 Update travis to latest minikube, k8s, jsonnet 2019-03-26 19:30:39 +01:00
Cory O'Daniel
1664600b91 Moved kustomize to own jsonnet file
* [Modified] Makefile to run kustomize.jsonnet
* [Modified] Moved kustomization from example.jsonnet to
examples/kustomize.jsonnet
* [Modified] kustomization file to land at root of kube-prometheus so
current users can continue to use `kubectl apply -f manifests`
2019-03-20 09:55:27 -07:00
Max Leonard Inden
0687c56cea kube-prometheus: Add e2e tests 2019-01-24 12:21:30 +01:00
Frederic Branczyk
9a011bb8ac kube-prometheus: Use locking mechanism for jsonnet dependencies 2018-07-25 17:21:50 +02:00
Max Leonard Inden
cd709826c9 format: Introduce shellcheck [1] for shell script analysis
[1] https://github.com/koalaman/shellcheck
2018-07-08 16:58:17 +02:00
Max Leonard Inden
22066b4708 kube-prometheus/Makefile: Change target output from files to folder
Previously the `manifests` and `vendor` folder content has been build
via `manifests/**` and `vendor/**` target definitions. This results in
two issues:

1. The GNU Make recipe is executed for every single file in the folders.

2. Not all timestamps inside the `manifests` folder would be updated on
every run, thereby needing to be rerun on all following target
executions.

Solution:

1. Define the target based on the folder, not individual files

2. Remove target folder before execution recipe to ensure all timestamps
are updated.
2018-06-26 00:08:30 +08:00
Max Leonard Inden
1d36d01b97 *: Refactor build system
- Move prometheus-config-reloader to cmd/
- Refactor Makefile & contrib/kube-prometheus/Makefile
- Only execute a target if its dependencies changed
  - Create empty target file for docker builds
- Replace promu with plain static `go build`
2018-06-12 13:56:57 +02:00
Frederic Branczyk
1d5623d4a0 kube-prometheus: Extract prometheus-operator jsonnet out of contrib 2018-06-06 18:01:32 +02:00
Frederic Branczyk
e84b101fe7 *: Rename RuleFile to PrometheusRule 2018-06-05 13:34:13 +02:00
Frederic Branczyk
ca057722e5 Add formatting jsonnet to generate make target 2018-05-25 15:56:10 +02:00
Frederic Branczyk
3edf5c5410 Merge pull request #1333 from mxinden/alerting-rule-file-crd
prometheus: Introduce RuleFile Custom Resource Definition
2018-05-18 17:14:28 +02:00
Max Leonard Inden
9e180452f8 prometheus: Introduce RuleFile Custom Resource Definition
This patch introduces a new Custom Resource Definition to the
Prometheus Operator - the Rule CRD. It addresses two main
needs:

1. Prometheus (alerting and recording) Rule validation during creation time
via Kubernetes Custom Resource Definition validation.

2. Life-cycle management of Prometheus application Rules alongside the
application itself, inside the applications Kubernetes namespace, not
necessarily the namespace of the scraping Prometheus instance.

A user defines Prometheus alerting and recording Rules via a Kubernetes
Custom Resource Definition. These Custom Resource Definitions can be
fully validated by the Kubernetes API server during creation time via
automatically generated OpenAPI specifications. Instead of the
restriction of a Prometheus instance to only select Rule definitions
inside its own namespace, the Prometheus specification is extended to
also specify namespaces to look for Rule Custom Resource Definitions
outside its own namespace.

---

Dependent technical changes:

- prometheus: Use github.com/jimmidyson/configmap-reload to reload rules

- prometheus: Remove Prometheus Statefulset deletion function. Starting
with K8s >=1.8 this is handled via OwnerReferences.

- prometheus: Do not add rule files checksum to Prometheus configuration
secret

- prometheus: Update StatefulSet only on relevant changes. Instead of
updating the Prometheus StatefulSet on every `sync()` run, only update
it if the input parameters to `makeStatefulSet` change.  Enforce this
via a checksum of the parameters which is saved inside the annotations
of the statefulset.

- e2e/prometheus: Check how often resources (Secret, ConfigMap,
Prometheus CRD, Service) are updated to enforce that Prometheus Operator
only updated created resources if necessary.

- contrib/prometheus-config-reloader: Remove logic to retriev K8s
ConfigMaps. These are mounted into the pod right away now.
2018-05-18 16:27:20 +02:00
Frederic Branczyk
fef0a65938 Adapt docs on additional rules and dashboards 2018-05-18 11:00:11 +02:00
Frederic Branczyk
3388f96afe Address comments 2018-05-06 08:29:52 -07:00