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_version: "v4.6.1"
|
||||||
kibana_image_repo: "gcr.io/google_containers/kibana"
|
kibana_image_repo: "gcr.io/google_containers/kibana"
|
||||||
kibana_image_tag: "{{ kibana_version }}"
|
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_version: "v2.2.2"
|
||||||
helm_image_repo: "lachlanevenson/k8s-helm"
|
helm_image_repo: "lachlanevenson/k8s-helm"
|
||||||
|
@ -238,6 +248,21 @@ downloads:
|
||||||
repo: "{{ tiller_image_repo }}"
|
repo: "{{ tiller_image_repo }}"
|
||||||
tag: "{{ tiller_image_tag }}"
|
tag: "{{ tiller_image_tag }}"
|
||||||
sha256: "{{ tiller_digest_checksum|default(None) }}"
|
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:
|
download:
|
||||||
container: "{{ file.container|default('false') }}"
|
container: "{{ file.container|default('false') }}"
|
||||||
|
|
|
@ -1,2 +1,14 @@
|
||||||
---
|
---
|
||||||
heapster_namespace: kube-system
|
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
|
- name: Heapster | Lay Down Heapster Templates
|
||||||
template: src={{item.file}} dest={{kube_config_dir}}/{{item.file}}
|
template:
|
||||||
|
src={{item.file}}
|
||||||
|
dest={{kube_config_dir}}/{{item.file}}
|
||||||
with_items:
|
with_items:
|
||||||
- {file: grafana-deployment.yaml, type: deployment, name: monitoring-grafana}
|
- {file: grafana-deploy.yml, type: deployment, name: monitoring-grafana}
|
||||||
- {file: grafana-service.yaml, type: svc, name: monitoring-grafana}
|
- {file: grafana-svc.yml, type: svc, name: monitoring-grafana}
|
||||||
- {file: heapster-deployment.yaml, type: deployment, name: heapster}
|
- {file: heapster-deploy.yml, type: deployment, name: heapster}
|
||||||
- {file: heapster-service.yaml, type: svc, name: heapster}
|
- {file: heapster-svc.yml, type: svc, name: heapster}
|
||||||
- {file: influxdb-deployment.yaml, type: deployment, name: monitoring-influxdb}
|
- {file: influxdb-deploy.yml, type: deployment, name: monitoring-influxdb}
|
||||||
- {file: influxdb-service.yaml, type: svc, name: monitoring-influxdb}
|
- {file: influxdb-svc.yml, type: svc, name: monitoring-influxdb}
|
||||||
register: manifests
|
register: heapster_deploy_manifests
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
- name: Heapster| Start Resources
|
- name: Heapster | Start Resources
|
||||||
kube:
|
kube:
|
||||||
name: "{{item.item.name}}"
|
name: "{{item.item.name}}"
|
||||||
namespace: "{{heapster_namespace}}"
|
namespace: "{{heapster_namespace}}"
|
||||||
|
@ -19,5 +21,5 @@
|
||||||
resource: "{{item.item.type}}"
|
resource: "{{item.item.type}}"
|
||||||
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "{{item.changed | ternary('latest','present') }}"
|
state: "{{item.changed | ternary('latest','present') }}"
|
||||||
with_items: "{{ manifests.results }}"
|
with_items: "{{ heapster_deploy_manifests.changed }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: monitoring-grafana
|
name: monitoring-grafana
|
||||||
namespace: kube-system
|
namespace: "{{ heapster_namespace }}"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
|
@ -13,7 +13,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: grafana
|
- name: grafana
|
||||||
image: gcr.io/google_containers/heapster-grafana-amd64:v4.0.2
|
image: "{{ grafana_image_repo }}:{{ grafana_image_tag }}"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
protocol: TCP
|
protocol: TCP
|
|
@ -7,7 +7,7 @@ metadata:
|
||||||
kubernetes.io/cluster-service: 'true'
|
kubernetes.io/cluster-service: 'true'
|
||||||
kubernetes.io/name: monitoring-grafana
|
kubernetes.io/name: monitoring-grafana
|
||||||
name: monitoring-grafana
|
name: monitoring-grafana
|
||||||
namespace: kube-system
|
namespace: "{{ heapster_namespace }}"
|
||||||
spec:
|
spec:
|
||||||
# In a production setup, we recommend accessing Grafana through an external Loadbalancer
|
# In a production setup, we recommend accessing Grafana through an external Loadbalancer
|
||||||
# or through a public IP.
|
# or through a public IP.
|
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: heapster
|
name: heapster
|
||||||
namespace: kube-system
|
namespace: "{{ heapster_namespace }}"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
|
@ -13,7 +13,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: heapster
|
- name: heapster
|
||||||
image: gcr.io/google_containers/heapster-amd64:v1.3.0-beta.1
|
image: "{{ heapster_image_repo }}:{{ heapster_image_tag }}"
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- /heapster
|
- /heapster
|
|
@ -8,7 +8,7 @@ metadata:
|
||||||
kubernetes.io/cluster-service: 'true'
|
kubernetes.io/cluster-service: 'true'
|
||||||
kubernetes.io/name: Heapster
|
kubernetes.io/name: Heapster
|
||||||
name: heapster
|
name: heapster
|
||||||
namespace: kube-system
|
namespace: "{{ heapster_namespace }}"
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: monitoring-influxdb
|
name: monitoring-influxdb
|
||||||
namespace: kube-system
|
namespace: "{{ heapster_namespace }}"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
|
@ -13,7 +13,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: influxdb
|
- name: influxdb
|
||||||
image: gcr.io/google_containers/heapster-influxdb-amd64:v1.1.1
|
image: "{{ influxdb_image_repo }}:{{ influxdb_image_tag }}"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data
|
- mountPath: /data
|
||||||
name: influxdb-storage
|
name: influxdb-storage
|
|
@ -8,7 +8,7 @@ metadata:
|
||||||
kubernetes.io/cluster-service: 'true'
|
kubernetes.io/cluster-service: 'true'
|
||||||
kubernetes.io/name: monitoring-influxdb
|
kubernetes.io/name: monitoring-influxdb
|
||||||
name: monitoring-influxdb
|
name: monitoring-influxdb
|
||||||
namespace: kube-system
|
namespace: "{{ heapster_namespace }}"
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 8086
|
- port: 8086
|
Loading…
Reference in a new issue