Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit 129fd04

Browse files
committed
init
0 parents  commit 129fd04

File tree

8 files changed

+862
-0
lines changed

8 files changed

+862
-0
lines changed

LICENSE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
=====================
3+
4+
Copyright © 2018 Cookielab s.r.o.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Terraform module for Kubernetes Dashboard
2+
3+
This module deploys [Kubernetes Dashboard](https://github.com/kubernetes/dashboard) to your Kubernetes cluster.
4+
5+
## Usage
6+
7+
```terraform
8+
provider "kubernetes" {
9+
config_path = "../1-master/kubeconfig_kube-first"
10+
}
11+
12+
module "kubernetes_dashboard" {
13+
source = "git::https://github.com/cookielab/tf-kube-module-kubernetes-dashboard.git?ref=0.9.0"
14+
15+
kubernetes_namespace_create = true
16+
kubernetes_dashboard_csrf = "<your-csrf-random-string>"
17+
}
18+
```

local.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
locals {
2+
kubernetes_resources_labels = merge({
3+
"cookielab.io/terraform-module" = "aws-kube-dashboard",
4+
}, var.kubernetes_resources_labels)
5+
6+
kubernetes_deployment_labels_selector = {
7+
"cookielab.io/deployment" = "aws-kube-dashboard-tf-module",
8+
"cookielab.io/unit" = "dashboard",
9+
}
10+
11+
kubernetes_deployment_labels_selector_metrics = {
12+
"cookielab.io/deployment" = "aws-kube-dashboard-tf-module",
13+
"cookielab.io/unit" = "metrics-scraper",
14+
}
15+
16+
kubernetes_deployment_labels = merge(local.kubernetes_deployment_labels_selector, local.kubernetes_resources_labels)
17+
kubernetes_deployment_labels_metrics = merge(local.kubernetes_deployment_labels_selector_metrics, local.kubernetes_resources_labels)
18+
19+
kubernetes_deployment_image = "${var.kubernetes_deployment_image_registry}:${var.kubernetes_deployment_image_tag}"
20+
kubernetes_deployment_metrics_scraper_image = "${var.kubernetes_deployment_metrics_scraper_image_registry}:${var.kubernetes_deployment_metrics_scraper_image_tag}"
21+
}

0 commit comments

Comments
 (0)