iupdated apps

This commit is contained in:
ari committed 2025-05-11 16:13:40 -04:00
1 parent fcf9452089
commit fd7ccbcb11
10 files changed
+21 -51

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ function run-new-chart() {
: Create a new helm chart : Create a new helm chart
: dev new-chart {path-to-chart} : dev new-chart {path-to-chart}
full_path=${1} full_path=$ROOT_FOLDER/apps${1}
app=$(basename $full_path) app=$(basename $full_path)
location=$(dirname $full_path) location=$(dirname $full_path)
typeofapp=$(basename $location) typeofapp=$(basename $location)
+2 -2
View File
@@ -4,9 +4,9 @@ apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: "nfs-storage" name: "nfs-storage"
namespace: argocd namespace: {{ .Values.ns.argocd }}
spec: spec:
project: admin project: main
source: source:
repoURL: https://github.com/asosnovsky/nfs-subdir-external-provisioner repoURL: https://github.com/asosnovsky/nfs-subdir-external-provisioner
targetRevision: HEAD targetRevision: HEAD
+2
View File
@@ -0,0 +1,2 @@
ns:
argocd: plugin-argo-cd
@@ -26,8 +26,8 @@ spec:
syncPolicy: syncPolicy:
syncOptions: syncOptions:
- RespectIgnoreDifferences=true - RespectIgnoreDifferences=true
project: main`` project: main
revisionHistoryLimit: 10 revisionHistoryLimit: 4
source: source:
path: '{{`{{path}}`}}' path: '{{`{{path}}`}}'
repoURL: git@github.com:{{ .Values.gitops.repo }}.git repoURL: git@github.com:{{ .Values.gitops.repo }}.git
+4 -1
View File
@@ -1,6 +1,10 @@
data "http" "myip" { data "http" "myip" {
url = "https://api.myip.com/" url = "https://api.myip.com/"
} }
locals {
myip = var.myip != "" ? var.myip : jsondecode(data.http.myip.response_body)["ip"]
}
data "cloudflare_zone" "this" { data "cloudflare_zone" "this" {
for_each = var.domain_mappings for_each = var.domain_mappings
filter = { filter = {
@@ -13,7 +17,6 @@ data "cloudflare_zone" "this" {
locals { locals {
myip = jsondecode(data.http.myip.response_body)["ip"]
records = flatten([ records = flatten([
for zone, records in var.domain_mappings : [ for zone, records in var.domain_mappings : [
for r, def in records : for r, def in records :
+2 -14
View File
@@ -35,7 +35,7 @@ module "k8s-helm-charts" {
plugins = { plugins = {
"external-secrets" : { "external-secrets" : {
repository = "https://charts.external-secrets.io" repository = "https://charts.external-secrets.io"
version = "0.14.2" version = "0.16.1"
}, },
"metallb" : { "metallb" : {
repository = "https://metallb.github.io/metallb" repository = "https://metallb.github.io/metallb"
@@ -50,7 +50,7 @@ module "k8s-helm-charts" {
}, },
"argo-cd" : { "argo-cd" : {
"repository" : "https://argoproj.github.io/argo-helm" "repository" : "https://argoproj.github.io/argo-helm"
"version" : "7.8.7" "version" : "7.9.0"
"values" : [ "values" : [
yamlencode({ yamlencode({
configs = { configs = {
@@ -103,18 +103,6 @@ module "k8s-helm-charts" {
} }
}) })
] ]
},
"nfs-subdir-external-provisioner" : {
repository = "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/"
version = "4.0.18"
values = [
yamlencode({
storageClass : {
name = var.globals.nfs.storageClassName
}
nfs : var.globals.nfs.storageProvider
})
]
} }
} }
} }
+2 -16
View File
@@ -1,26 +1,12 @@
resource "helm_release" "plugins" { resource "helm_release" "plugins" {
for_each = var.plugins for_each = var.plugins
name = each.key name = each.key
chart = each.key chart = each.value.chart == "" ? each.key : each.value.chart
repository = each.value.repository repository = each.value.repository
version = each.value.version version = each.value.version
atomic = true atomic = true
namespace = "plugin-${each.key}" namespace = each.value.namespace == "" ? "plugin-${each.key}" : each.value.namespace
create_namespace = true create_namespace = true
values = each.value.values values = each.value.values
} }
resource "helm_release" "infra" {
for_each = var.infra
name = each.key
chart = each.key
repository = each.value.repository
version = each.value.version
atomic = true
namespace = "infra-${each.key}"
create_namespace = true
}
-4
View File
@@ -4,9 +4,5 @@ output "namespaces" {
for k, v in helm_release.plugins : for k, v in helm_release.plugins :
k => v.namespace k => v.namespace
} }
infra = {
for k, v in helm_release.infra :
k => v.namespace
}
} }
} }
+3 -11
View File
@@ -1,18 +1,10 @@
variable "plugins" { variable "plugins" {
type = map(object({ type = map(object({
repository = string repository = string
version = string version = optional(string)
values = optional(list(string), [])
}))
default = {}
}
variable "infra" {
type = map(object({
repository = string
version = string
values = optional(list(string), []) values = optional(list(string), [])
chart = optional(string, "")
namespace = optional(string, "")
})) }))
default = {} default = {}
} }
+3
View File
@@ -1,3 +1,6 @@
variable "myip" {
default = ""
}
variable "cloudflare" { variable "cloudflare" {
sensitive = true sensitive = true
type = object({ type = object({