Skip to content

Commit

Permalink
Docs: Update Getting-Started examples
Browse files Browse the repository at this point in the history
Updates getting-started example yaml scripts to match
their declared purpose - creates 2 new snippets to
achieve this.

Signed-off-by: GuyTempleton <guy.templeton@skyscanner.net>
  • Loading branch information
gjtempleton committed Nov 19, 2019
1 parent e52713e commit 5fef890
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Documentation/user-guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ For more information, see the [Prometheus Operator RBAC guide][prom-rbac].

A Prometheus object defines the `serviceMonitorSelector` to specify which ServiceMonitors should be included. Above the label `team: frontend` was specified, so that's what the Prometheus object selects by.

[embedmd]:# (../../example/user-guides/getting-started/prometheus.yaml)
[embedmd]:# (../../example/user-guides/getting-started/prometheus-service-monitor.yaml)
```yaml
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
Expand All @@ -347,15 +347,15 @@ This enables the frontend team to create new ServiceMonitors and Services which

Finally, a Prometheus object defines the `podMonitorSelector` to specify which PodMonitors should be included. Above the label `team: frontend` was specified, so that's what the Prometheus object selects by.

[embedmd]:# (../../example/user-guides/getting-started/prometheus.yaml)
[embedmd]:# (../../example/user-guides/getting-started/prometheus-pod-monitor.yaml)
```yaml
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
spec:
serviceAccountName: prometheus
serviceMonitorSelector:
podMonitorSelector:
matchLabels:
team: frontend
resources:
Expand Down Expand Up @@ -404,7 +404,7 @@ This API access is disabled by default and can be toggled using this boolean fla
> user is advised to add additional authentication authorization via a proxy to
> ensure only clients authorized to perform these actions can do so.

[embedmd]:# (../../example/user-guides/getting-started/prometheus.yaml)
[embedmd]:# (../../example/user-guides/getting-started/prometheus-admin-api.yaml)
```yaml
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
Expand All @@ -418,7 +418,7 @@ spec:
resources:
requests:
memory: 400Mi
enableAdminAPI: false
enableAdminAPI: true
```

Further reading:
Expand Down
13 changes: 13 additions & 0 deletions example/user-guides/getting-started/prometheus-admin-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
spec:
serviceAccountName: prometheus
serviceMonitorSelector:
matchLabels:
team: frontend
resources:
requests:
memory: 400Mi
enableAdminAPI: true
13 changes: 13 additions & 0 deletions example/user-guides/getting-started/prometheus-pod-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
spec:
serviceAccountName: prometheus
podMonitorSelector:
matchLabels:
team: frontend
resources:
requests:
memory: 400Mi
enableAdminAPI: false

0 comments on commit 5fef890

Please sign in to comment.