Commit Graph

83 Commits

Author SHA1 Message Date
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
ae99f491fa fix: drop x-forwarded- properties from k3s scheduler
These shadow existing values managed by k3s itself, causing issues where the same header is injected with multiple values, which some frameworks do not support as they use the header directly without parsing to construct urls.
2025-09-03 20:38:01 -04:00
Jose Diaz-Gonzalez
9182b272f4 fix: split up proxy-buffers into annotation properties
The values derive from the same nginx source, so they also need a modifier in order to fit into the ingress-nginx scheme.
2025-09-03 20:36:33 -04:00
Jose Diaz-Gonzalez
fd61fdd2ab fix: ensure the vector values are only set for the vector chart 2025-08-23 16:14:51 -04:00
Jose Diaz-Gonzalez
ef2d014ed6 chore: remove extra debug message 2025-08-22 01:52:58 -04:00
Jose Diaz-Gonzalez
dd7589323e feat: implement fetching the process-specific kustomize root path 2025-07-23 20:47:46 -04:00
Jose Diaz-Gonzalez
78bde7f817 feat: add more context for warning about not having an autoscaling config 2025-07-23 20:15:08 -04:00
Jose Diaz-Gonzalez
e7964ee99d chore: remove debug code 2025-07-23 18:52:43 -04:00
Jose Diaz-Gonzalez
d33393d3fd feat: debug failed global helm chart installations by checking all pod logs 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
e0617b209d feat: extract kustomize directory from repo during deploys 2025-07-23 18:40:43 -04:00
Jose Diaz-Gonzalez
5ae6c1c845 feat: add the ability to specify a kustomize-root-path
This will default to `config/kustomize`, though may change to `.dokku/kustomize` in the future.
2025-07-23 18:34:53 -04:00
Jose Diaz-Gonzalez
b97e8f3601 feat: add ability to ship k3s container logs via vector
If a global vector-sink property on the logs plugin is set, we will use that to configure a log sink (defaulting to console output otherwise). Note that the actual configuration still needs to be a valid DSN representing a Vector log sink.

While this does not support pinning log sinks to specific apps, it opens up integration for those who use a single k3s cluster in shared tenancy.
2025-04-14 04:35:21 -04:00
Jose Diaz-Gonzalez
888d1d4bf3 feat: add ability to set shm-size property
This doesn't yet manage process volumes, but the scaffolding is there to allow interacting with the property.
2025-03-06 22:48:49 -05:00
Jose Diaz-Gonzalez
52c05558f9 chore: do not add an unnecessary fmt.Sprintf() 2025-03-06 22:35:56 -05:00
Jose Diaz-Gonzalez
eff339a165 fix: correctly handle scale to zero with the Keda http addon
There is a bug in the Keda project that caused Keda to incorrectly handle empty trigger lists. If self-managing the ScaledObject when using an HTTPScaledObject, an external-push trigger must be created.

This change additionally updates the chart to fix any potential bugs in usage of keda.
2024-12-10 21:47:55 -05:00
Jose Diaz-Gonzalez
8d08687706 feat: provide ability to customize chart values via scheduler-k3s:set
Dokku ships with default charts and customizes their helm values. In certain cases, it may be useful to further customize those values to better support specific installations. With this change, it is now possible to set custom values by providing the key in the format `chart.$CHART_NAME.$PROPERTY`. For instance, to increase timeouts for the keda http addon:

```shell
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.tcpConnectTimeout 120s
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.keepAlive 120s
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.responseHeaderTimeout 120s
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.idleConnTimeout 120s
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.tlsHandshakeTimeout 120s
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.expectContinueTimeout 120s
```

To reset a value to its default, simply set the value to an empty string.

```shell
dokku scheduler-k3s:set --global chart.keda-add-ons-http.interceptor.tcpConnectTimeout
```

Once the values are set, users will need to then run `scheduler-k3s:ensure-charts` with either the `--force` flag or specify the `--chart` flag with a list of charts to force apply.

```shell
dokku scheduler-k3s:ensure-charts --force

dokku scheduler-k3s:ensure-charts --chart keda-add-ons-http
```

Note that the existing dokku-provided values cannot be removed, but can be overridden.
2024-12-03 02:07:36 -05: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
7e406436fa fix: do not shadow the trigger variable 2024-11-13 02:15:18 -05:00
Jose Diaz-Gonzalez
62f25ad33f feat: give the trigger a default name if none is specified 2024-11-13 02:14:54 -05:00
Jose Diaz-Gonzalez
785af1611c fix: error if there is no type for the trigger specified 2024-11-13 02:14:29 -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
aee62ebd2d fix: strip non-numeric characters from certain ingress-nginx annotation values
The controller does not do so on our behalf and ends up falling back to the default values.

Closes #7292
2024-10-21 20:24:36 -04:00
Jose Diaz-Gonzalez
611006af73 feat: add support for non-local nginx implementations
If the scheduler is not docker-local, we will assume that a separate plugin trigger will pull access/error logs on our behalf. For k3s, the naive implementation is to pull logs from a single container (multiple ingress-nginx pods will be supported in a future release).

Closes #7268
2024-10-17 00:18:24 -04:00
Jose Diaz-Gonzalez
4d7f779c28 feat: add support for various timeout-related functions to nginx, openresty and k3s plugins
Closes #7267
2024-10-16 00:51:01 -04:00
Jose Diaz-Gonzalez
f34fd277b3 refactor: use CallPlugnTrigger instead of PlugnTriggerOutputAsString
Refs #6422
2024-03-14 00:46:55 -04:00
Jose Diaz-Gonzalez
c840fc5f9e feat: wait until helm charts are installed before marking a deploy as failed or completed
This ensures applications are actually up vs giving a false sense of security to users about the state of their applications.
2024-03-12 08:39:22 -04:00
Jose Diaz-Gonzalez
0134cd98d0 fix: correct issue where ClusterTriggerAuthentication objects were filtered based on prefix
The prefix no longer matters since they are global to the cluster.
2024-03-08 05:23:58 -05:00
Jose Diaz-Gonzalez
f2892208c1 fix: handle case where keda isn't installed properly
If keda is not installed, warn the user that it isn't installed and ignore the rest.

Ignoring the error here is fine as it gives the user context but doesn't block a deploy.
2024-03-06 17:55:45 -05:00
Jose Diaz-Gonzalez
7c58bbf792 feat: setup cluster trigger authentication objects 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
25ad302ed2 refactor: use enum to represent authentication type 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
c0f01c58d6 feat: add initial support for interacting with ClusterTriggerAuthentication objects
These will be provisioned to the keda namespace and referenced by Triggers if they exist (as a fallback to app-specific values).
2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
14f0e2fb72 refactor: use const for prefix 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
f23cdffe49 feat: associate matching authentication info to a given autoscaler 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
042495bcd6 fix: ensure keda auth secrets are written out 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
4ddd341184 feat: add initial support for keda authentication 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
46f11cb239 feat: implement replacements 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
b7ff696507 feat: add initial support for injecting keda addons 2024-03-06 03:39:11 -05:00
Jose Diaz-Gonzalez
45fbb7546f fix: pull labels, not annotations 2024-03-01 17:42:24 -05:00
Jose Diaz-Gonzalez
d8946edf91 feat: add support for manipulating labels
Closes #6625
2024-03-01 17:42:24 -05:00
Jose Diaz-Gonzalez
f20d08e49e fix: use correct snippet 2024-02-27 13:49:44 -05:00
Jose Diaz-Gonzalez
b99c25f090 feat: add support for setting underscores-in-headers for nginx, openresty, and k3s
Closes #6627
2024-02-27 13:49:44 -05:00
Jose Diaz-Gonzalez
23fe19faaa fix: bypass deletion error if k3s is the configured scheduler and it isn't installed 2024-02-22 07:42:15 -05:00
Jose Diaz-Gonzalez
72067fcfd2 feat: add ability for users to specify alternative kubeconfig and kubecontext
This will provide the possibility for users to talk to existing kubernetes clusters, thereby removing one of the biggest reasons for having the old scheduler-kubernetes plugin around.
2024-02-22 07:42:15 -05:00
Jose Diaz-Gonzalez
93323bd0ff feat: add ability to clear out default values
Also add some tests
2024-02-22 06:55:02 -05:00
Jose Diaz-Gonzalez
193b1d8103 fix: set lower cpu/memory requests 2024-02-21 18:31:46 -05:00
Jose Diaz-Gonzalez
14eb60160c fix: avoid setting empty cpu/memory requests 2024-02-21 18:30:48 -05:00
Jose Diaz-Gonzalez
05c48430c5 fix: correct issue where resource values were ignored 2024-02-21 18:13:47 -05:00