abundant-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?orange-ability-1812
08/25/2023, 8:43 PM.gardenignore
and my include
section and there is no doubt that they are included. And indeed the same configuration works at other times. Its always the same files interestingly Makefile
, and e.g. dev/containers/tests.Dockerfile
. I've tried renaming the files, clearing the cache and build envs, running with garden --force-refresh build thing --force
, nuking the entire project .garden
directory, reinstalling garden and nuking ~/.garden
and nothing seems to work except waiting (usually the next day...).
The last bit makes me think that there is something wrong with timestamp checking or something.
This is pretty breaking and basically halts my work until garden decides to fix itself.
Any ideas at all?swift-spring-8620
08/28/2023, 5:01 AMclean-kite-99549
08/30/2023, 7:33 PMgarden plugin terraform destroy-action fsx-csi-driver-tf
- garden plugin terraform apply-action fsx-csi-driver-tf
- garden plugin terraform plan-action fsx-csi-driver-tf
I receive the following error:
Unexpected positional argument "fsx-csi-driver-tf" (expected only plugin and command)
Based upon the CLI output for the commands, I would expect to pass an argument with the name of the action to the command. Runs terraform apply for the specified terraform Deploy action, with variables automatically configured as inputs. Use the action name as first argument, followed by any arguments you want to pass to the command. If necessary, terraform init is run first.
Am I using this wrong or could there possibly be an issue with the CLI parser not accepting positional arguments from the plugin?
Thanks,
Jessanonymous
09/06/2023, 3:26 PMacoustic-dusk-48036
joined #π±ο½help-and-getting-started.acoustic-dusk-48036
09/06/2023, 3:26 PMnarrow-application-15594
09/12/2023, 9:35 PMgarden deploy <thing>
without it failing with the error Lock file is already being held
reported for random modules. This is consistent with every run -- I haven't been able to run garden deploy
at all since upgrading to 0.13.
I haven't yet gotten around to converting modules to actions since I wanted to see first if I could ask my team to upgrade to 0.13 while we convert things over time. I think 0.13 should work with modules to enable this, but we have too many modules (47 as of this writing) to test converting things piecemeal if I'm getting lock errors every run. I tried reinstalling Garden as well (cleaning out the existing .garden directories and starting clean), but that hasn't helped.
Anyone know if there's some obvious thing I'm missing here? A lock file I should be looking for to clean up? Should it be treated as a bug? Thanks for any suggestions or time spent thinking about this.proud-river-11384
09/21/2023, 9:18 AMkubectl create sa testaccount --namespace=test-dev
is enough to get the service to start for now.
For some more context my service deployment is defined using helm charts, and it's possible to override the value of serviceAccountName to get the service to expect a different service account.anonymous
09/22/2023, 11:34 AMgifted-thailand-88875
joined #π±ο½help-and-getting-started.proud-river-11384
09/22/2023, 9:24 PMapi-deployment.yaml
worker-deployment.yaml
Initially I'm trying to only deploy the worker, so I added an exclude clause in my garden.yaml for the helm deployment:
exclude:
- 'api-deployment.yaml'
This works at excluding the file; I can see in the debug logs Found 5 files in Deploy action worker-deploy root /Users/mark/workspace/policies/.k8s/helm
, where previously it found 6.
However, the deployment still attempts to deploy the api application. I'm assuming this is something to do with how Helm works and is called under the hood.
Is there a way to do what I'm trying to do? Maybe it's just too far outside of a reasonable usecase?wonderful-table-85939
09/25/2023, 3:28 PMbright-policeman-43626
09/25/2023, 6:31 PMmost-window-13633
09/28/2023, 1:50 PMcluster-buildkit
and deployment are working. But build does not work anymore since i've switch from my ArchLinux to Mac M1
I suppose the platform build target is the problem. If you have something in mind that could help me.wide-flag-41451
10/03/2023, 1:45 PManonymous
10/05/2023, 11:06 AMabundant-teacher-31897
joined #π±ο½help-and-getting-started.thousands-grass-67253
10/11/2023, 2:50 PMflat-state-47578
11/01/2023, 3:49 AMExecuted in 687.61 secs fish external
usr time 21.10 secs 0.15 millis 21.10 secs
sys time 10.93 secs 1.09 millis 10.93 secs
Admittedly we have about 16 subdirectories and maybe 30 services plus a bunch of tasks and a couple of workflows, but running the above command takes almost 12 minutes, even on repeated runs.
I'm doing this using Garden 0.13.18
with the 0.12 compatibility mode (we have so many changes to make, so I'm trying to stage this as much as possible).
I notice that it is running some update commands for all of the actions of each service - e.g. build, deploy, run, and then the actual remote modules themselves. This multiplies the number of updates it needs to perform by 4x, and I'm not sure that's necessary - the source is only used by the build after all.
Is this just a compatibility mode thing, or a generally 0.13 thing?quiet-apartment-79546
11/07/2023, 5:10 PMbland-wolf-59979
11/08/2023, 1:33 AMRABBITMQ_SERVICE_PORT=5672
RABBITMQ_PORT_5672_TCP_ADDR=172.20.84.21
RABBITMQ_SERVICE_HOST=172.20.84.21
RABBITMQ_PORT=tcp://172.20.84.21:5672
RABBITMQ_SERVICE_PORT_HTTP=5672
RABBITMQ_PORT_5672_TCP=tcp://172.20.84.21:5672
RABBITMQ_PORT_5672_TCP_PORT=5672
RABBITMQ_PORT_5672_TCP_PROTO=tcp
the problem is that the app needs RABBITMQ_PORT to be 5672
setting an env: of RABBITMQ_PORT in garden.yml does nothing since it gets overwritten by garden to tcp://172.20.84.21:5672
is there any way to disable these vars from being injected?
garden 0.12 acornrapid-lighter-30322
11/15/2023, 9:58 AMthankful-area-26035
11/20/2023, 5:03 PMsparse-plastic-7047
11/27/2023, 5:05 PMgarden deploy --log-level=verbose
βΉ deploy.backend2 β Deploying version v-c07c2b4b3c...
βΉ deploy.backend2 β Waiting for resources to be ready...
βΉ deploy.backend2 [verbose] β [kubernetes-plugin] Waiting for resources to be ready...
βΉ deploy.backend2 [verbose] β [kubernetes-plugin] Status of Deployment backend2 is "unhealthy"
βΉ deploy.backend2 [verbose] β [kubernetes-plugin] Error deploying deploy.backend2: ImagePullBackOff - Back-off pulling image "backend2:v-aa19766a21"
βββ Events βββ
Pod backend2-9f79b47fc-9mj89: Pulling - Pulling image "backend2:v-aa19766a21"
Pod backend2-9f79b47fc-9mj89: Failed - Failed to pull image "backend2:v-aa19766a21": rpc error: code = Unknown desc = Error response from daemon: pull access denied for backend2, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Our setup is a local environment that points to a local minikube instance. We are trying to deploy a docker container to the local cluster upon garden deploy. We are currently not trying to push docker images to dockerhub if that is part of this issue.
The full logs are attached, along with our garden yaml files.
I think we most likely have a configuration issue so I doubt this is a bug, but I'd really appreciate any guidance on what to look into to fix this issue!
https://cdn.discordapp.com/attachments/1178743505464606760/1178743505997266965/ConsoleLog.txt?ex=6577416f&is=6564cc6f&hm=ec5e8ec56a5f30e1d5fabb4e5a7bc235dc9fc36dfcc87f4485d607ecb7c10d25&
https://cdn.discordapp.com/attachments/1178743505464606760/1178743506349592646/project.garden.yaml?ex=6577416f&is=6564cc6f&hm=94176805d020b2121b6309752b6d23e2484e4617fe46965c9a04d6500fba3031&
https://cdn.discordapp.com/attachments/1178743505464606760/1178743506672550020/service.garden.yaml?ex=6577416f&is=6564cc6f&hm=20d8636c9be4bb329b215483e71414d6caf3af71c6abc78a2dc7c7619dd8a120&clever-policeman-58407
11/27/2023, 8:03 PMvariables.SOME_IMAGE
so that the YAML files can substitute any instances of ${var.SOME_IMAGE}
and deploy with the right image.
When I'm using Kustomize, however, it doesn't look like Kustomize is given access to Garden variables. So I can no longer use the ${var.SOME_IMAGE}
method I was using beforehand to get custom images into a Kustomize deployment.
Is there a canonical way to access Garden variables when using Kustomize? Is this a bug or intended behavior?