Replaced terraform with kubectl calls

This commit is contained in:
Marcus Noble 2021-02-27 15:07:41 +00:00
parent d1e34ddba0
commit 030386cc6a
4 changed files with 15 additions and 38 deletions

View File

@ -47,7 +47,19 @@ ci:
.PHONY: release # Release the latest version of the application .PHONY: release # Release the latest version of the application
release: release:
@cd terraform && terraform apply -auto-approve @cd terraform && terraform apply -auto-approve && \
kubectx admin@clusterfun-scaleway && \
cd ../tekton && \
kubectl apply -f ./1-Install/ && \
kubectl apply -f ./2-Setup/ && \
kubectl apply -f ./bindings/ && \
kubectl apply -f ./conditions/ && \
kubectl apply -f ./eventlisteners/ && \
kubectl apply -f ./pipelines/ && \
kubectl apply -f ./tasks/ && \
kubectl apply -f ./triggertemplates/ && \
cd ../manifests && \
kubectl apply -f ./
.PHONY: help # Show this list of commands .PHONY: help # Show this list of commands
help: help:

View File

@ -1,22 +0,0 @@
resource "kubectl_manifest" "manifests" {
for_each = fileset(path.module, "../manifests/*")
yaml_body = file(each.key)
}
resource "kubectl_manifest" "tekton-install" {
for_each = fileset(path.module, "../tekton/1-Install/*")
yaml_body = file(each.key)
}
resource "kubectl_manifest" "tekton-setup" {
for_each = fileset(path.module, "../tekton/2-Setup/*")
yaml_body = file(each.key)
}
resource "kubectl_manifest" "tekton" {
for_each = fileset(path.module, "../tekton/{bindings,conditions,eventlisteners,pipelines,tasks,triggertemplates}/*")
yaml_body = file(each.key)
}

View File

@ -14,12 +14,3 @@ provider "helm" {
) )
} }
} }
provider "kubectl" {
load_config_file = false
host = scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].host
token = scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].token
cluster_ca_certificate = base64decode(
scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].cluster_ca_certificate
)
}

View File

@ -1,15 +1,11 @@
terraform { terraform {
required_providers { required_providers {
helm = { helm = {
source = "hashicorp/helm" source = "hashicorp/helm"
version = "1.3.2" version = "1.3.2"
} }
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.7.0"
}
scaleway = { scaleway = {
source = "scaleway/scaleway" source = "scaleway/scaleway"
version = "1.17.2" version = "1.17.2"
} }
} }