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"))
|
||||
cluster_setup : base64encode(templatefile("${path.module}/modules/k8s-cluster/templates/scripts/cluster-setup.sh", {
|
||||
argocd_environment : "test"
|
||||
argocd_version : "0.1.1"
|
||||
argocd_version : "0.1.2"
|
||||
high_availability : false
|
||||
admin_user : "2martensAdmin"
|
||||
}))
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
argo-cd:
|
||||
redis-ha:
|
||||
enabled: true
|
||||
redis-ha:
|
||||
enabled: true
|
||||
|
||||
controller:
|
||||
replicas: 1
|
||||
controller:
|
||||
replicas: 1
|
||||
|
||||
server:
|
||||
replicas: 2
|
||||
server:
|
||||
replicas: 2
|
||||
|
||||
repoServer:
|
||||
replicas: 2
|
||||
repoServer:
|
||||
replicas: 2
|
||||
|
||||
applicationSet:
|
||||
replicas: 2
|
||||
applicationSet:
|
||||
replicas: 2
|
||||
@@ -5,13 +5,15 @@ until /snap/bin/microk8s.status --wait-ready;
|
||||
done
|
||||
|
||||
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
|
||||
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 argo https://argoproj.github.io/argo-helm
|
||||
/snap/bin/microk8s.helm3 install setup 2martens/cluster_setup --values /run/tmpfiles.d/cluster-setup-values.yaml
|
||||
%{ 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 ~}
|
||||
/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 ~}
|
||||
/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" {
|
||||
description = "The Argo CD chart version to use."
|
||||
type = string
|
||||
default = "0.1.1"
|
||||
default = "0.1.2"
|
||||
}
|
||||
|
||||
variable "number_nodes" {
|
||||
|
||||
Reference in New Issue
Block a user