-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
292 additions
and
162 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
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 |
---|---|---|
@@ -1,31 +1,22 @@ | ||
Request { | ||
method: "PATCH", | ||
uri: "/apis/rbac.authorization.k8s.io/v1/namespaces/keramik-test/rolebindings/monitoring-role-binding?&fieldManager=keramik", | ||
uri: "/api/v1/namespaces/keramik-test/configmaps/otel-config?&fieldManager=keramik", | ||
headers: { | ||
"accept": "application/json", | ||
"content-type": "application/apply-patch+yaml", | ||
}, | ||
body: { | ||
"apiVersion": "rbac.authorization.k8s.io/v1", | ||
"kind": "RoleBinding", | ||
"apiVersion": "v1", | ||
"data": { | ||
"otel-config.yaml": "---\nreceivers:\n # Push based metrics\n otlp:\n protocols:\n grpc:\n endpoint: 0.0.0.0:4317\n # Pull based metrics\n prometheus/scrape_configs:\n config:\n scrape_configs:\n - job_name: 'kubernetes-service-endpoints'\n scrape_interval: 10s\n scrape_timeout: 1s\n\n kubernetes_sd_configs:\n - role: pod\n namespaces:\n own_namespace: true\n # Only container ports named `metrics` will be considered valid targets.\n #\n # Setup relabel rules to give meaning to the following k8s annotations:\n # prometheus/path - URL path of the metrics endpoint\n #\n # Example:\n # annotations:\n # prometheus/path: \"/api/v0/metrics\"\n relabel_configs:\n - source_labels: [__meta_kubernetes_pod_container_port_name]\n action: keep\n regex: \"metrics\"\n - source_labels: [__meta_kubernetes_pod_annotation_prometheus_path]\n action: replace\n target_label: __metrics_path__\n regex: (.+)\n - source_labels: [__meta_kubernetes_namespace]\n action: replace\n target_label: kubernetes_namespace\n - source_labels: [__meta_kubernetes_pod_name]\n action: replace\n target_label: kubernetes_pod\n - source_labels: [__meta_kubernetes_pod_container_name]\n action: replace\n target_label: kubernetes_container\n\nprocessors:\n batch:\n\nexporters:\n # This is unused but can be easily added for debugging.\n logging:\n # can be one of detailed | normal | basic\n verbosity: detailed\n # Log all messages, do not sample\n sampling_initial: 1\n sampling_thereafter: 1\n prometheus/endpoint:\n endpoint: 0.0.0.0:9464\n # Keep stale metrics around for 1h before dropping\n # This helps as simulation metrics are stale once the simulation stops.\n metric_expiration: 1h\n resource_to_telemetry_conversion:\n enabled: true\n # Remote write to prometheus\n prometheusremotewrite:\n endpoint: \"http://prometheus:9090/api/v1/write\"\n tls:\n insecure: true\n\nservice:\n pipelines:\n metrics:\n receivers: [otlp,prometheus/scrape_configs]\n processors: [batch]\n exporters: [prometheus/endpoint,prometheusremotewrite]\n # Enable telemetry on the collector itself\n telemetry:\n logs:\n level: debug\n metrics:\n level: detailed\n address: 0.0.0.0:8888\n" | ||
}, | ||
"kind": "ConfigMap", | ||
"metadata": { | ||
"labels": { | ||
"managed-by": "keramik" | ||
}, | ||
"name": "monitoring-role-binding", | ||
"name": "otel-config", | ||
"ownerReferences": [] | ||
}, | ||
"roleRef": { | ||
"apiGroup": "rbac.authorization.k8s.io", | ||
"kind": "Role", | ||
"name": "monitoring-role" | ||
}, | ||
"subjects": [ | ||
{ | ||
"kind": "ServiceAccount", | ||
"name": "monitoring-service-account", | ||
"namespace": "keramik-test" | ||
} | ||
] | ||
} | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
Request { | ||
method: "PATCH", | ||
uri: "/apis/rbac.authorization.k8s.io/v1/namespaces/keramik-test/rolebindings/monitoring-role-binding?&fieldManager=keramik", | ||
headers: { | ||
"accept": "application/json", | ||
"content-type": "application/apply-patch+yaml", | ||
}, | ||
body: { | ||
"apiVersion": "rbac.authorization.k8s.io/v1", | ||
"kind": "RoleBinding", | ||
"metadata": { | ||
"labels": { | ||
"managed-by": "keramik" | ||
}, | ||
"name": "monitoring-role-binding", | ||
"ownerReferences": [] | ||
}, | ||
"roleRef": { | ||
"apiGroup": "rbac.authorization.k8s.io", | ||
"kind": "Role", | ||
"name": "monitoring-role" | ||
}, | ||
"subjects": [ | ||
{ | ||
"kind": "ServiceAccount", | ||
"name": "monitoring-service-account", | ||
"namespace": "keramik-test" | ||
} | ||
] | ||
}, | ||
} |
File renamed without changes.
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 |
---|---|---|
@@ -1,83 +1,19 @@ | ||
Request { | ||
method: "PATCH", | ||
uri: "/apis/apps/v1/namespaces/keramik-test/statefulsets/prometheus?&fieldManager=keramik", | ||
uri: "/api/v1/namespaces/keramik-test/serviceaccounts/monitoring-service-account?&fieldManager=keramik", | ||
headers: { | ||
"accept": "application/json", | ||
"content-type": "application/apply-patch+yaml", | ||
}, | ||
body: { | ||
"apiVersion": "apps/v1", | ||
"kind": "StatefulSet", | ||
"apiVersion": "v1", | ||
"kind": "ServiceAccount", | ||
"metadata": { | ||
"labels": { | ||
"managed-by": "keramik" | ||
}, | ||
"name": "prometheus", | ||
"name": "monitoring-service-account", | ||
"ownerReferences": [] | ||
}, | ||
"spec": { | ||
"replicas": 1, | ||
"selector": { | ||
"matchLabels": { | ||
"app": "prometheus" | ||
} | ||
}, | ||
"serviceName": "", | ||
"template": { | ||
"metadata": { | ||
"labels": { | ||
"app": "prometheus" | ||
} | ||
}, | ||
"spec": { | ||
"containers": [ | ||
{ | ||
"command": [ | ||
"/bin/prometheus", | ||
"--web.enable-lifecycle", | ||
"--web.enable-remote-write-receiver", | ||
"--config.file=/config/prom-config.yaml" | ||
], | ||
"image": "prom/prometheus:v2.45.6", | ||
"name": "prometheus", | ||
"ports": [ | ||
{ | ||
"containerPort": 9090, | ||
"name": "webui" | ||
} | ||
], | ||
"resources": { | ||
"limits": { | ||
"cpu": "250m", | ||
"ephemeral-storage": "1Gi", | ||
"memory": "1Gi" | ||
}, | ||
"requests": { | ||
"cpu": "250m", | ||
"ephemeral-storage": "1Gi", | ||
"memory": "1Gi" | ||
} | ||
}, | ||
"volumeMounts": [ | ||
{ | ||
"mountPath": "/config", | ||
"name": "config", | ||
"readOnly": true | ||
} | ||
] | ||
} | ||
], | ||
"volumes": [ | ||
{ | ||
"configMap": { | ||
"defaultMode": 493, | ||
"name": "prom-config" | ||
}, | ||
"name": "config" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,22 +1,51 @@ | ||
Request { | ||
method: "PATCH", | ||
uri: "/api/v1/namespaces/keramik-test/configmaps/otel-config?&fieldManager=keramik", | ||
uri: "/api/v1/namespaces/keramik-test/services/otel?&fieldManager=keramik", | ||
headers: { | ||
"accept": "application/json", | ||
"content-type": "application/apply-patch+yaml", | ||
}, | ||
body: { | ||
"apiVersion": "v1", | ||
"data": { | ||
"otel-config.yaml": "---\nreceivers:\n # Push based metrics\n otlp:\n protocols:\n grpc:\n endpoint: 0.0.0.0:4317\n # Pull based metrics\n prometheus/scrape_configs:\n config:\n scrape_configs:\n - job_name: 'kubernetes-service-endpoints'\n scrape_interval: 10s\n scrape_timeout: 1s\n\n kubernetes_sd_configs:\n - role: pod\n namespaces:\n own_namespace: true\n # Only container ports named `metrics` will be considered valid targets.\n #\n # Setup relabel rules to give meaning to the following k8s annotations:\n # prometheus/path - URL path of the metrics endpoint\n #\n # Example:\n # annotations:\n # prometheus/path: \"/api/v0/metrics\"\n relabel_configs:\n - source_labels: [__meta_kubernetes_pod_container_port_name]\n action: keep\n regex: \"metrics\"\n - source_labels: [__meta_kubernetes_pod_annotation_prometheus_path]\n action: replace\n target_label: __metrics_path__\n regex: (.+)\n - source_labels: [__meta_kubernetes_namespace]\n action: replace\n target_label: kubernetes_namespace\n - source_labels: [__meta_kubernetes_pod_name]\n action: replace\n target_label: kubernetes_pod\n - source_labels: [__meta_kubernetes_pod_container_name]\n action: replace\n target_label: kubernetes_container\n\nprocessors:\n batch:\n\nexporters:\n # This is unused but can be easily added for debugging.\n logging:\n # can be one of detailed | normal | basic\n verbosity: detailed\n # Log all messages, do not sample\n sampling_initial: 1\n sampling_thereafter: 1\n prometheus/endpoint:\n endpoint: 0.0.0.0:9464\n # Keep stale metrics around for 1h before dropping\n # This helps as simulation metrics are stale once the simulation stops.\n metric_expiration: 1h\n resource_to_telemetry_conversion:\n enabled: true\n # Remote write to prometheus\n prometheusremotewrite:\n endpoint: \"http://prometheus:9090/api/v1/write\"\n tls:\n insecure: true\n\nservice:\n pipelines:\n metrics:\n receivers: [otlp,prometheus/scrape_configs]\n processors: [batch]\n exporters: [prometheus/endpoint,prometheusremotewrite]\n # Enable telemetry on the collector itself\n telemetry:\n logs:\n level: debug\n metrics:\n level: detailed\n address: 0.0.0.0:8888\n" | ||
}, | ||
"kind": "ConfigMap", | ||
"kind": "Service", | ||
"metadata": { | ||
"labels": { | ||
"managed-by": "keramik" | ||
}, | ||
"name": "otel-config", | ||
"name": "otel", | ||
"ownerReferences": [] | ||
}, | ||
"spec": { | ||
"ports": [ | ||
{ | ||
"name": "otlp-receiver", | ||
"port": 4317, | ||
"protocol": "TCP", | ||
"targetPort": 4317 | ||
}, | ||
{ | ||
"name": "all-metrics", | ||
"port": 9464, | ||
"protocol": "TCP", | ||
"targetPort": 9464 | ||
}, | ||
{ | ||
"name": "sim-metrics", | ||
"port": 9465, | ||
"protocol": "TCP", | ||
"targetPort": 9465 | ||
}, | ||
{ | ||
"name": "self-metrics", | ||
"port": 8888, | ||
"protocol": "TCP", | ||
"targetPort": 8888 | ||
} | ||
], | ||
"selector": { | ||
"app": "otel" | ||
}, | ||
"type": "ClusterIP" | ||
} | ||
}, | ||
} |
Oops, something went wrong.