Skip to content

Commit 087371e

Browse files
Commit prometheus-operator CRDs (#286)
Co-authored-by: ArthurSens <[email protected]>
1 parent 689ad69 commit 087371e

15 files changed

+19340
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ diff
1212
!monitoring-satellite/manifests/kubescape/*
1313
!monitoring-satellite/manifests/probers/*
1414
!monitoring-satellite/manifests/kube-prometheus-rules/*
15+
!monitoring-satellite/manifests/crds/*

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ repos:
4444
language: golang
4545
pass_filenames: false
4646

47-
exclude: (^vendor|^hack\/deploy-.*)
47+
exclude: (^vendor|^hack\/deploy-.*|^monitoring-satellite\/manifests\/)

hack/deploy-crds.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@ if [[ $KUBECONFIG != "" ]]; then
2323
KUBECONFIG_FLAG="--kubeconfig ${KUBECONFIG}"
2424
fi
2525

26-
# shellcheck disable=SC2044
27-
for CRD in $(find monitoring-satellite/manifests/prometheusOperator/ -type f -name "*CustomResourceDefinition.yaml");
28-
do
29-
kubectl $KUBECONFIG_FLAG replace -f $CRD || kubectl $KUBECONFIG_FLAG create -f $CRD
30-
done
26+
kubectl $KUBECONFIG_FLAG apply -f monitoring-satellite/manifests/crds/ --server-side
3127

3228
until kubectl $KUBECONFIG_FLAG get servicemonitors.monitoring.coreos.com --all-namespaces ; do date; sleep 1; echo ""; done
3329
until kubectl $KUBECONFIG_FLAG get prometheusrules.monitoring.coreos.com --all-namespaces ; do date; sleep 1; echo ""; done
34-
35-
kubectl $KUBECONFIG_FLAG apply -f monitoring-satellite/manifests/pyrra/crd.yaml

hack/prepare-kind.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#!/bin/bash
22

33
# shellcheck disable=SC2230
4-
if [[ $(which kind) != 0 ]]; then
5-
# shellcheck disable=SC2016
6-
echo 'kind not available in $PATH, installing latest kind'
7-
# Install latest kind
8-
curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest \
9-
| grep "browser_download_url.*kind-linux-amd64" \
10-
| cut -d : -f 2,3 \
11-
| tr -d \" \
12-
| wget -qi -
13-
sudo mv kind-linux-amd64 /usr/bin/kind && sudo chmod +x /usr/bin/kind
14-
rm -f kind-linux-amd64*
4+
if ! command -v kind; then
5+
# shellcheck disable=SC2016
6+
echo 'kind not available in $PATH, installing latest kind'
7+
# Install latest kind
8+
curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest |
9+
grep "browser_download_url.*kind-linux-amd64" |
10+
cut -d : -f 2,3 |
11+
tr -d \" |
12+
wget -qi -
13+
sudo mv kind-linux-amd64 /usr/bin/kind && sudo chmod +x /usr/bin/kind
14+
rm -f kind-linux-amd64*
1515
fi
1616

1717
cluster_created=$(kind get clusters 2>&1)
1818
if [[ "$cluster_created" == "No kind clusters found." ]]; then
19-
kind create cluster --config "${PWD}"/.github/workflows/kind/config.yml
19+
kind create cluster --config "${PWD}"/.github/workflows/kind/config.yml
2020
else
21-
echo "Cluster ${cluster_created} already present"
21+
echo "Cluster ${cluster_created} already present"
2222
fi

installer/pkg/config/config.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ func Defaults(in interface{}) error {
2929
Install: false,
3030
}
3131

32-
cfg.Prometheus = &Prometheus{
33-
RemoteWrite: []*RemoteWrite{},
34-
}
35-
3632
cfg.Pyrra = &Pyrra{
3733
Install: false,
3834
}

monitoring-satellite/manifests/crds/prometheusOperator-0alertmanagerConfigCustomResourceDefinition.yaml

Lines changed: 3397 additions & 0 deletions
Large diffs are not rendered by default.

monitoring-satellite/manifests/crds/prometheusOperator-0alertmanagerCustomResourceDefinition.yaml

Lines changed: 4257 additions & 0 deletions
Large diffs are not rendered by default.

monitoring-satellite/manifests/crds/prometheusOperator-0podmonitorCustomResourceDefinition.yaml

Lines changed: 529 additions & 0 deletions
Large diffs are not rendered by default.

monitoring-satellite/manifests/crds/prometheusOperator-0probeCustomResourceDefinition.yaml

Lines changed: 567 additions & 0 deletions
Large diffs are not rendered by default.

monitoring-satellite/manifests/crds/prometheusOperator-0prometheusCustomResourceDefinition.yaml

Lines changed: 5782 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)