-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fake metrics endpoint to make ODF happy (#2391)
* Fake metrics endpoint to make ODF happy While the "monitoring-endpoint" configuration in OCS 4.8 was optional, it appears to be required in 4.10, and ODF refuses to deploy if it can't reach the endpoint. This commit provides a fake metrics endpoint to make the ODF operator happy. * feat: Adopt NESE manifests to Operate First repo layout Signed-off-by: Tomas Coufal <[email protected]> Signed-off-by: Tomas Coufal <[email protected]> Co-authored-by: Lars Kellogg-Stedman <[email protected]>
- Loading branch information
Showing
8 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...s/moc-infra/applications/envs/moc/infra/cluster-management/odf-fake-metrics-exporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: odf-fake-metrics-exporter | ||
spec: | ||
destination: | ||
name: moc-infra | ||
namespace: openshift-storage | ||
project: cluster-management | ||
source: | ||
path: fake-metrics-server/overlays/openshift-storage | ||
repoURL: https://github.com/operate-first/apps.git | ||
targetRevision: HEAD | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- Validate=false | ||
- ApplyOutOfSyncOnly=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: fake-metrics-exporter | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: fake-metrics-exporter | ||
image: quay.io/larsks/fake-metrics-exporter:v0.1.0 | ||
ports: | ||
- name: metrics | ||
containerPort: 9283 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
commonLabels: | ||
app.kubernetes.io/name: fake-metrics-server | ||
resources: | ||
- deployment.yaml | ||
- service.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: fake-metrics-exporter | ||
spec: | ||
ports: | ||
- port: 9283 | ||
targetPort: metrics |
17 changes: 17 additions & 0 deletions
17
fake-metrics-server/overlays/openshift-storage/deploy_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: fake-metrics-exporter | ||
spec: | ||
template: | ||
spec: | ||
volumes: | ||
- name: fake-metrics | ||
configMap: | ||
name: fake-metrics | ||
containers: | ||
- name: fake-metrics-exporter | ||
volumeMounts: | ||
- name: fake-metrics | ||
mountPath: /metrics.json | ||
subPath: metrics.json |
11 changes: 11 additions & 0 deletions
11
fake-metrics-server/overlays/openshift-storage/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: openshift-storage | ||
resources: | ||
- ../../base/ | ||
patches: | ||
- path: deploy_patch.yaml | ||
configMapGenerator: | ||
- name: fake-metrics | ||
files: | ||
- metrics.json |
16 changes: 16 additions & 0 deletions
16
fake-metrics-server/overlays/openshift-storage/metrics.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"ceph_health_status": 0.0, | ||
"ceph_osd_flag_noup": 0.0, | ||
"ceph_osd_flag_nodown": 0.0, | ||
"ceph_osd_flag_noout": 0.0, | ||
"ceph_osd_flag_noin": 0.0, | ||
"ceph_osd_flag_nobackfill": 0.0, | ||
"ceph_osd_flag_norebalance": 0.0, | ||
"ceph_osd_flag_norecover": 0.0, | ||
"ceph_osd_flag_noscrub": 0.0, | ||
"ceph_osd_flag_nodeep_scrub": 0.0, | ||
"ceph_num_objects_degraded": 0.0, | ||
"ceph_num_objects_misplaced": 0.0, | ||
"ceph_num_objects_unfound": 0.0, | ||
"ceph_healthcheck_slow_ops": 0.0 | ||
} |