Incorporated changes based on feedback of the pull request.
This commit is contained in:
parent
3ead64e325
commit
70f92c7332
7 changed files with 25 additions and 6 deletions
|
@ -141,3 +141,6 @@ efk_enabled: false
|
||||||
|
|
||||||
# Helm deployment
|
# Helm deployment
|
||||||
helm_enabled: false
|
helm_enabled: false
|
||||||
|
|
||||||
|
# Dashboard deployment
|
||||||
|
dashboard_enabled: false
|
||||||
|
|
|
@ -91,6 +91,9 @@ 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 }}"
|
||||||
|
dashboard_version: "v1.5.1"
|
||||||
|
dashboard_image_repo: "gcr.io/google_containers/kubernetes-dashboard-amd64"
|
||||||
|
dashboard_image_tag: "{{ dashboard_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 +241,11 @@ 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) }}"
|
||||||
|
dashboard:
|
||||||
|
container: true
|
||||||
|
repo: "{{ dashboard_image_repo }}"
|
||||||
|
tag: "{{ dashboard_image_tag }}"
|
||||||
|
sha256: "{{ dashboard_digest_checksum|default(None) }}"
|
||||||
|
|
||||||
download:
|
download:
|
||||||
container: "{{ file.container|default('false') }}"
|
container: "{{ file.container|default('false') }}"
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
---
|
---
|
||||||
dashboard_namespace: kube-system
|
dashboard_namespace: kube-system
|
||||||
|
dashboard_port: 80
|
||||||
|
|
4
roles/kubernetes-apps/dashboard/meta/main.yml
Normal file
4
roles/kubernetes-apps/dashboard/meta/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: download
|
||||||
|
file: "{{ downloads.dashboard }}"
|
|
@ -1,9 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: Kubernetes Dashboard | Lay Down Dasboard Template
|
- name: Kubernetes Dashboard | Lay Down Dasboard Template
|
||||||
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: kubernetes-dashboard.yml, type: deployment, name: kubernetes-dashboard}
|
- {file: kubernetes-dashboard.yml, type: deployment, name: kubernetes-dashboard}
|
||||||
register: manifests
|
register: dashboard_deployment_manifest
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
- name: Kubernetes Dashboard | Start Dashboard Resource
|
- name: Kubernetes Dashboard | Start Dashboard Resource
|
||||||
|
@ -14,5 +16,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: "{{ dashboard_deployment_manifest.changed }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -22,7 +22,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: kubernetes-dashboard
|
app: kubernetes-dashboard
|
||||||
name: kubernetes-dashboard
|
name: kubernetes-dashboard
|
||||||
namespace: kube-system
|
namespace: "{{dashboard_namespace}}"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
revisionHistoryLimit: 10
|
revisionHistoryLimit: 10
|
||||||
|
@ -47,7 +47,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: kubernetes-dashboard
|
- name: kubernetes-dashboard
|
||||||
image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1
|
image: "{{ dashboard_image_repo }}:{{ dashboard_image_tag }}"
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 9090
|
- containerPort: 9090
|
||||||
|
@ -74,7 +74,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: {{ dashboard_port}}
|
||||||
targetPort: 9090
|
targetPort: 9090
|
||||||
selector:
|
selector:
|
||||||
app: kubernetes-dashboard
|
app: kubernetes-dashboard
|
|
@ -16,4 +16,5 @@ dependencies:
|
||||||
when: helm_enabled
|
when: helm_enabled
|
||||||
tags: [ apps, helm ]
|
tags: [ apps, helm ]
|
||||||
- role: kubernetes-apps/dashboard
|
- role: kubernetes-apps/dashboard
|
||||||
|
when: dashboard_enabled
|
||||||
tags: [ apps, dashboard ]
|
tags: [ apps, dashboard ]
|
||||||
|
|
Loading…
Reference in a new issue