mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 15:26:50 +02:00
Fixed cluster setup
This commit is contained in:
@@ -214,7 +214,7 @@ resource "hcloud_server" "server_k8s_test" {
|
|||||||
argocd_ha_values : base64encode(file("${path.module}/modules/k8s-cluster/templates/helm/argocd-values-ha.yaml"))
|
argocd_ha_values : base64encode(file("${path.module}/modules/k8s-cluster/templates/helm/argocd-values-ha.yaml"))
|
||||||
cluster_setup : base64encode(templatefile("${path.module}/modules/k8s-cluster/templates/scripts/cluster-setup.sh", {
|
cluster_setup : base64encode(templatefile("${path.module}/modules/k8s-cluster/templates/scripts/cluster-setup.sh", {
|
||||||
argocd_environment : "test"
|
argocd_environment : "test"
|
||||||
argocd_version : "0.1.1"
|
argocd_version : "0.1.2"
|
||||||
high_availability : false
|
high_availability : false
|
||||||
admin_user : "2martensAdmin"
|
admin_user : "2martensAdmin"
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
argo-cd:
|
redis-ha:
|
||||||
redis-ha:
|
enabled: true
|
||||||
enabled: true
|
|
||||||
|
|
||||||
controller:
|
controller:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|
||||||
server:
|
server:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
|
||||||
repoServer:
|
repoServer:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
|
||||||
applicationSet:
|
applicationSet:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
@@ -5,13 +5,15 @@ until /snap/bin/microk8s.status --wait-ready;
|
|||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p /home/${admin_user}/.kube
|
mkdir -p /home/${admin_user}/.kube
|
||||||
cp /var/snap/current/credentials/client.config /home/${admin_user}/.kube/config
|
cp /var/snap/microk8s/current/credentials/client.config /home/${admin_user}/.kube/config
|
||||||
chmod 600 /home/${admin_user}/.kube/config
|
chmod 600 /home/${admin_user}/.kube/config
|
||||||
chown -R ${admin_user}:${admin_user} /home/${admin_user}/.kube
|
chown -R ${admin_user}:${admin_user} /home/${admin_user}/.kube
|
||||||
/snap/bin/microk8s.helm3 repo add 2martens https://repo.2martens.de/charts/
|
/snap/bin/microk8s.helm3 repo add 2martens https://repo.2martens.de/charts/
|
||||||
|
/snap/bin/microk8s.helm3 repo add argo https://argoproj.github.io/argo-helm
|
||||||
/snap/bin/microk8s.helm3 install setup 2martens/cluster_setup --values /run/tmpfiles.d/cluster-setup-values.yaml
|
/snap/bin/microk8s.helm3 install setup 2martens/cluster_setup --values /run/tmpfiles.d/cluster-setup-values.yaml
|
||||||
%{ if high_availability ~}
|
%{ if high_availability ~}
|
||||||
/snap/bin/microk8s.helm3 install argo-cd 2martens/argocd --create-namespace -n argocd --version ${argocd_version} --set environment=${argocd_environment} --values /run/tmpfiles.d/argocd-values-ha.yaml
|
/snap/bin/microk8s.helm3 install argo-cd argo/argo-cd --create-namespace -n argocd --values /run/tmpfiles.d/argocd-values-ha.yaml
|
||||||
%{ else ~}
|
%{ else ~}
|
||||||
/snap/bin/microk8s.helm3 install argo-cd 2martens/argocd --create-namespace -n argocd --version ${argocd_version} --set environment=${argocd_environment}
|
/snap/bin/microk8s.helm3 install argo-cd argo/argo-cd --create-namespace -n argocd
|
||||||
%{ endif ~}
|
%{ endif ~}
|
||||||
|
/snap/bin/microk8s.helm3 install argocd-config 2martens/argocd-configuration -n argocd --version ${argocd_version} --set environment=${argocd_environment}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ variable "argocd_environment" {
|
|||||||
variable "argocd_chart_version" {
|
variable "argocd_chart_version" {
|
||||||
description = "The Argo CD chart version to use."
|
description = "The Argo CD chart version to use."
|
||||||
type = string
|
type = string
|
||||||
default = "0.1.1"
|
default = "0.1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "number_nodes" {
|
variable "number_nodes" {
|
||||||
|
|||||||
Reference in New Issue
Block a user