fixed repo perm issues
This commit is contained in:
1 parent
21470192e3
commit
51810838e6
10 files changed
+49
-40
No files matched your search
+6
-6
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"file_types": {
|
||||
"Helm": [
|
||||
"charts/**/templates/**/*.tpl",
|
||||
"charts/**/templates/**/*.yaml",
|
||||
"charts/**/templates/**/*.yml",
|
||||
"charts/**/helmfile.d/**/*.yaml",
|
||||
"charts/**/helmfile.d/**/*.yml",
|
||||
"charts/**/values*.yaml",
|
||||
"charts/**/*/templates/**/*.tpl",
|
||||
"charts/**/*/templates/**/*.yaml",
|
||||
"charts/**/*/templates/**/*.yml",
|
||||
"charts/**/*/helmfile.d/**/*.yaml",
|
||||
"charts/**/*/helmfile.d/**/*.yml",
|
||||
"charts/**/*/values*.yaml",
|
||||
],
|
||||
},
|
||||
}
|
||||
@@ -5,13 +5,15 @@ kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
argocd.argoproj.io/secret-type: repository
|
||||
name: {{ .name }}
|
||||
name: argocd-repo-{{ .name }}
|
||||
namespace: "{{ .namespace }}"
|
||||
type: Opaque
|
||||
stringData:
|
||||
name: {{ .name }}
|
||||
type: {{ .type | default "git" }}
|
||||
url: {{ .url }}
|
||||
data:
|
||||
sshPrivateKey: "{{ .sshkey | b64enc }}"
|
||||
"name": "{{ .name | b64enc }}"
|
||||
"type": "{{ .type | default "git" | b64enc }}"
|
||||
"url": "{{ .url | b64enc }}"
|
||||
{{ range $k, $v := .data }}
|
||||
"{{ $k }}": |-
|
||||
{{ $v | b64enc }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -9,7 +9,7 @@ spec:
|
||||
- git:
|
||||
directories:
|
||||
- path: charts/apps/*
|
||||
repoURL: {{ .Values.gitops.repo }}
|
||||
repoURL: {{ .Values.gitops.url }}
|
||||
revision: "{{ .Values.gitops.revision }}"
|
||||
template:
|
||||
metadata: {}
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
revisionHistoryLimit: 4
|
||||
source:
|
||||
path: '{{`{{path}}`}}'
|
||||
repoURL: {{ .Values.gitops.repo }}
|
||||
repoURL: {{ .Values.gitops.url }}
|
||||
targetRevision: "{{ .Values.gitops.revision }}"
|
||||
helm:
|
||||
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 -}}
|
||||
@@ -9,16 +9,19 @@ ns:
|
||||
argocd: "change-me"
|
||||
|
||||
gitops:
|
||||
revision: "main"
|
||||
repo: "ssh://gitea@minipc1.lab.internal/ari/homelab.git"
|
||||
sshkey: ""
|
||||
type: git
|
||||
url: http://minipc1.lab.internal:3000/ari/homelab.git
|
||||
revision: main
|
||||
data:
|
||||
username: argocd
|
||||
password: "change-me"
|
||||
|
||||
additionalRepos:
|
||||
repos:
|
||||
github-helm-charts:
|
||||
type: git
|
||||
username: git
|
||||
url: git@github.com:asosnovsky/helm-charts.git
|
||||
sshkey: ""
|
||||
data:
|
||||
sshPrivateKey: "change-me"
|
||||
|
||||
metallb:
|
||||
addresses:
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
shellHook = ''
|
||||
echo "$(pwd)"
|
||||
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
|
||||
echo "Welcome to HomeLab!"
|
||||
'';
|
||||
|
||||
+7
-3
@@ -13,11 +13,15 @@ resource "helm_release" "local-chart-infrastructure" {
|
||||
value = module.k8s-helm-charts.namespaces.plugins.argo-cd
|
||||
},
|
||||
{
|
||||
name = "gitops.sshkey"
|
||||
value = var.ssh_key
|
||||
name = "gitops.data.username"
|
||||
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
|
||||
}
|
||||
]
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ variable "domain_mappings" {
|
||||
type = optional(string, "A"),
|
||||
})))
|
||||
}
|
||||
variable "ssh_key" {
|
||||
variable "gitea" {
|
||||
type = object({
|
||||
user = string
|
||||
password = string
|
||||
})
|
||||
sensitive = true
|
||||
}
|
||||
variable "github_ssh_key" {
|
||||
|
||||
Reference in new issue
Block a user