fresh-yak-35965
06/21/2023, 3:51 PMFailed to resolve project configuration.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Unable to load Garden project found at /Users/jackhall/code/nucleus: Error: Invalid template string (${command.params.env}.scalecomputiβ¦): Could not find key env under command.params. Available keys: (none).
Several commands including deploy --sync
are failing due to this usage of template syntax wherein the --env option is not recognized.wide-flag-41451
06/21/2023, 4:26 PMyaml
kind: Deploy
name: secrets
type: kubernetes
spec:
manifests:
$forEach: ${var.secrets}
$return:
apiVersion: v1
kind: Secret
metadata:
name: ${item.key}
type: Opaque
stringData:
$merge: ${item.value}
varfiles:
- ./secrets.${environment.name}.yaml
I get the following error when I run garden deploy
Error processing config for Deploy action secrets:
Could not find varfile at path './secrets.${environment.name}.yaml'
I have just recently updated to the latest release of garden and this previously worked with Modules.
My file structure looks like the following:
secrets/
garden.yaml <-- file where module / action was defined
secrets.local.yaml
I notice when i run garden deploy it says the following :
βΉ garden β Running in Garden environment local.aashelt
which is because I think i have this setup in my environment configuration in my project.yaml
yaml
- name: local
defaultNamespace: ${local.username}
variables:
defaultHostname: ${project.name}.${local.username}.local.app.garden
replicas: 1
cpu: 100m
mem: 1Gi
volumeSize: 5Gi
storageClass: ""
cluster: ""
timestamp: ""
so should the environment name resolve to "local"? or "local.aashelt" ? I ended up changing my file to match that and i received the same error, its like its not interpolating the template.
Heres the old Module that worked before:
yaml
kind: Module
name: secrets
type: kubernetes
manifests:
$forEach: ${var.secrets}
$return:
apiVersion: v1
kind: Secret
metadata:
name: ${item.key}
type: Opaque
stringData:
$merge: ${item.value}
varfile: secrets.${environment.name}.yaml
Not sure what other information to provide but if theres anything else i need to provide let me know.aloof-lamp-69262
06/26/2023, 2:13 PMhttps://cdn.discordapp.com/attachments/1122892487065866303/1122892487304958134/Image_6-26-23_at_10.12_AM.jpegβΎ
future-coat-9017
06/26/2023, 6:07 PM[2023-06-26T17:24:42.519Z] Resolving 240 modules...
[2023-06-26T17:25:14.026Z] Resolving 240 modules... β Done
This is using the Kubernetes provider.
I've look at the logs with debug logs on, and noticed it's doing some FS scans which takes about a second, I assume building the DAG is also very quick.. I wonder if most of this time is spent making Kubernetes API calls? Are those necessary or is there an option here to introduce a flag to skip all of these?
Is there anything else I can do to improve this situation?
It would be fantastic if this was under 5 seconds.
Thanks!icy-furniture-17516
07/04/2023, 7:53 AMcomponent:
variable: X
How can I override these variables from the cli flag (--var
) or from .env varfiles?
I tried --var=component.variable=Z
but that didn't work.colossal-salesclerk-87522
07/05/2023, 12:58 PMββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Unable to run docker command: An error occurred while trying to run '/root/.garden/tools/docker/e9744f1ea7f84408/docker/docker' (spawn /root/.garden/tools/docker/e9744f1ea7f84408/docker/docker ENOENT). Please make sure '/root/.garden/tools/docker/e9744f1ea7f84408/docker/docker' is installed and in the $PATH.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βΉ build.root-config [debug] β Spawning '/root/.garden/tools/docker/e9744f1ea7f84408/docker/docker manifest inspect xxx.azurecr.io/xxxx/xxx:v-224566a45f' in /opt/atlassian/pipelines/agent/build/.garden/build/root-config
β build.root-config β Failed resolving status for Build type=container name=root-config (took 4.61 sec). Here is the output:
wide-flag-41451
07/05/2023, 7:55 PMyaml
sync:
defaults:
exclude:
- '**/node_modules'
# owner: 1000 # <- set an integer user ID or a string name
# group: 1000 # <- set an integer group ID or a string name
fileMode: 644 # <- set the permission bits (as octals) for synced files
directoryMode: 755 # <- set the permission bits (as octals) for synced directories
I've still not beable to get this to work with this configfew-magazine-85406
07/18/2023, 4:22 AM{
"error": {
"cause": {
"errno": -111,
"code": "ECONNREFUSED",
"syscall": "connect",
"address": "127.0.0.1",
"port": 80
}
},
"message": "Unable to reach service at http://backend.rust.local.demo.garden"
}
---
I check the svc with kubectl get svc
and see it doesn't have an ExternalIP.
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
backend ClusterIP 10.105.208.217 <none> 80/TCP 21m
frontend ClusterIP 10.97.105.9 <none> 8080/TCP 16m
---
I execute a curl from ingress pod to backend and it returns
kephalos@dev:~/test-of-rust-with-frontend$ k exec -n garden-system garden-nginx-ingress-nginx-controller-j9gff -- curl -X GET backend.rust.local.demo.garden
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17 100 17 0 0 55 0 --:--:-- --:--:-- --:--:-- 55Hello, Rust π¦!
Please let me know if there is any additional info I could provide that could be helpful.
Thank you!flaky-plumber-11624
07/20/2023, 10:23 AM/Users/ankitmishra/.garden/tools/kubectl/f8a39834529cd1ed/kubectl --context=<context> --namespace=garden-test apply --output=json -f -
I checked the version of kubectl and it is a couple of versions behind the version we run in our cluster
/Users/ankitmishra/.garden/tools/kubectl/f8a39834529cd1ed/kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.3", GitCommit:"816c97ab8cff8a1c72eccca1026f7820e93e0d25", GitTreeState:"clean", BuildDate:"2022-01-25T21:25:17Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"darwin/arm64"}
Server Version: version.Info{Major:"1", Minor:"25+", GitVersion:"v1.25.11-eks-a5565ad", GitCommit:"df109513ba589adaee235b4e658476275d1fde31", GitTreeState:"clean", BuildDate:"2023-06-16T17:35:00Z", GoVersion:"go1.19.10", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.25) exceeds the supported minor version skew of +/-1
This is causing issues with the sync as shown below.
error: error validating "STDIN": error validating data: ValidationError(Deployment.spec): unknown field "topologySpreadConstraints" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false
My question is, can I specify the kubectl version or the kubectl path so that I can work around the issue? An easy fix would be to copy the binary in the garden kubectl destination, but is that the recommended way to proceed?witty-dusk-40518
07/20/2023, 11:41 AMclean-kite-99549
07/21/2023, 2:10 PMError: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
jupyterhub:
- (root): Additional property .garden is not allowed
So, the error itself is pretty obvious. The jupyterhub helm chart is invalidating any additional properties not included in the chart's schema. The only solution to this that I'm currently coming up with is to fork their helm-chart and edit the schema. That is certainly not an ideal solution and would require a lot of extra work on my end, and I don't have any need to make further edits to that helm chart schema other than to allow additional properties at the root.
I've installed 7-8 other charts with Garden and have had no issues. Absolutely in love with it.
My question: Is there a way to disable the --set \.garden.mode=default
argument that is added to the command?
The command and output that's being run by garden is: Command "/home/jessica/.garden/tools/helm/b736014484fd8f0f/linux-amd64/helm --kube-context jess-epx-platform --kubeconfig /home/jessica/GolandProjects/EpxPlatform-BaseDockerfile/garden/terraform/kubeconfig.yaml --namespace jupyterhub install jupyterhub jupyterhub --version 1.2.0 --repo https://jupyterhub.github.io/helm-chart/ --namespace jupyterhub --timeout 300s --values /home/jessica/GolandProjects/EpxPlatform-BaseDockerfile/garden/actions/deploy/platform-hub/helm/base.yaml --values /tmp/8336045834d1f61022757a21faa86dee --set \.garden.mode=default" failed with code 1:
This can be reproduced with the following deploy action:
kind: Deploy
type: helm
name: platformhub-helm
spec:
releaseName: jupyterhub
namespace: jupyterhub
chart:
repo: https://jupyterhub.github.io/helm-chart/
name: jupyterhub
version: "1.2.0"
If anyone has any insight to this, please help! I really really don't want to start maintaining another helm chart.silly-accountant-45583
07/25/2023, 1:07 PMgarden deploy <my_docker_build_action>
it goes right away to building an image without even checking the status of exec deploy action. As a result image build fails as there are no creds deployed. In 0.12 it worked, but after upgrade to 0.13 dependency resolution seems broken. I've checked everything, but couldn't find anything to solve this issue.
My actions are defined as in the following example:
yaml
kind: Deploy
type: exec
name: example-registry-creds
spec:
deployCommand: [example, deploy, command]
statusCommand: [example, status, command]
cleanupCommand: [example, cleanup, command]
yaml
kind: Build
type: container
name: my-docker-image
dependencies:
- deploy.example-registry-creds
include:
- Dockerfile
Maybe these logs can be related
Found 0 files in Deploy action example-registry-creds root /path/to/example-registry-creds
Is this a bug?
Please ping me if you need additional info.
I am using garden v0.13.9
on Ubuntu 20.04most-analyst-11973
07/26/2023, 4:56 PMlatest
, and so I need to be able to configure the pod/deployment imagePullPolicy to be Always. It seems like this is not covered in the docs, and attempting it the key seems to be ignored. Not sure if this is intentional/bug or just a misconfiguration on my side. Thanks for any advice!quaint-dress-831
07/27/2023, 3:07 PMorange-ability-1812
07/27/2023, 5:11 PMgarden dev
environment and stream the logs to actually see the stack trace on the server side. It would be really awesome if there was a way to specify which services to capture logs for during a test run.
I tried doing something like this:
kind: Workflow
name: integration-tests
steps:
- command: [deploy, --logs, api]
- command: [test, integration-tests]
But it gives me an error that specifically it can't stream logs using workflows.
Is there a solution I'm missing, or is this something that would be a feature request?thousands-painting-49976
07/30/2023, 2:34 PMbrief-dawn-88958
08/01/2023, 3:01 PMInvalid count value
when deploying with local mode.
$ garden deploy --local bex-os
...
Scanning repository at /Users/xxxx/IdeaProjects/bex-os
Invalid count value
Scanning repository at /Users/xxxx/IdeaProjects/bex-umbrella
Scanning repository at /Users/xxxx/IdeaProjects/bex-umbrella/.garden/sources/project/bexapp--accbe12695
Scanning repository at /Users/xxxx/IdeaProjects/bex-umbrella/.garden/sources/project/bom-app--fc03d112c9
Scanning repository at /Users/xxxx/IdeaProjects/bex-umbrella/.garden/sources/project/bom--493b1ac2ed
Scanning repository at /Users/xxxx/IdeaProjects/bex-os
$ echo $?
1
When deploying without the --local
flag, the problem does not occur.
Most of the time, the problem does not occur.
However, when it occurs, it keeps occurring until the next day.
I'm still trying to reproduce this issue but so far had no luck, since it never occurs on my machine.
All our devs are using OSX - I'm on linux.
I grepped the garden codebase for the error string and as well only parts of it but couldn't find any sensible matching occurrence.
It might come from a `RangeError`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Resulting_string_too_large
Has anyone seen this behavior before?
Any ideas what the problem could be?silly-accountant-45583
08/03/2023, 6:51 AMgarden-system
namespace deprecated and planned to be removed? As I see garden can work without this ns. I want to deploy some custom resources to this namespace and want to know beforehand what will Garden do with it in future.flaky-plumber-11624
08/09/2023, 11:15 PMβΉ deploy.gdp-garden [verbose] β [kubernetes-plugin] Status of Deployment dp-ci-1691586975313-gdp is "deploying"
β deploy.gdp-garden β Deployment/dp-ci-1691586975313-gdp: Error: failed to generate container "5619a71419b472824c14778e2632e2ed39f0571748f98e54023cf05c87e231cf" spec: failed to generate spec: no command specified
βΉ deploy.gdp-garden [verbose] β [kubernetes-plugin] Deployment/dp-ci-1691586975313-gdp: Error: failed to generate container "5619a71419b472824c14778e2632e2ed39f0571748f98e54023cf05c87e231cf" spec: failed to generate spec: no command specified
A CMD is present inside the Dockerfile to build the container used in this deployment, so our helm chart does not have any command specified for the deployment, and it has always worked in the past (and when I deployed the chart locally using garden). I could add a command to the manifest or helm values to bypass this error. But I am wondering why there is a difference in behaviors. Am I missing some permission in the ClusterRole?
https://cdn.discordapp.com/attachments/1138973829117526106/1138973829255933962/clusterrole.pngβΎ
colossal-salesclerk-87522
08/10/2023, 6:44 PMhttps://cdn.discordapp.com/attachments/1139268103348420648/1139271857783181412/image.pngβΎ
silly-accountant-45583
08/11/2023, 11:17 AMmammoth-kilobyte-41764
08/11/2023, 3:03 PMabundant-hydrogen-87873
08/12/2023, 12:14 PMorange-ability-1812
08/12/2023, 9:20 PMdocker build
locally, and kaniko remotely).
My goal is that I want an action to download/clone another repo, run (in effect) make build
, and then have the outputs be available to other build tasks in my garden graph.
I've run into a couple dead-ends so far though:
1. I tried just using "Build exec", which works if you don't sandbox anything which would be the more desirable way of working. Furthermore, this is not not ideal for running in CI and doesn't work in most cases. First, my CI runner is using the gardendev/garden-gcloud
image which is good for running garden, but not so much for my own toolchain and may actually be incompatible (for instance this image is on alpine). I could make my own image but then it would be a weird hybrid and hard to maintain. Without that concern it would be better just to run exactly the same build container locally and in CI.
2. So I tried running the builds inside of a Pod in the cluster (whether that is local minikube or remote GKE). The problem here is that there is no Build type for running in an exec-like command in a pod (like kubernertes-pod
for the Run action type). Using Run kubernetes-pod works, but the semantics around passing data between actions is only really set up for Build action types. I can output an artifact but AFAIK there is no good way to get this into the Build container workspace.
So I think my feature request would be Build types for kubernetes-pod and kubernetes-exec. Would this be a difficult thing to add?eager-yacht-45658
08/16/2023, 1:13 PMbored-grass-81679
08/18/2023, 3:39 PMgenerateFiles:
- sourcePath: ./backend-file-name
targetPath: ./path/to/module/root
resolveTemplates: True
Is there a way to achieve the same outcome with Garden Actions?
Thanks in advance!abundant-architect-46258
08/19/2023, 4:10 PMhttps://cdn.discordapp.com/attachments/1142490733975179325/1142490734453346414/image.pngβΎ
proud-river-11384
08/21/2023, 5:14 PMorange-analyst-19175
08/21/2023, 11:18 PMkubernetes
provider. Garden version 0.13.12. I have the local-kubernetes
working just fine but am having trouble getting it set up for remote. I am using this document as my general guide https://docs.garden.io/kubernetes-plugins/remote-k8s/configure-provider. I setup a cluster in Azure AKS and can connect to it using kubectl
(e.g. kubectl get nodes
). I deployed contour, cert-manager, letsencrypt and certificate using helm/kubectl such that I have a valid certificate. My DNS points to the cluster (if I install a service using helm I can connect to it at my URL). I have a container registry created in azure and created a imagePullSecret and put it in the cluster using kubectl create secret docker-registry
My project.garden.yaml
looks like:
Edit - config removed for length.
The issue is when I run garden deploy --env remote
I get the following message:
βΉ garden β Running in Garden environment remote.default
βΉ providers β Getting status...
β providers β Failed processing resolve provider kubernetes (took 1.4 sec). Here is the output:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Error: Client network socket disconnected before secure TLS connection was established
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Failed resolving one or more providers:
- kubernetes
See .garden/error.log for detailed error message
There does not appear to be any additional information in the logs. I've tried running with the --logs
flag which appears to run it in an interactive mode, but I am not sure what to do from there.
I am not sure where to go from here. Any help would be appreciated.
Thanks,
Mattproud-river-11384
08/24/2023, 11:49 AMbuildArgs: {
GITHUB_API_USER: username,
GITHUB_API_KEY: api_key
}
None of the combinations I'm trying work, eg:
buildArgs:
- GITHUB_API_USER: ${local.env.GITHUB_API_USER}
- GITHUB_API_KEY: ${local.env.GITHUB_API_KEY}
this results in the error:
Error validating spec for Build type=container name=policies: key .buildArgs must be of type object. Available keys: localId, publishId, targetStage, buildArgs, extraFlags, dockerfile, hotReload)
I'm not sure how I create an object that can be passed to buildargs using local env vars?