fixed repo perm issues

This commit is contained in:
ari committed 2026-02-14 08:47:38 -05:00
1 parent 21470192e3
commit 51810838e6
10 files changed
+58 -49

No files matched your search

+6 -6
View File
@@ -1,12 +1,12 @@
{ {
"file_types": { "file_types": {
"Helm": [ "Helm": [
"charts/**/templates/**/*.tpl", "charts/**/*/templates/**/*.tpl",
"charts/**/templates/**/*.yaml", "charts/**/*/templates/**/*.yaml",
"charts/**/templates/**/*.yml", "charts/**/*/templates/**/*.yml",
"charts/**/helmfile.d/**/*.yaml", "charts/**/*/helmfile.d/**/*.yaml",
"charts/**/helmfile.d/**/*.yml", "charts/**/*/helmfile.d/**/*.yml",
"charts/**/values*.yaml", "charts/**/*/values*.yaml",
], ],
}, },
} }
@@ -5,13 +5,15 @@ kind: Secret
metadata: metadata:
labels: labels:
argocd.argoproj.io/secret-type: repository argocd.argoproj.io/secret-type: repository
name: {{ .name }} name: argocd-repo-{{ .name }}
namespace: "{{ .namespace }}" namespace: "{{ .namespace }}"
type: Opaque type: Opaque
stringData:
name: {{ .name }}
type: {{ .type | default "git" }}
url: {{ .url }}
data: data:
sshPrivateKey: "{{ .sshkey | b64enc }}" "name": "{{ .name | b64enc }}"
{{ end }} "type": "{{ .type | default "git" | b64enc }}"
"url": "{{ .url | b64enc }}"
{{ range $k, $v := .data }}
"{{ $k }}": |-
{{ $v | b64enc }}
{{ end }}
{{ end }}
@@ -9,7 +9,7 @@ spec:
- git: - git:
directories: directories:
- path: charts/apps/* - path: charts/apps/*
repoURL: {{ .Values.gitops.repo }} repoURL: {{ .Values.gitops.url }}
revision: "{{ .Values.gitops.revision }}" revision: "{{ .Values.gitops.revision }}"
template: template:
metadata: {} metadata: {}
@@ -30,7 +30,7 @@ spec:
revisionHistoryLimit: 4 revisionHistoryLimit: 4
source: source:
path: '{{`{{path}}`}}' path: '{{`{{path}}`}}'
repoURL: {{ .Values.gitops.repo }} repoURL: {{ .Values.gitops.url }}
targetRevision: "{{ .Values.gitops.revision }}" targetRevision: "{{ .Values.gitops.revision }}"
helm: helm:
valueFiles: valueFiles:
@@ -0,0 +1,6 @@
{{- range $name, $val := .Values.repos }}
{{ include "git-repo" (merge $val (dict
"name" $name
"namespace" $.Values.ns.argocd
))}}
{{ end -}}
@@ -0,0 +1,5 @@
{{ include "git-repo" (merge $.Values.gitops (dict
"name" "gitops"
"namespace" $.Values.ns.argocd
))}}
@@ -1,15 +0,0 @@
{{ include "git-repo" (dict
"name" "homelab"
"namespace" $.Values.ns.argocd
"sshkey" $.Values.gitops.sshkey
"url" $.Values.gitops.repo
)}}
{{- range $name, $val := .Values.additionalRepos }}
{{ include "git-repo" (merge $val (dict
"name" $name
"namespace" $.Values.ns.argocd
))}}
{{ end -}}
+17 -14
View File
@@ -1,28 +1,31 @@
global: {} global: {}
registry: registry:
ip: 10.0.100.101 ip: 10.0.100.101
image: registry:2 image: registry:2
ns: ns:
metallb: "change-me" metallb: "change-me"
argocd: "change-me" argocd: "change-me"
gitops: gitops:
revision: "main" type: git
repo: "ssh://gitea@minipc1.lab.internal/ari/homelab.git" url: http://minipc1.lab.internal:3000/ari/homelab.git
sshkey: "" revision: main
data:
username: argocd
password: "change-me"
additionalRepos: repos:
github-helm-charts: github-helm-charts:
type: git type: git
username: git url: git@github.com:asosnovsky/helm-charts.git
url: git@github.com:asosnovsky/helm-charts.git data:
sshkey: "" sshPrivateKey: "change-me"
metallb: metallb:
addresses: addresses:
- 10.0.100.1-10.0.100.255 - 10.0.100.1-10.0.100.255
enabledClusterSecretStores: enabledClusterSecretStores:
- secrets - secrets
+1 -1
View File
@@ -42,7 +42,7 @@
shellHook = '' shellHook = ''
echo "$(pwd)" echo "$(pwd)"
export PATH="$(pwd)/bin:$PATH" export PATH="$(pwd)/bin:$PATH"
export PROMPT="🏠| \$(kubectx -c)@\$(kubens -c):📁$(pwd)> $PROMPT" export PROMPT="🏠| \$(kubectx -c)@\$(kubens -c):📁\$(pwd)> $PROMPT"
export KUBE_CONFIG_PATH=~/.kube/config export KUBE_CONFIG_PATH=~/.kube/config
echo "Welcome to HomeLab!" echo "Welcome to HomeLab!"
''; '';
+7 -3
View File
@@ -13,11 +13,15 @@ resource "helm_release" "local-chart-infrastructure" {
value = module.k8s-helm-charts.namespaces.plugins.argo-cd value = module.k8s-helm-charts.namespaces.plugins.argo-cd
}, },
{ {
name = "gitops.sshkey" name = "gitops.data.username"
value = var.ssh_key value = var.gitea.user
}, },
{ {
name = "additionalRepos.github-helm-charts.sshkey" name = "gitops.data.password"
value = var.gitea.password
},
{
name = "repos.github-helm-charts.data.sshPrivateKey"
value = var.github_ssh_key value = var.github_ssh_key
} }
] ]
+5 -1
View File
@@ -21,7 +21,11 @@ variable "domain_mappings" {
type = optional(string, "A"), type = optional(string, "A"),
}))) })))
} }
variable "ssh_key" { variable "gitea" {
type = object({
user = string
password = string
})
sensitive = true sensitive = true
} }
variable "github_ssh_key" { variable "github_ssh_key" {