Merge pull request #5140 from gianrubio/prom-operator-addon

Create addon for prometheus-operator
This commit is contained in:
k8s-ci-robot 2018-05-30 09:34:52 -07:00 committed by GitHub
commit c83dbc1119
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13525 additions and 0 deletions

1
.gitignore vendored
View File

@ -81,3 +81,4 @@ default.etcd
# Ignore awesome_bot markdown links check output
ab-results-*.json
addons/prometheus-operator/tmp # cloned git repo

View File

@ -0,0 +1,18 @@
# Prometheus Operator Addon
[Prometheus Operator](https://coreos.com/operators/prometheus) creates/configures/manages Prometheus clusters atop Kubernetes. This addon deploy prometheus-operator and [kube-prometheus](https://github.com/coreos/prometheus-operator/blob/master/contrib/kube-prometheus/README.md) in a kops cluster.
## Usage
### Deploy To Cluster
```console
kubectl apply -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/prometheus-operator/v0.19.0.yaml
```
### Updating the addon
Run the script bellow.
```console
addons/prometheus-operator/sync-repo.sh "v0.19.0"
```

View File

@ -0,0 +1,9 @@
kind: Addons
metadata:
name: prometheus-operator
spec:
addons:
- version: 0.19.0
selector:
k8s-addon: prometheus-operator.addons.k8s.io
manifest: v0.19.0.yaml

View File

@ -0,0 +1,35 @@
#!/bin/bash
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o nounset
set -o pipefail
P_OPERATOR_VERSION=${1:-"v0.19.0"}
P_OPERATOR_ADDON_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${P_OPERATOR_ADDON_DIR}
git clone --depth 1 https://github.com/coreos/prometheus-operator/
cp prometheus-operator/bundle.yaml ${P_OPERATOR_VERSION}.yaml
mkdir tmp
cp prometheus-operator/contrib/kube-prometheus/manifests/* tmp
for i in `ls tmp`
do
echo "---" >> ${P_OPERATOR_VERSION}.yaml
cat tmp/$i >> ${P_OPERATOR_VERSION}.yaml
done
rm -rf ${P_OPERATOR_ADDON_DIR}/prometheus-operator ${P_OPERATOR_ADDON_DIR}/tmp/
cd -

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,15 @@ Install using:
kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/monitoring-standalone/v1.7.0.yaml
```
### Monitoring with Prometheus Operator + kube-prometheus
The [Prometheus Operator](https://github.com/coreos/prometheus-operator/) makes the Prometheus configuration Kubernetes native and manages and operates Prometheus and Alertmanager clusters. It is a piece of the puzzle regarding full end-to-end monitoring.
[kube-prometheus](https://github.com/coreos/prometheus-operator/blob/master/contrib/kube-prometheus) combines the Prometheus Operator with a collection of manifests to help getting started with monitoring Kubernetes itself and applications running on top of it.
```console
kubectl apply -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/prometheus-operator/v0.19.0.yaml
```
### Route53 Mapper