use registry got k8s dashboard
This commit is contained in:
parent
7c2d0d7cc2
commit
3c7eee2ca0
2 changed files with 46 additions and 6 deletions
43
.drone.yml
Normal file
43
.drone.yml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: alpine
|
||||
# environment:
|
||||
# kek:
|
||||
# from_secret: tfstate
|
||||
commands:
|
||||
- "apk update && apk add jq curl perl"
|
||||
# - "sleep 900"
|
||||
- |
|
||||
curl -k https://kubernetes:6443/api/v1/namespaces/drone/configmaps/tfstate -H "Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" | jq -r .data.tfstate | base64 -d | gzip -d > /terraform.tfstate
|
||||
- |
|
||||
curl -k https://kubernetes:6443/api/v1/namespaces/drone/configmaps/tfvars -H "Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" | jq -r .data.tfvars | base64 -d | gzip -d > /terraform.tfvars
|
||||
- "cp /terraform.tfstate . && cp /terraform.tfvars ."
|
||||
# - "cat /terraform.tfvars | head"
|
||||
# - "env | grep kek"
|
||||
# - 'echo $kek > /terraform.tfstate'
|
||||
# - "sleep 300"
|
||||
# volumes:
|
||||
# - name: tfstate
|
||||
# path: /terraform.tfstate
|
||||
- name: Terraform apply
|
||||
image: hashicorp/terraform:latest
|
||||
commands:
|
||||
- "terraform init && terraform plan"
|
||||
# plan: true
|
||||
# root_dir: "/data/src"
|
||||
# var_files:
|
||||
# - "/terraform.tfvars"
|
||||
# remote:
|
||||
# backend:
|
||||
|
||||
|
||||
# ---
|
||||
# kind: secret
|
||||
# name: tfstate
|
||||
# get:
|
||||
# path: tfstate-default-state
|
||||
# name: tfstate
|
||||
|
|
@ -10,12 +10,9 @@ resource "random_password" "csrf_token" {
|
|||
}
|
||||
|
||||
module "dashboard" {
|
||||
# source = "cookielab/dashboard/kubernetes"
|
||||
# source = "ViktorBarzin/dashboard/kubernetes"
|
||||
# version = "0.13.0"
|
||||
# TODO: update this once merged
|
||||
source = "/opt/terraform-kubernetes-dashboard"
|
||||
# insert the 1 required variable here
|
||||
# source = "cookielab/dashboard/kubernetes"
|
||||
source = "ViktorBarzin/dashboard/kubernetes"
|
||||
version = "0.13.1"
|
||||
kubernetes_dashboard_csrf = random_password.csrf_token.result
|
||||
kubernetes_dashboard_deployment_args = list(
|
||||
"--auto-generate-certificates",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue