Skip to content

Commit

Permalink
First attempt at locally rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges committed May 15, 2024
1 parent 1f662b8 commit 42875bb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions infra/meshdb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
meshdb*.tgz
15 changes: 11 additions & 4 deletions infra/meshdb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@ resource "kubernetes_namespace" "meshdb-ns" {
}

# Generate the chart
resource "null_resource" "generate_meshdb_chart" {
#resource "null_resource" "generate_meshdb_chart" {
# provisioner "local-exec" {
# command = "cd ${path.module}/../helm/meshdb/; helm tempate . -f values.yaml -f secret.values.yaml > meshdb.yaml"
# }
#}

# TODO: template version
resource "null_resource" "package_meshdb_chart" {
provisioner "local-exec" {
command = "cd ${path.module}/../helm/meshdb/; helm tempate . -f values.yaml -f secret.values.yaml > meshdb.yaml"
command = "cd ${path.module}/../helm/; helm package meshdb; mv ${path.module}/../helm/meshdb-0.1.0.tgz ${path.module}/../meshdb/"
}
}

# Create meshdb with the manifest
resource "kubernetes_manifest" "meshdb" {
manifest = yamldecode(file("${path.module}/../helm/meshdb/meshdb.yaml"))
manifest = yamldecode(file("${path.module}/meshdb.yaml"))
depends_on = [
kubernetes_namespace.meshdb-ns,
null_resource.generate_meshdb_chart
null_resource.package_meshdb_chart
]
}
8 changes: 8 additions & 0 deletions infra/meshdb/meshdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: meshdb
namespace: meshdb
spec:
chart: meshdb-0.1.0.tgz # TODO: Template version
targetNamespace: meshdb

0 comments on commit 42875bb

Please sign in to comment.