136 Commits
Author SHA1 Message Date
Jose Diaz-Gonzalez cfb7da8ec0 feat: scheduler-k3s renders pvc-backed volumes from storage attachments
Adds a per-entry storage helm chart that owns the PVC and (when host_path is set) the PV, and three triggers for the storage plugin to drive: storage-create installs/upgrades the chart with storage-class existence validation, storage-destroy uninstalls it, storage-status reports the PVC phase. App deployment and cron-job charts now consume storage-app-mounts and reference each PVC by name; the // todo: implement volumes blocks are gone. ProcessVolume gained sub_path, read_only, and persistent_claim fields and the deployment/cron-job templates render them.
2026-04-29 14:49:15 -04:00
Jose Diaz-Gonzalez 7ba453e588 fix: thread secret annotations and labels through new helm charts
The new config and pull secret helm releases need to honor user-set annotations and labels for `--resource-type secret` so existing scheduler-k3s annotation tests keep passing. The dedicated charts now render `.Values.global.annotations` and `.Values.global.labels` onto their Secret manifest, and the deploy trigger plumbs `SecretAnnotations` and `SecretLabels` from the global annotation/label config. The rollback regression bats test now uses `dokku ps:rebuild` for its second deploy because git push of an unchanged ref is rejected by the dokku remote.
2026-04-29 12:18:06 -04:00
Jose Diaz-Gonzalez ef9bdc0379 fix: split env config and image pull secret into separate helm releases
Bundling these Secrets in the app helm chart caused two bugs in the scheduler-k3s plugin: a chart rollback could delete Secrets that older ReplicaSets still referenced by exact timestamped name (`env-{app}.{ts}` and `ims-{app}.{ts}`), hard-crashing pods until manual intervention; and the strategic-merge `patchMergeKey` on `imagePullSecrets` let stale entries leak into the live Deployment until the list pointed at many nonexistent Secrets. Each Secret now lives in its own helm release with a stable name (`config-{app}` and `pull-secret-{app}`), installed before the app chart on every deploy. The deployment trigger also prunes any leaked `imagePullSecrets` entries from the live Deployment so the next deploy lands on a clean list, and the rename and destroy paths uninstall the new releases (and the previously-leaked TLS release on rename) under the old app name.
2026-04-29 12:18:03 -04:00
Jose Diaz-Gonzalez ed8fe40a1c Merge pull request #8268 from dokku/5324-login-to-registry-per-app
Add the ability to log into a registry on a per-app basis
2026-01-10 08:48:16 -05:00
Jose Diaz-Gonzalez 5c2045b6ea fix: delete the tls app chart when the app is deleted 2026-01-10 02:52:01 -05:00
Jose Diaz-Gonzalez 9bb766cf17 fix: reference app-specific config.json for retrieving registry auths 2026-01-10 02:33:59 -05:00
Jose Diaz-Gonzalez b8e8ea74ff feat: use certificates imported by certs plugin when deploying via scheduler-k3s
Closes #7257
2026-01-08 01:05:40 -05:00
Jose Diaz-Gonzalez 0c96c4b6de feat: allow exposing non-web processes as kubernetes services
Closes #7204
2025-11-22 19:39:56 -05:00
Jose Diaz-Gonzalez 99a1e2ee33 feat: default to running one-off k3s containers to a max of 1 day
This follows the standard enforced by Heroku.
2025-11-18 14:09:38 -05:00
Jose Diaz-Gonzalez 3f70728451 feat: implement forbid/replace logic for k3s pods spawned via cron:run 2025-11-15 16:19:23 -05:00
Jose Diaz-Gonzalez 8c2731b328 fix: properly set concurrency policy for golang 2025-11-10 03:11:11 -05:00
Jose Diaz-Gonzalez f38bc64119 feat: expose concurrency policy to kubernetes jobs 2025-11-10 03:07:29 -05:00
Jose Diaz-Gonzalez f99e3a6c9c feat: add ability to suspend and resume a cron task by ID
This takes advantage of the properties system and allows users to suspend/resume the task at will.
2025-11-09 23:16:38 -05:00
Jose Diaz-Gonzalez e42df29a79 feat: allow specifying maintenance mode in the file or not
If the app's cron tasks are set to maintenance mode, then the task is set to maintenance mode regardless.
2025-11-09 23:16:38 -05:00
Jose Diaz-Gonzalez 4a357e9896 fix: properly suspend and resume k8s CronJob objects when executing scheduler-cron-write 2025-11-09 23:16:38 -05:00
Jose Diaz-Gonzalez c885205b91 refactor: respect the maintenance value of the cron task instead of skipping them
The former method would omit the CronJob objects entirely, meaning a redeploy would be necessary to re-enable them.
2025-11-09 23:16:38 -05:00
Jose Diaz-Gonzalez 791f53ab47 refactor: rename command to task in cron code 2025-11-07 22:41:00 -05:00
Jose Diaz-Gonzalez 82cab643a8 chore: standardize on cron task vs any other naming 2025-11-07 22:36:00 -05:00
Jose Diaz-Gonzalez 3915d25d84 refactor: rename cron entry to cron task
This naming better suits what it is we are fetching.
2025-11-07 22:30:54 -05:00
Jose Diaz-Gonzalez 5d4378c585 feat: add ability to disable letsencrypt for a given application or globally
If disabled globally, it can be re-enabled on a per-app basis by setting the `letsencrypt-server` property to `production` or `staging`.
2025-10-15 00:19:03 -04:00
Jose Diaz-Gonzalez f90a4061c0 feat: create SecurityContext for k3s scheduler from docker-options
Closes #7664
2025-09-12 18:09:33 -04:00
Jose Diaz-Gonzalez 882ca8781b fix: implement scheduler-is-deployed for scheduler-k3s 2025-08-22 01:51:38 -04:00
Jose Diaz-Gonzalez 3edddac0c1 fix: create the data directory 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez 0a86ffe01b fix: add missing scheduler-k3s directory 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez 563365b712 fix: add name to app-json trigger code and some formatting 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez b6fdd4511c fix: add validation to input for common trigger functions 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez b24035c80a refactor: use a common implementation to move files into place in golang core-post-deploy implementations 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez 58c6b137b0 refactor: use a common implementation to extract kustomize files 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez fd6e56cc5f fix: correct kustomize root path check 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez d0ffd7d9f9 feat: stub out kustomize renderer
The process-specific kustomize root path is not currently set, but will be soon.
2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez 04917b72d4 fix: ensure the directories are deleted 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez e0617b209d feat: extract kustomize directory from repo during deploys 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez c472c2a3c7 refactor use chart values directly instead of attempting to template out cron-job and keda files 2025-07-04 04:24:09 -04:00
Jose Diaz-Gonzalez 6da9be2d65 refactor: use chart values directly instead of attempting to template out cron-job and keda files 2025-07-04 04:24:09 -04:00
Jose Diaz-Gonzalez 4ae9cca6f1 feat: implement app-json-is-valid plugin trigger 2025-06-19 02:20:02 -04:00
Jose Diaz-Gonzalez 2dea993804 fix: also stop k8s cron tasks when calling ps:stop 2025-06-10 21:45:08 -04:00
Jose Diaz-Gonzalez 0f4b5d4305 fix: continue including maintenance mode cron tasks in the cron:list subcommand 2025-06-08 22:34:47 -04:00
Jose Diaz-Gonzalez 65dd4bc1e0 feat: set shm-size volume/volumeMounts on kubernetes deployments 2025-03-06 22:59:35 -05:00
Tasos Maschalidis 63182e80e0 Use common.ToBool to check DOKKU_FORCE_TTY 2024-12-17 19:43:16 +02:00
Tasos Maschalidis f786c8c0bc Fix k3s run:detached not returning pod name in a similar fashion to docker-local (as described in docs) 2024-12-17 19:11:01 +02:00
Tasos Maschalidis 838beb4db3 Take DOKKU_FORCE_TTY setting into account for run commands with k3s-scheduler 2024-12-17 19:11:01 +02:00
Jose Diaz-Gonzalez ed0ba7072f refactor: check to see if a deployment-specific image pull secret exists before utilizing it. 2024-12-11 09:23:44 -05:00
Tasos Maschalidis aa51c37774 Properly resolve imagePullSecrets from app and deploymentID if relevant property does not exist 2024-12-10 14:29:38 +02:00
Jose Diaz-Gonzalez b98863b6a7 feat: add support for the keda-http-add-on
Externally, it is treated the same as any other scaling trigger, but requires that the chart be installed in order for it to be supported.
2024-11-13 03:29:26 -05:00
Jose Diaz-Gonzalez fd2cfe8080 fix: correctly pull the deployment id from an app's helm values when executing dokku run under the k3s scheduler
- Fix the internal identifier of deployment_id -> deployment_id
- Add tests for both enter and run.
2024-11-04 14:44:25 -05:00
Jose Diaz-Gonzalez 50244bf8ea chore: drop the pod name from stdout output
This adds unexpected output to the command, making parsing more difficult.
2024-11-04 14:42:53 -05:00
Jose Diaz-Gonzalez ec41dd2e70 refactor: output logs for completed containers
Previously, a container that exited immediately would just show an error message, which is probably not what we want.

If the pod has exited, we will display the logs on stdout for the user and then exit appropriately.

This change also refactors how log streaming works so that we respect exiting when the stream has no content (such as when the container has exited). Previously, the container would just hang around forever due to not being properly canceled. Due to this refactor, the prefix is now split out into a separate writer.
2024-11-04 14:41:42 -05:00
Jose Diaz-Gonzalez adffab13d9 fix: correctly wait for the pod to be ready 2024-11-04 14:38:06 -05:00
Jose Diaz-Gonzalez c3a573229d refactor: execute one-off commands with DOKKU_APP_SHELL as the initial command
This commit changes the launched pod to use the configured DOKKU_APP_SHELL - default /bin/bash - to launch processes. Without this, if a non-interactive process was executed and did not immediately exit, it was possible for that process to launch twice - once when the pod started, and once when entering the pod. Ideally we know whether the process is interactive or not, but this isn't always possible when running under a tty (non-tty == non-interactive). As such, this also removes the ability to launch one-off containers that do not have a configured shell in the container, but this is better than attempting to run commands twice.
2024-11-04 14:29:34 -05:00
Tasos Maschalidis 774fb546ef Remove prefixing releaseName with 'dokku-' in UninstallChart and GetValues calls in scheduler-k3s/triggers.go 2024-10-30 11:47:15 +02:00