Changes based on feedback from Review.
This commit is contained in:
parent
b6251f7056
commit
2010f39b42
10 changed files with 67 additions and 20 deletions
|
@ -91,6 +91,16 @@ fluentd_image_tag: "{{ fluentd_version }}"
|
|||
kibana_version: "v4.6.1"
|
||||
kibana_image_repo: "gcr.io/google_containers/kibana"
|
||||
kibana_image_tag: "{{ kibana_version }}"
|
||||
grafana_version: "v4.0.2"
|
||||
grafana_image_repo: "gcr.io/google_containers/heapster-grafana-amd64"
|
||||
grafana_image_tag: "{{ grafana_version }}"
|
||||
heapster_version: "v1.3.0-beta.1"
|
||||
heapster_image_repo: "gcr.io/google_containers/heapster-amd64"
|
||||
heapster_image_tag: "{{ heapster_version }}"
|
||||
influxdb_version: "v1.1.1"
|
||||
influxdb_image_repo: "gcr.io/google_containers/heapster-influxdb-amd64"
|
||||
influxdb_image_tag: "{{ influxdb_version }}"
|
||||
|
||||
|
||||
helm_version: "v2.2.2"
|
||||
helm_image_repo: "lachlanevenson/k8s-helm"
|
||||
|
@ -238,6 +248,21 @@ downloads:
|
|||
repo: "{{ tiller_image_repo }}"
|
||||
tag: "{{ tiller_image_tag }}"
|
||||
sha256: "{{ tiller_digest_checksum|default(None) }}"
|
||||
grafana:
|
||||
container: true
|
||||
repo: "{{ grafana_image_repo }}"
|
||||
tag: "{{ grafana_image_tag }}"
|
||||
sha256: "{{ grafana_digest_checksum|default(None) }}"
|
||||
heapster:
|
||||
container: true
|
||||
repo: "{{ heapster_image_repo }}"
|
||||
tag: "{{ heapster_image_tag }}"
|
||||
sha256: "{{ heapster_digest_checksum|default(None) }}"
|
||||
influxdb:
|
||||
container: true
|
||||
repo: "{{ influxdb_image_repo }}"
|
||||
tag: "{{ influxdb_image_tag }}"
|
||||
sha256: "{{ influxdb_digest_checksum|default(None) }}"
|
||||
|
||||
download:
|
||||
container: "{{ file.container|default('false') }}"
|
||||
|
|
|
@ -1,2 +1,14 @@
|
|||
---
|
||||
heapster_namespace: kube-system
|
||||
|
||||
grafana_version: "v4.0.2"
|
||||
grafana_image_repo: "gcr.io/google_containers/heapster-grafana-amd64"
|
||||
grafana_image_tag: "{{ grafana_version }}"
|
||||
|
||||
heapster_version: "v1.3.0-beta.1"
|
||||
heapster_image_repo: "gcr.io/google_containers/heapster-amd64"
|
||||
heapster_image_tag: "{{ heapster_version }}"
|
||||
|
||||
influxdb_version: "v1.1.1"
|
||||
influxdb_image_repo: "gcr.io/google_containers/heapster-influxdb-amd64"
|
||||
influxdb_image_tag: "{{ influxdb_version }}"
|
||||
|
|
8
roles/kubernetes-apps/heapster/meta/main.yml
Normal file
8
roles/kubernetes-apps/heapster/meta/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: download
|
||||
file: "{{ downloads.grafana }}"
|
||||
- role: download
|
||||
file: "{{ downloads.heapster }}"
|
||||
- role: download
|
||||
file: "{{ downloads.influxdb }}"
|
|
@ -1,17 +1,19 @@
|
|||
---
|
||||
- name: Heapster | Lay Down Heaspter Templates
|
||||
template: src={{item.file}} dest={{kube_config_dir}}/{{item.file}}
|
||||
- name: Heapster | Lay Down Heapster Templates
|
||||
template:
|
||||
src={{item.file}}
|
||||
dest={{kube_config_dir}}/{{item.file}}
|
||||
with_items:
|
||||
- {file: grafana-deployment.yaml, type: deployment, name: monitoring-grafana}
|
||||
- {file: grafana-service.yaml, type: svc, name: monitoring-grafana}
|
||||
- {file: heapster-deployment.yaml, type: deployment, name: heapster}
|
||||
- {file: heapster-service.yaml, type: svc, name: heapster}
|
||||
- {file: influxdb-deployment.yaml, type: deployment, name: monitoring-influxdb}
|
||||
- {file: influxdb-service.yaml, type: svc, name: monitoring-influxdb}
|
||||
register: manifests
|
||||
- {file: grafana-deploy.yml, type: deployment, name: monitoring-grafana}
|
||||
- {file: grafana-svc.yml, type: svc, name: monitoring-grafana}
|
||||
- {file: heapster-deploy.yml, type: deployment, name: heapster}
|
||||
- {file: heapster-svc.yml, type: svc, name: heapster}
|
||||
- {file: influxdb-deploy.yml, type: deployment, name: monitoring-influxdb}
|
||||
- {file: influxdb-svc.yml, type: svc, name: monitoring-influxdb}
|
||||
register: heapster_deploy_manifests
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
- name: Heapster| Start Resources
|
||||
- name: Heapster | Start Resources
|
||||
kube:
|
||||
name: "{{item.item.name}}"
|
||||
namespace: "{{heapster_namespace}}"
|
||||
|
@ -19,5 +21,5 @@
|
|||
resource: "{{item.item.type}}"
|
||||
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||
state: "{{item.changed | ternary('latest','present') }}"
|
||||
with_items: "{{ manifests.results }}"
|
||||
with_items: "{{ heapster_deploy_manifests.changed }}"
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: monitoring-grafana
|
||||
namespace: kube-system
|
||||
namespace: "{{ heapster_namespace }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
|
@ -13,7 +13,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: grafana
|
||||
image: gcr.io/google_containers/heapster-grafana-amd64:v4.0.2
|
||||
image: "{{ grafana_image_repo }}:{{ grafana_image_tag }}"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
protocol: TCP
|
|
@ -7,7 +7,7 @@ metadata:
|
|||
kubernetes.io/cluster-service: 'true'
|
||||
kubernetes.io/name: monitoring-grafana
|
||||
name: monitoring-grafana
|
||||
namespace: kube-system
|
||||
namespace: "{{ heapster_namespace }}"
|
||||
spec:
|
||||
# In a production setup, we recommend accessing Grafana through an external Loadbalancer
|
||||
# or through a public IP.
|
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
namespace: "{{ heapster_namespace }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
|
@ -13,7 +13,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: heapster
|
||||
image: gcr.io/google_containers/heapster-amd64:v1.3.0-beta.1
|
||||
image: "{{ heapster_image_repo }}:{{ heapster_image_tag }}"
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /heapster
|
|
@ -8,7 +8,7 @@ metadata:
|
|||
kubernetes.io/cluster-service: 'true'
|
||||
kubernetes.io/name: Heapster
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
namespace: "{{ heapster_namespace }}"
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: monitoring-influxdb
|
||||
namespace: kube-system
|
||||
namespace: "{{ heapster_namespace }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
|
@ -13,7 +13,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: influxdb
|
||||
image: gcr.io/google_containers/heapster-influxdb-amd64:v1.1.1
|
||||
image: "{{ influxdb_image_repo }}:{{ influxdb_image_tag }}"
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: influxdb-storage
|
|
@ -8,7 +8,7 @@ metadata:
|
|||
kubernetes.io/cluster-service: 'true'
|
||||
kubernetes.io/name: monitoring-influxdb
|
||||
name: monitoring-influxdb
|
||||
namespace: kube-system
|
||||
namespace: "{{ heapster_namespace }}"
|
||||
spec:
|
||||
ports:
|
||||
- port: 8086
|
Loading…
Reference in a new issue