This repository was archived by the owner on Apr 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +137
-6
lines changed Expand file tree Collapse file tree 8 files changed +137
-6
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ module "gitops_bridge_bootstrap" {
8181| Name | Version |
8282| ------| ---------|
8383| <a name =" provider_helm " ></a > [ helm] ( #provider\_ helm ) | >= 2.10.1 |
84- | <a name =" provider_kubectl " ></a > [ kubectl] ( #provider\_ kubectl ) | >= 1.14 |
8584| <a name =" provider_kubernetes " ></a > [ kubernetes] ( #provider\_ kubernetes ) | >= 2.22.0 |
8685
8786## Modules
@@ -93,7 +92,7 @@ No modules.
9392| Name | Type |
9493| ------| ------|
9594| [ helm_release.argocd] ( https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release ) | resource |
96- | [ kubectl_manifest .bootstrap] ( https://registry.terraform.io/providers/gavinbunney/kubectl /latest/docs/resources/manifest ) | resource |
95+ | [ helm_release .bootstrap] ( https://registry.terraform.io/providers/hashicorp/helm /latest/docs/resources/release ) | resource |
9796| [ kubernetes_secret_v1.cluster] ( https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1 ) | resource |
9897
9998## Inputs
Original file line number Diff line number Diff line change 1+ # Patterns to ignore when building packages.
2+ # This supports shell glob matching, relative path matching, and
3+ # negation (prefixed with !). Only one pattern per line.
4+ .DS_Store
5+ # Common VCS dirs
6+ .git/
7+ .gitignore
8+ .bzr/
9+ .bzrignore
10+ .hg/
11+ .hgignore
12+ .svn/
13+ # Common backup files
14+ *.swp
15+ *.bak
16+ *.tmp
17+ *.orig
18+ *~
19+ # Various IDEs
20+ .project
21+ .idea/
22+ *.tmproj
23+ .vscode/
Original file line number Diff line number Diff line change 1+ apiVersion : v2
2+ name : resources
3+ description : A Helm chart for Kubernetes
4+
5+ # A chart can be either an 'application' or a 'library' chart.
6+ #
7+ # Application charts are a collection of templates that can be packaged into versioned archives
8+ # to be deployed.
9+ #
10+ # Library charts provide useful utilities or functions for the chart developer. They're included as
11+ # a dependency of application charts to inject those utilities and functions into the rendering
12+ # pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+ type : application
14+
15+ # This is the chart version. This version number should be incremented each time you make changes
16+ # to the chart and its templates, including the app version.
17+ # Versions are expected to follow Semantic Versioning (https://semver.org/)
18+ version : 1.0.0
19+
20+ # This is the version number of the application being deployed. This version number should be
21+ # incremented each time you make changes to the application. Versions are not expected to
22+ # follow Semantic Versioning. They should reflect the version the application is using.
23+ # It is recommended to use it with quotes.
24+ appVersion : " 1.0.0"
Original file line number Diff line number Diff line change 1+ {{ range .Values.resources }}
2+ ---
3+ {{ if typeIs "string" . }}
4+ {{- tpl . $ }}
5+ {{- else }}
6+ {{- toYaml . }}
7+ {{- end }}
8+ {{ end }}
Original file line number Diff line number Diff line change 1+ # # Define Pure kubernetes resources
2+ # resources -- Define resources to be deployed by the raw chart
3+ resources : []
4+ # - apiVersion: argoproj.io/v1alpha1
5+ # kind: ApplicationSet
6+ # metadata:
7+ # name: bootstrap-addons
8+ # namespace: argocd
9+ # spec:
10+ # syncPolicy:
11+ # preserveResourcesOnDeletion: true
12+ # generators:
13+ # - clusters:
14+ # selector:
15+ # matchExpressions:
16+ # - key: akuity.io/argo-cd-cluster-name
17+ # operator: NotIn
18+ # values: [in-cluster]
19+ # template:
20+ # metadata:
21+ # name: 'bootstrap-addons'
22+ # spec:
23+ # project: default
24+ # source:
25+ # repoURL: '{{metadata.annotations.addons_repo_url}}'
26+ # path: '{{metadata.annotations.addons_repo_basepath}}{{metadata.annotations.addons_repo_path}}'
27+ # targetRevision: '{{metadata.annotations.addons_repo_revision}}'
28+ # directory:
29+ # recurse: true
30+ # exclude: exclude/*
31+ # destination:
32+ # namespace: 'argocd'
33+ # name: '{{name}}'
34+ # syncPolicy:
35+ # automated: {}
36+ # - |
37+ # apiVersion: argoproj.io/v1alpha1
38+ # kind: ApplicationSet
39+ # metadata:
40+ # name: bootstrap-addons
41+ # namespace: argocd
42+ # spec:
43+ # syncPolicy:
44+ # preserveResourcesOnDeletion: true
45+ # generators:
46+ # - clusters:
47+ # selector:
48+ # matchExpressions:
49+ # - key: akuity.io/argo-cd-cluster-name
50+ # operator: NotIn
51+ # values: [in-cluster]
52+ # template:
53+ # metadata:
54+ # name: 'bootstrap-addons'
55+ # spec:
56+ # project: default
57+ # source:
58+ # repoURL: '{{metadata.annotations.addons_repo_url}}'
59+ # path: '{{metadata.annotations.addons_repo_basepath}}{{metadata.annotations.addons_repo_path}}'
60+ # targetRevision: '{{metadata.annotations.addons_repo_revision}}'
61+ # directory:
62+ # recurse: true
63+ # exclude: exclude/*
64+ # destination:
65+ # namespace: 'argocd'
66+ # name: '{{name}}'
67+ # syncPolicy:
68+ # automated: {}
Original file line number Diff line number Diff line change @@ -90,10 +90,20 @@ resource "kubernetes_secret_v1" "cluster" {
9090# ###############################################################################
9191# Create App of Apps
9292# ###############################################################################
93- resource "kubectl_manifest " "bootstrap" {
93+ resource "helm_release " "bootstrap" {
9494 for_each = var. create ? var. argocd_bootstrap_app_of_apps : {}
9595
96- yaml_body = each. value
96+ name = each. key
97+ namespace = try (var. argocd . namespace , " argocd" )
98+ chart = " ${ path . module } /charts/resources"
99+ version = " 1.0.0"
100+
101+ values = [
102+ <<- EOT
103+ resources:
104+ - ${ indent (4 , each. value )}
105+ EOT
106+ ]
97107
98108 depends_on = [resource . kubernetes_secret_v1 . cluster ]
99109}
Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ output "cluster" {
88}
99output "apps" {
1010 description = " ArgoCD apps"
11- value = try (kubectl_manifest . bootstrap , null )
11+ value = try (helm_release . bootstrap , null )
1212}
Original file line number Diff line number Diff line change 1- ---
21apiVersion : argoproj.io/v1alpha1
32kind : ApplicationSet
43metadata :
You can’t perform that action at this time.
0 commit comments