Kartikey Mullick
08/11/2023, 5:59 PMindex.yaml
file
For reference, this is the relevant HCL script (Have removed the GKE and Cloud SQL modules)
I am sure I have specified either the chart or the repository arguments wrongly, but not sure what is the right one
provider "helm" {
kubernetes {
host = "${google_container_cluster.primary.endpoint}"
token = "${data.google_client_config.current.access_token}"
client_certificate = "${base64decode(google_container_cluster.primary.master_auth.0.client_certificate)}"
client_key = "${base64decode(google_container_cluster.primary.master_auth.0.client_key)}"
cluster_ca_certificate = "${base64decode(google_container_cluster.primary.master_auth.0.cluster_ca_certificate)}"
}
}
resource "helm_release" "my-lakefs" {
name = "my-lakefs"
chart = "charts/lakefs"
repository = "<https://github.com/treeverse/lakeFS>"
}
Ariel Shaqed (Scolnicov)
08/12/2023, 6:53 AMKartikey Mullick
08/12/2023, 7:17 AMrepository = "<https://github.com/treeverse/lakeFS>"
╷
│ Error: could not download chart: looks like "<https://github.com/treeverse/lakeFS>" is not a valid chart repository or cannot be reached: failed to fetch <https://github.com/treeverse/lakeFS/index.yaml> : 404 Not Found
│
│ with helm_release.my-lakefs,
│ on <http://main.tf|main.tf> line 149, in resource "helm_release" "my-lakefs":
│ 149: resource "helm_release" "my-lakefs" {
│
2. When using repository = "<https://github.com/treeverse/charts>"
╷
│ Error: could not download chart: looks like "<https://github.com/treeverse/charts>" is not a valid chart repository or cannot be reached: failed to fetch <https://github.com/treeverse/charts/index.yaml> : 404 Not Found
│
│ with helm_release.my-lakefs,
│ on <http://main.tf|main.tf> line 149, in resource "helm_release" "my-lakefs":
│ 149: resource "helm_release" "my-lakefs" {
│
╵
In both cases, I have set chart = "charts/lakefs"
Ariel Shaqed (Scolnicov)
08/12/2023, 8:29 AMKartikey Mullick
08/12/2023, 9:21 AMAriel Shaqed (Scolnicov)
08/12/2023, 9:40 AMKartikey Mullick
08/14/2023, 6:46 PMresource "helm_release" "my-lakefs" {
name = "my-lakefs"
chart = "lakefs"
repository = "<https://charts.lakefs.io>"
set {
name = "secrets.databaseConnectionString"
value = "postgresql+psycopg2://${var.db_user}:${var.db_password}@/${var.db_name}?host=/cloudsql/${var.project_id}:${var.location}:${var.db_instance}"
}
set {
name = "secrets.authEncryptSecretKey"
value = "uuid_code(not shown)"
}
set {
name = "lakefsConfig.blockstore.type"
value = "gs"
}
set {
name = "lakefsConfig.gs.credentials_file"
value = "/secrets/lakefs-service-account.json"
}
depends_on = [
google_container_cluster.primary
]
}
Here are the error logs from terraform:
helm_release.my-lakefs: Modifying... [id=my-lakefs]
╷
│ Error: template: lakefs/templates/deployment.yaml:93:12: executing "lakefs/templates/deployment.yaml" at <include "lakefs.s3proxyContainer" .>: error calling include: template: lakefs/templates/_proxy_container.tpl:3:37: executing "lakefs.s3proxyContainer" at <fromYaml>: wrong type for value; expected string; got map[string]interface {}
│
│ with helm_release.my-lakefs,
│ on <http://main.tf|main.tf> line 149, in resource "helm_release" "my-lakefs":
│ 149: resource "helm_release" "my-lakefs" {
│
╵
I apologize if I am missing something obvious - not an expert in deploymentAriel Shaqed (Scolnicov)
08/14/2023, 7:38 PMlakeFSConfig
needs to be a string value. You can see in the example: saying lakefsConfig: |
starts a YAML string.
Can you perhaps try:
resource "helm_release" "my-lakefs" {
name = "my-lakefs"
chart = "lakefs"
repository = "<https://charts.lakefs.io>"
set {
name = "secrets.databaseConnectionString"
value = "postgresql+psycopg2://${var.db_user}:${var.db_password}@/${var.db_name}?host=/cloudsql/${var.project_id}:${var.location}:${var.db_instance}"
}
set {
name = "secrets.authEncryptSecretKey"
value = "uuid_code(not shown)"
}
set {
name = "lakefsConfig"
value = "blockstore:\n type: gs\n gs:\n credentials_file: /secrets/lakefs-service-account.json"
}
depends_on = [
google_container_cluster.primary
]
}
This is just me typing some YAML and HCL, I apologise for any typing errors.
Also please note that I've also gone ahead and changed the credentials_file
to be under <http://blockstore.gs|blockstore.gs>
, whereas in your case it was under gs
.{
...
set {
name="lakefsConfig"
value=yamlencode(some.object.lakefsConfig)
}
...
}
This uses yamlencode to create a good string value from an object.Kartikey Mullick
08/15/2023, 10:39 AMlakefsConfig
as string like you mentioned and ran into this error in the first screenshot
• Then I destroyed the entire infra and recreated it (Thinking it was an issue with updating the helm chart in-place) and got the same error as shown in the second screenshot. I have also run the helm command to check the error and this is the output-
helm history my-lakefs
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Tue Aug 15 12:25:14 2023 failed lakefs-0.9.16 0.106.0 Release "my-lakefs" failed: context deadline exceeded
• I also increased the timeout to 20 minutes, and had the same error
In case it is needed, I can also attach the entire <http://main.tf|main.tf>
file I use (no confidential data)Ariel Shaqed (Scolnicov)
08/16/2023, 8:21 AMhelm
command to investigate.Kartikey Mullick
08/16/2023, 7:50 PM