Skip to content

Commit

Permalink
moved and renamed files (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlittlebird authored Jul 6, 2021
1 parent 5699f45 commit 9b478b9
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 31 deletions.
18 changes: 6 additions & 12 deletions docs/operator/README.md → docs/operator/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
+++
title = "Grafana Agent Operator"
weight = 500
+++

# Grafana Agent Operator

The Grafana Agent Operator is a Kubernetes operator that makes it easier to
deploy the Grafana Agent and easier to collect telemetry data from your pods.
deploy the Grafana Agent and collect telemetry data from your pods.
It is currently in **beta**, and is subject to change at any time.

It works by watching for [Kubernetes custom resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
Expand All @@ -18,14 +23,3 @@ project. These custom resources represent abstractions for monitoring services,
pods, and ingresses. They are especially useful for Helm users, where manually
writing a generic SD to match all your charts can be difficult (or impossible!)
or where manually writing a specific SD for each chart can be tedious.

## Table of Contents

1. [Getting Started](./getting-started.md)
1. [Deploying CustomResourceDefinitions](./getting-started.md#deploying-customresourcedefinitions)
2. [Installing on Kubernetes](./getting-started.md#installing-on-kubernetes)
3. [Running locally](./getting-started.md#running-locally)
4. [Deploying GrafanaAgent](./getting-started.md#deploying-grafanagent)
2. [FAQ](./faq.md)
3. [Architecture](./architecture.md)
4. [Maintainers Guide](./maintainers-guide.md)
15 changes: 5 additions & 10 deletions docs/operator/faq.md → docs/operator/add-custom-scrape-jobs.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# FAQ
+++
title = "Add custom scrape jobs"
weight = 400
+++

## Where do I find information on the supported values for the CustomResourceDefinitions?

Once you've [deployed the CustomResourceDefinitions](./getting-started.md#deploying-customresourcedefinitions)
to your Kubernetes cluster, use `kubectl explain <resource>` to get access to
the documentation for each resource. For example, `kubectl explain GrafanaAgent`
will describe the GrafanaAgent CRD, and `kubectl explain GrafanaAgent.spec` will
give you information on its spec field.

## How do I add custom scrape jobs?
# Add custom scrape jobs

Sometimes you want to add a scrape job for something that isn't supported by the
standard set of Prometheus Operator CRDs. A common example of this is node-level
Expand Down
7 changes: 6 additions & 1 deletion docs/operator/architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Architecture
+++
title = "Operator architecture"
weight = 300
+++

# Operator architecture

This guide gives a high-level overview of how the Grafana Agent Operator
works. Refer to the [maintainer's guide](./maintainers-guide.md) for
Expand Down
29 changes: 21 additions & 8 deletions docs/operator/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Getting Started
+++
title = "Getting started with Grafana Agent Operator"
weight = 100
+++

# Getting started with Grafana Agent Operator

An official Helm chart is planned to make it really easy to deploy the Grafana Agent
Operator on Kubernetes. For now, things must be done a little manually.

## Deploying CustomResourceDefinitions
## Deploy CustomResourceDefinitions

Before you can write custom resources to describe a Grafana Agent deployment,
you _must_ deploy the
Expand All @@ -21,12 +26,20 @@ root of this repository using:
kubectl apply -f production/operator/crds
```

This step *must* be done before installing the Operator, as the Operator will
This step _must_ be done before installing the Operator, as the Operator will
fail to start if the CRDs do not exist.

## Installing on Kubernetes
### Find information on the supported values for the CustomResourceDefinitions

Once you've deployed the CustomResourceDefinitions
to your Kubernetes cluster, use `kubectl explain <resource>` to get access to
the documentation for each resource. For example, `kubectl explain GrafanaAgent`
will describe the GrafanaAgent CRD, and `kubectl explain GrafanaAgent.spec` will
give you information on its spec field.

## Install Agent Operator on Kubernetes

Use the following Deployment to run the Operator, changing values as desired:
Use the following deployment to run the Operator, changing values as desired:

```yaml
apiVersion: apps/v1
Expand Down Expand Up @@ -106,9 +119,9 @@ subjects:
namespace: default
```
## Running locally
## Run Operator locally
Before running locally, **make sure your kubectl context is correct!**
Before running locally, _make sure your kubectl context is correct!_
Running locally uses your current kubectl context, and you probably don't want
to accidentally deploy a new Grafana Agent to prod.
Expand All @@ -122,7 +135,7 @@ Afterwards, you can run the operator using `go run`:
go run ./cmd/agent-operator
```
## Deploying GrafanaAgent
## Deploy GrafanaAgent
Now that the Operator is running, you can create a deployment of the
Grafana Agent. The first step is to create a GrafanaAgent resource. This
Expand Down

0 comments on commit 9b478b9

Please sign in to comment.