chore: fix pre-existing gofmt and markdown lint issues

Markdown lint in CI now checks nested docs, which it previously skipped because the `**/*.md` glob was expanded by the shell without globstar.
This commit is contained in:
Jose Diaz-Gonzalez
2026-10-21 18:49:26 -04:00
parent 9dd14b7385
commit 398deb3beb
26 changed files with 124 additions and 115 deletions

View File

@@ -40,7 +40,7 @@ jobs:
- name: Install markdownlint-cli - name: Install markdownlint-cli
run: npm install -g markdownlint-cli@0.35.0 run: npm install -g markdownlint-cli@0.35.0
- name: Run markdown-lint - name: Run markdown-lint
run: markdownlint -c .github/linters/.markdown-lint.yml *.md **/*.md run: markdownlint -c .github/linters/.markdown-lint.yml --ignore tests/apps '**/*.md'
packer: packer:
name: packer name: packer

View File

@@ -67,7 +67,7 @@ Sometimes it may be desirable to set a different path for a given app, e.g. when
dokku app-json:set node-js-app appjson-path .dokku/app.json dokku app-json:set node-js-app appjson-path .dokku/app.json
``` ```
The value is the path to the desired file *relative* to the base search directory, and will never be treated as absolute paths in any context. If that file does not exist within the repository, Dokku will continue the build process as if the repository has no `app.json`. The value is the path to the desired file _relative_ to the base search directory, and will never be treated as absolute paths in any context. If that file does not exist within the repository, Dokku will continue the build process as if the repository has no `app.json`.
The default value may be set by passing an empty value for the option: The default value may be set by passing an empty value for the option:

View File

@@ -251,6 +251,7 @@ To push the image on release with extra tags, set the `push-extra-tags` to a com
# multiple-tags # multiple-tags
dokku registry:set node-js-app push-extra-tags foo,bar dokku registry:set node-js-app push-extra-tags foo,bar
``` ```
The `push-extra-tags` can be set to a single tag too. The `push-extra-tags` can be set to a single tag too.
```shell ```shell

View File

@@ -6,11 +6,14 @@
- The default image used for Cloud Native Buildpack builds is now `heroku/builder:24`, and is based on both the `heroku-24` stack as well as Ubuntu 24.04. Users that wish to stick with the old, `heroku-22`/Ubuntu 22.04 builder may specify `heroku/buildpacks:22` as their builder image. Please see the [cloud native buildpack deployment documentation](/docs/deployment/builders/cloud-native-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder. - The default image used for Cloud Native Buildpack builds is now `heroku/builder:24`, and is based on both the `heroku-24` stack as well as Ubuntu 24.04. Users that wish to stick with the old, `heroku-22`/Ubuntu 22.04 builder may specify `heroku/buildpacks:22` as their builder image. Please see the [cloud native buildpack deployment documentation](/docs/deployment/builders/cloud-native-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
- The default image used for Herokuish Buildpack builds is now `gliderlabs/herokuish:latest-24`, and is based on both the `heroku-24` stack as well as Ubuntu 24.04. Users that wish to stick with the old, `heroku-22`/Ubuntu 22.04 builder may specify `gliderlabs/herokuish:latest-22` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder. - The default image used for Herokuish Buildpack builds is now `gliderlabs/herokuish:latest-24`, and is based on both the `heroku-24` stack as well as Ubuntu 24.04. Users that wish to stick with the old, `heroku-22`/Ubuntu 22.04 builder may specify `gliderlabs/herokuish:latest-22` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
- The `vector` image used by Dokku for enhanced logging support has been upgraded from 0.39.x to 0.41.x. To take advantage of the new image, execute the following commands: - The `vector` image used by Dokku for enhanced logging support has been upgraded from 0.39.x to 0.41.x. To take advantage of the new image, execute the following commands:
``` ```
dokku logs:vector-stop dokku logs:vector-stop
dokku logs:vector-start dokku logs:vector-start
``` ```
- The `openresty` image used by Dokku for proxying via openresty has been upgraded from 0.8.0 to 0.9.0. To take advantage of the new image, execute the following commands: - The `openresty` image used by Dokku for proxying via openresty has been upgraded from 0.8.0 to 0.9.0. To take advantage of the new image, execute the following commands:
``` ```
dokku openresty:stop dokku openresty:stop
dokku openresty:start dokku openresty:start

View File

@@ -90,6 +90,7 @@ Environment variables from `app.json` are processed during the first deploy, bef
4. **Optional variables without a value**: Skipped silently if no TTY is available 4. **Optional variables without a value**: Skipped silently if no TTY is available
On subsequent deploys: On subsequent deploys:
- Variables are NOT re-set unless `sync: true` is specified - Variables are NOT re-set unless `sync: true` is specified
- Variables with `sync: true` are always set to their configured value, overwriting any manual changes - Variables with `sync: true` are always set to their configured value, overwriting any manual changes
- Variables that already have values are not modified - Variables that already have values are not modified
@@ -97,6 +98,7 @@ On subsequent deploys:
### Examples ### Examples
**Simple default value:** **Simple default value:**
```json ```json
{ {
"env": { "env": {
@@ -106,6 +108,7 @@ On subsequent deploys:
``` ```
**Generated secret (recommended for API keys, tokens, etc.):** **Generated secret (recommended for API keys, tokens, etc.):**
```json ```json
{ {
"env": { "env": {
@@ -118,6 +121,7 @@ On subsequent deploys:
``` ```
**Required variable that must be provided:** **Required variable that must be provided:**
```json ```json
{ {
"env": { "env": {
@@ -130,6 +134,7 @@ On subsequent deploys:
``` ```
**Variable that stays in sync with app.json:** **Variable that stays in sync with app.json:**
```json ```json
{ {
"env": { "env": {

View File

@@ -268,7 +268,6 @@ The following plugins are no longer maintained by their developers.
[calyhre]: https://github.com/calyhre [calyhre]: https://github.com/calyhre
[cameron-martin]: https://github.com/cameron-martin [cameron-martin]: https://github.com/cameron-martin
[candlewaster]: https://notabug.org/candlewaster [candlewaster]: https://notabug.org/candlewaster
[cedricziel]: https://github.com/cedricziel
[cef]: https://github.com/cef [cef]: https://github.com/cef
[cheif]: https://github.com/cheif [cheif]: https://github.com/cheif
[cjblomqvist]: https://github.com/cjblomqvist [cjblomqvist]: https://github.com/cjblomqvist

View File

@@ -207,7 +207,6 @@ See the [buildpack management documentation](/docs/deployment/builders/buildpack
See the [buildpack management documentation](/docs/deployment/builders/buildpack-management.md#using-a-specific-buildpack-version) for more information on how to using a specific buildpack version See the [buildpack management documentation](/docs/deployment/builders/buildpack-management.md#using-a-specific-buildpack-version) for more information on how to using a specific buildpack version
### Displaying buildpack reports for an app ### Displaying buildpack reports for an app
See the [buildpack management documentation](/docs/deployment/builders/buildpack-management.md#displaying-buildpack-reports-for-an-app) for more information on how to display buildpack reports for an app. See the [buildpack management documentation](/docs/deployment/builders/buildpack-management.md#displaying-buildpack-reports-for-an-app) for more information on how to display buildpack reports for an app.

View File

@@ -13,14 +13,17 @@ Before using Railpacks, the following steps must be taken:
- Install the `railpack` cli: The `railpack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://railpack.com/installation). - Install the `railpack` cli: The `railpack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://railpack.com/installation).
- Create a `buildkit` builder: Railpack uses buildkit. - Create a `buildkit` builder: Railpack uses buildkit.
```shell
docker run --rm --privileged -d --name buildkit moby/buildkit ```shell
``` docker run --rm --privileged -d --name buildkit moby/buildkit
```
- Set the buildkit builder: Update the `/etc/default/dokku` file to set `BUILDKIT_HOST`: - Set the buildkit builder: Update the `/etc/default/dokku` file to set `BUILDKIT_HOST`:
```shell
touch /etc/default/dokku ```shell
echo "export BUILDKIT_HOST='docker-container://buildkit'" >> /etc/default/dokku touch /etc/default/dokku
``` echo "export BUILDKIT_HOST='docker-container://buildkit'" >> /etc/default/dokku
```
### Detection ### Detection

View File

@@ -957,7 +957,7 @@ dokku docker-options:add node-js-app deploy "--sysctl net.ipv4.ip_unprivileged_p
Passing a non-namespaced sysctl this way fails the deploy rather than silently dropping the value, since it provably cannot take effect within a pod. Note this differs from the `docker-local` scheduler, where such an option is passed straight through to `docker run`. Passing a non-namespaced sysctl this way fails the deploy rather than silently dropping the value, since it provably cannot take effect within a pod. Note this differs from the `docker-local` scheduler, where such an option is passed straight through to `docker run`.
Kubernetes further splits namespaced sysctls into a *safe* list that any pod may set, and everything else. A sysctl outside the safe list - `net.core.somaxconn`, for example - is rejected at pod admission unless the node's kubelet was started with a matching `allowed-unsafe-sysctls` value, which can be supplied at cluster initialization or when joining a node. Kubernetes further splits namespaced sysctls into a _safe_ list that any pod may set, and everything else. A sysctl outside the safe list - `net.core.somaxconn`, for example - is rejected at pod admission unless the node's kubelet was started with a matching `allowed-unsafe-sysctls` value, which can be supplied at cluster initialization or when joining a node.
```shell ```shell
dokku scheduler-k3s:initialize --kubelet-args allowed-unsafe-sysctls=net.core.somaxconn dokku scheduler-k3s:initialize --kubelet-args allowed-unsafe-sysctls=net.core.somaxconn

View File

@@ -97,6 +97,7 @@ free
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
``` ```
Note: it may be necessary to call swapoff, mkswap and swapon explicitly: `sudo /sbin/swapoff /var/swap.img`, etc. Note: it may be necessary to call swapoff, mkswap and swapon explicitly: `sudo /sbin/swapoff /var/swap.img`, etc.
[Reference](https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps) [Reference](https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps)

View File

@@ -230,7 +230,6 @@ This is normally a config problem with your app, rather than an issue with Dokku
One common cause is an application configured to enforce secure connections/HSTS, but SSL is not set up. In Ruby on Rails, if your `application.rb` or `config/environments/production.rb` include the line `configure.force_ssl = true`, try commenting that line out and redeploying. If this solves the issue temporarily, longer-term you should consider [configuring SSL](/docs/configuration/ssl.md). One common cause is an application configured to enforce secure connections/HSTS, but SSL is not set up. In Ruby on Rails, if your `application.rb` or `config/environments/production.rb` include the line `configure.force_ssl = true`, try commenting that line out and redeploying. If this solves the issue temporarily, longer-term you should consider [configuring SSL](/docs/configuration/ssl.md).
### I deployed a new application, but an existing application is being served when I visit it ### I deployed a new application, but an existing application is being served when I visit it
This problem has the same cause as the previous issue: your application is attempting to enforce SSL, but SSL is not configured. Disabling SSL enforcement should solve the problem. This problem has the same cause as the previous issue: your application is attempting to enforce SSL, but SSL is not configured. Disabling SSL enforcement should solve the problem.
@@ -241,7 +240,6 @@ The underlying cause is best understood with an example. Let's say you already h
1. `bananas.example.com` issues a redirect to `https://bananas.example.com`. 1. `bananas.example.com` issues a redirect to `https://bananas.example.com`.
1. Your browser sends a request to `https://bananas.example.com`. But you haven't configured SSL for `bananas.example.com` yet! So this request ends up routed to `https://apples.example.com`, which _does_ have an SSL config. 1. Your browser sends a request to `https://bananas.example.com`. But you haven't configured SSL for `bananas.example.com` yet! So this request ends up routed to `https://apples.example.com`, which _does_ have an SSL config.
### My application deploys properly, but won't load in browser "connection refused" ### My application deploys properly, but won't load in browser "connection refused"
This could be a result of a bad proxy configuration (`http:5000:5000` may be incorrect). Run `dokku ports:report node-js-app` to check if your app has the correct proxy configuration. It should show something like the following. This could be a result of a bad proxy configuration (`http:5000:5000` may be incorrect). Run `dokku ports:report node-js-app` to check if your app has the correct proxy configuration. It should show something like the following.

View File

@@ -241,22 +241,22 @@ By default, Traefik uses TLS-ALPN-01 challenge for obtaining certificates. To sw
1. Set the challenge mode to `dns`: 1. Set the challenge mode to `dns`:
```shell ```shell
dokku traefik:set --global challenge-mode dns dokku traefik:set --global challenge-mode dns
``` ```
2. Set your DNS provider: 2. Set your DNS provider:
```shell ```shell
dokku traefik:set --global dns-provider cloudflare dokku traefik:set --global dns-provider cloudflare
``` ```
3. Configure the required environment variables for your DNS provider. Each DNS provider requires specific environment variables. The variable names should be prefixed with `dns-provider-`: 3. Configure the required environment variables for your DNS provider. Each DNS provider requires specific environment variables. The variable names should be prefixed with `dns-provider-`:
```shell ```shell
dokku traefik:set --global dns-provider-cf_api_email user@example.com dokku traefik:set --global dns-provider-cf_api_email user@example.com
dokku traefik:set --global dns-provider-cf_api_key your-api-key dokku traefik:set --global dns-provider-cf_api_key your-api-key
``` ```
The `dns-provider-` prefix will be stripped and the variable name will be uppercased when passed to the Traefik container. For example, `dns-provider-cf_api_email` becomes `CF_API_EMAIL`. The `dns-provider-` prefix will be stripped and the variable name will be uppercased when passed to the Traefik container. For example, `dns-provider-cf_api_email` becomes `CF_API_EMAIL`.

View File

@@ -31,7 +31,6 @@ One off containers are removed at the end of process execution.
In addition, one-off containers also run for a max of 24 hours (86400 seconds) by default, after which they are reaped. This can be changed by setting the `--ttl-seconds` argument: In addition, one-off containers also run for a max of 24 hours (86400 seconds) by default, after which they are reaped. This can be changed by setting the `--ttl-seconds` argument:
```shell ```shell
# runs for 10 minutes # runs for 10 minutes
dokku run --ttl-seconds 600 node-js-app npm run mytask dokku run --ttl-seconds 600 node-js-app npm run mytask

View File

@@ -127,7 +127,7 @@ The `ps` plugin provides a number of settings that can be used to managed deploy
| Name | Description | Global Default | | Name | Description | Global Default |
|-----------------------|---------------------------------------------------|--------------------| |-----------------------|---------------------------------------------------|--------------------|
| `stop-timeout` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands *also* respect this value. If not specified, the Docker defaults for the [`docker stop` command](https://docs.docker.com/engine/reference/commandline/stop/) will be used. | `30` | | `stop-timeout` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the Docker defaults for the [`docker stop` command](https://docs.docker.com/engine/reference/commandline/stop/) will be used. | `30` |
All settings can be set via the `ps:set` command. Using `stop-timeout` as an example: All settings can be set via the `ps:set` command. Using `stop-timeout` as an example:
@@ -216,7 +216,7 @@ Sometimes it may be desirable to set a different path for a given app, e.g. when
dokku ps:set node-js-app procfile-path .dokku/Procfile dokku ps:set node-js-app procfile-path .dokku/Procfile
``` ```
The value is the path to the desired file *relative* to the base search directory, and will never be treated as absolute paths in any context. If that file does not exist within the repository, Dokku will continue the build process as if the repository has no `Procfile`. The value is the path to the desired file _relative_ to the base search directory, and will never be treated as absolute paths in any context. If that file does not exist within the repository, Dokku will continue the build process as if the repository has no `Procfile`.
The default value may be set by passing an empty value for the option: The default value may be set by passing an empty value for the option:

View File

@@ -40,7 +40,6 @@ A cron task takes the following properties:
- `schedule`: A [cron-compatible](https://en.wikipedia.org/wiki/Cron#Overview) scheduling definition upon which to run the command. Seconds are generally not supported. - `schedule`: A [cron-compatible](https://en.wikipedia.org/wiki/Cron#Overview) scheduling definition upon which to run the command. Seconds are generally not supported.
- `concurrency_policy`: A string (default: `allow`), that controls whether the cron task can be run concurrently with another invocation of itself. Valid options are `allow` (allow concurrency), `forbid` (exit the new cron task if there is an existing one), `replace` (delete any existing cron task and start the new one). - `concurrency_policy`: A string (default: `allow`), that controls whether the cron task can be run concurrently with another invocation of itself. Valid options are `allow` (allow concurrency), `forbid` (exit the new cron task if there is an existing one), `replace` (delete any existing cron task and start the new one).
Zero or more cron tasks can be specified per app. Cron tasks are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase. Zero or more cron tasks can be specified per app. Cron tasks are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
Cron tasks can run for a maximum of 24 hours, after which they are reaped from the system. The `docker-local` scheduler reaps expired tasks via the `dokku ps:retire` pass that runs every 5 minutes, so a task may overrun its deadline by up to 5 minutes. The `k3s` scheduler enforces the deadline directly through the job's `activeDeadlineSeconds`. Cron tasks can run for a maximum of 24 hours, after which they are reaped from the system. The `docker-local` scheduler reaps expired tasks via the `dokku ps:retire` pass that runs every 5 minutes, so a task may overrun its deadline by up to 5 minutes. The `k3s` scheduler enforces the deadline directly through the job's `activeDeadlineSeconds`.

View File

@@ -15,10 +15,10 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
var flags map[string]common.ReportFunc var flags map[string]common.ReportFunc
if appName == "--global" { if appName == "--global" {
flags = map[string]common.ReportFunc{ flags = map[string]common.ReportFunc{
"--builder-global-selected": reportGlobalSelected, "--builder-global-selected": reportGlobalSelected,
"--builder-global-build-dir": reportGlobalBuildDir, "--builder-global-build-dir": reportGlobalBuildDir,
"--builder-global-skip-cleanup": reportGlobalSkipCleanup, "--builder-global-skip-cleanup": reportGlobalSkipCleanup,
"--builder-computed-skip-cleanup": reportComputedSkipCleanup, "--builder-computed-skip-cleanup": reportComputedSkipCleanup,
} }
} else { } else {
flags = map[string]common.ReportFunc{ flags = map[string]common.ReportFunc{

View File

@@ -36,7 +36,7 @@ func main() {
args.Parse(os.Args[2:]) args.Parse(os.Args[2:])
appName := args.Arg(0) appName := args.Arg(0)
if *branch == "" { if *branch == "" {
*branch = common.PropertyGet("git", appName, "deploy-branch") *branch = common.PropertyGet("git", appName, "deploy-branch")
} }
err = buildpacks.CommandDetect(appName, *branch) err = buildpacks.CommandDetect(appName, *branch)
case "list": case "list":

View File

@@ -39,9 +39,9 @@ func CommandDetect(appName string, branch string) (err error) {
workDir := common.AppRoot(appName) workDir := common.AppRoot(appName)
checkedOutDir, err := checkoutBareGitRepo(workDir, branch) checkedOutDir, err := checkoutBareGitRepo(workDir, branch)
if err != nil { if err != nil {
return err return err
} }
defer func() { defer func() {
if err := os.RemoveAll(checkedOutDir); err != nil { if err := os.RemoveAll(checkedOutDir); err != nil {
common.LogWarn(fmt.Sprintf("Failed to remove temporary directory %s: %v", checkedOutDir, err)) common.LogWarn(fmt.Sprintf("Failed to remove temporary directory %s: %v", checkedOutDir, err))

View File

@@ -208,8 +208,8 @@ func TestReportSingleAppJSONNonPluginPrefixKey(t *testing.T) {
// Keys that don't start with --<reportType>- should pass through with // Keys that don't start with --<reportType>- should pass through with
// only the leading "--" stripped, regardless of TrimPrefix. // only the leading "--" stripped, regardless of TrimPrefix.
infoFlags := map[string]string{ infoFlags := map[string]string{
"--build-id": "abc123", "--build-id": "abc123",
"--builds-retention": "5", "--builds-retention": "5",
} }
out := captureStdout(t, func() { out := captureStdout(t, func() {

View File

@@ -154,9 +154,12 @@ func joinShellTokens(tokens []string) string {
// quoteShellArg returns s wrapped in single quotes when it contains characters // quoteShellArg returns s wrapped in single quotes when it contains characters
// the shell would otherwise interpret (whitespace, quotes, expansion sigils, // the shell would otherwise interpret (whitespace, quotes, expansion sigils,
// globs, redirections, etc.). Embedded single quotes are escaped with the // globs, redirections, etc.). Embedded single quotes are escaped with the
// standard `'\''` close-escape-open sequence. Tokens free of such characters // standard close-escape-open sequence:
// are returned verbatim so the stored representation stays human-readable for //
// the common case. // '\''
//
// Tokens free of such characters are returned verbatim so the stored
// representation stays human-readable for the common case.
func quoteShellArg(s string) string { func quoteShellArg(s string) string {
if s == "" { if s == "" {
return "''" return "''"

View File

@@ -22,43 +22,43 @@ func templatePath(t *testing.T) string {
func defaultVars() map[string]interface{} { func defaultVars() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"APP": "app", "APP": "app",
"DOKKU_ROOT": "/home/dokku", "DOKKU_ROOT": "/home/dokku",
"DOKKU_LIB_ROOT": "/var/lib/dokku", "DOKKU_LIB_ROOT": "/var/lib/dokku",
"NOSSL_SERVER_NAME": "app.example.com", "NOSSL_SERVER_NAME": "app.example.com",
"SSL_SERVER_NAME": "", "SSL_SERVER_NAME": "",
"SSL_INUSE": "", "SSL_INUSE": "",
"APP_SSL_PATH": "/home/dokku/app/tls", "APP_SSL_PATH": "/home/dokku/app/tls",
"DOKKU_APP_WEB_LISTENERS": "127.0.0.1:5000", "DOKKU_APP_WEB_LISTENERS": "127.0.0.1:5000",
"PROXY_PORT_MAP": "http:80:5000", "PROXY_PORT_MAP": "http:80:5000",
"PROXY_UPSTREAM_PORTS": "5000", "PROXY_UPSTREAM_PORTS": "5000",
"PROXY_PORT": "80", "PROXY_PORT": "80",
"PROXY_SSL_PORT": "443", "PROXY_SSL_PORT": "443",
"PROXY_KEEPALIVE": "", "PROXY_KEEPALIVE": "",
"NGINX_BIND_ADDRESS_IP4": "", "NGINX_BIND_ADDRESS_IP4": "",
"NGINX_BIND_ADDRESS_IP6": "::", "NGINX_BIND_ADDRESS_IP6": "::",
"NGINX_ACCESS_LOG_PATH": "/var/log/nginx/app-access.log", "NGINX_ACCESS_LOG_PATH": "/var/log/nginx/app-access.log",
"NGINX_ACCESS_LOG_FORMAT": "", "NGINX_ACCESS_LOG_FORMAT": "",
"NGINX_ERROR_LOG_PATH": "/var/log/nginx/app-error.log", "NGINX_ERROR_LOG_PATH": "/var/log/nginx/app-error.log",
"NGINX_UNDERSCORE_IN_HEADERS": "off", "NGINX_UNDERSCORE_IN_HEADERS": "off",
"CLIENT_BODY_TIMEOUT": "60s", "CLIENT_BODY_TIMEOUT": "60s",
"CLIENT_HEADER_TIMEOUT": "60s", "CLIENT_HEADER_TIMEOUT": "60s",
"CLIENT_MAX_BODY_SIZE": "1m", "CLIENT_MAX_BODY_SIZE": "1m",
"KEEPALIVE_TIMEOUT": "75s", "KEEPALIVE_TIMEOUT": "75s",
"LINGERING_TIMEOUT": "5s", "LINGERING_TIMEOUT": "5s",
"SEND_TIMEOUT": "60s", "SEND_TIMEOUT": "60s",
"PROXY_CONNECT_TIMEOUT": "60s", "PROXY_CONNECT_TIMEOUT": "60s",
"PROXY_READ_TIMEOUT": "60s", "PROXY_READ_TIMEOUT": "60s",
"PROXY_SEND_TIMEOUT": "60s", "PROXY_SEND_TIMEOUT": "60s",
"PROXY_BUFFER_SIZE": "4k", "PROXY_BUFFER_SIZE": "4k",
"PROXY_BUFFERING": "on", "PROXY_BUFFERING": "on",
"PROXY_BUFFERS": "8 4k", "PROXY_BUFFERS": "8 4k",
"PROXY_BUSY_BUFFERS_SIZE": "8k", "PROXY_BUSY_BUFFERS_SIZE": "8k",
"PROXY_X_FORWARDED_FOR": "$remote_addr", "PROXY_X_FORWARDED_FOR": "$remote_addr",
"PROXY_X_FORWARDED_PORT": "$server_port", "PROXY_X_FORWARDED_PORT": "$server_port",
"PROXY_X_FORWARDED_PROTO": "$scheme", "PROXY_X_FORWARDED_PROTO": "$scheme",
"PROXY_X_FORWARDED_SSL": "", "PROXY_X_FORWARDED_SSL": "",
"HTTP2_DIRECTIVE_SUPPORTED": "true", "HTTP2_DIRECTIVE_SUPPORTED": "true",
} }
} }
@@ -266,8 +266,8 @@ func TestTemplate_XForwardedSSL(t *testing.T) {
func TestTemplate_NginxConfDIncludeAlways(t *testing.T) { func TestTemplate_NginxConfDIncludeAlways(t *testing.T) {
cases := []struct { cases := []struct {
name string name string
mutate func(map[string]interface{}) mutate func(map[string]interface{})
}{ }{
{"http", func(v map[string]interface{}) {}}, {"http", func(v map[string]interface{}) {}},
{"http_redirect", func(v map[string]interface{}) { {"http_redirect", func(v map[string]interface{}) {

View File

@@ -4,7 +4,6 @@ import (
"fmt" "fmt"
) )
// PortMap is a struct that contains a scheme:host-port:container-port mapping // PortMap is a struct that contains a scheme:host-port:container-port mapping
type PortMap struct { type PortMap struct {
// ContainerPort is the port on the container // ContainerPort is the port on the container

View File

@@ -30,27 +30,27 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
} }
} else { } else {
flags = map[string]common.ReportFunc{ flags = map[string]common.ReportFunc{
"--deployed": reportDeployed, "--deployed": reportDeployed,
"--processes": reportProcesses, "--processes": reportProcesses,
"--ps-can-scale": reportCanScale, "--ps-can-scale": reportCanScale,
"--ps-computed-dockerfile-start-cmd": reportComputedDockerfileStartCmd, "--ps-computed-dockerfile-start-cmd": reportComputedDockerfileStartCmd,
"--ps-computed-procfile-path": reportComputedProcfilePath, "--ps-computed-procfile-path": reportComputedProcfilePath,
"--ps-computed-restart-policy": reportComputedRestartPolicy, "--ps-computed-restart-policy": reportComputedRestartPolicy,
"--ps-computed-skip-deploy": reportComputedSkipDeploy, "--ps-computed-skip-deploy": reportComputedSkipDeploy,
"--ps-computed-start-cmd": reportComputedStartCmd, "--ps-computed-start-cmd": reportComputedStartCmd,
"--ps-computed-stop-timeout-seconds": reportComputedStopTimeoutSeconds, "--ps-computed-stop-timeout-seconds": reportComputedStopTimeoutSeconds,
"--ps-dockerfile-start-cmd": reportDockerfileStartCmd, "--ps-dockerfile-start-cmd": reportDockerfileStartCmd,
"--ps-global-procfile-path": reportGlobalProcfilePath, "--ps-global-procfile-path": reportGlobalProcfilePath,
"--ps-global-restart-policy": reportGlobalRestartPolicy, "--ps-global-restart-policy": reportGlobalRestartPolicy,
"--ps-global-skip-deploy": reportGlobalSkipDeploy, "--ps-global-skip-deploy": reportGlobalSkipDeploy,
"--ps-global-stop-timeout-seconds": reportGlobalStopTimeoutSeconds, "--ps-global-stop-timeout-seconds": reportGlobalStopTimeoutSeconds,
"--ps-procfile-path": reportProcfilePath, "--ps-procfile-path": reportProcfilePath,
"--ps-restart-policy": reportRestartPolicy, "--ps-restart-policy": reportRestartPolicy,
"--ps-skip-deploy": reportSkipDeploy, "--ps-skip-deploy": reportSkipDeploy,
"--ps-start-cmd": reportStartCmd, "--ps-start-cmd": reportStartCmd,
"--ps-stop-timeout-seconds": reportStopTimeoutSeconds, "--ps-stop-timeout-seconds": reportStopTimeoutSeconds,
"--restore": reportRestore, "--restore": reportRestore,
"--running": reportRunningState, "--running": reportRunningState,
} }
extraFlags := addStatusFlags(appName, infoFlag) extraFlags := addStatusFlags(appName, infoFlag)

View File

@@ -41,11 +41,11 @@ func TestGetLowestNodeVersion(t *testing.T) {
} }
cases := []struct { cases := []struct {
name string name string
nodes []*corev1.Node nodes []*corev1.Node
selector string selector string
want string want string
wantErr string wantErr string
}{ }{
{ {
name: "single control-plane node returns its kubelet version", name: "single control-plane node returns its kubelet version",

View File

@@ -88,7 +88,7 @@ func TestMigrateChartPropertiesToMapFormatPreservesExistingNonOverlappingKeys(t
setupChartMigrationTest(t) setupChartMigrationTest(t)
Expect(common.PropertyMapWrite("scheduler-k3s", "--global", "chart-overrides.cert-manager", map[string]string{ Expect(common.PropertyMapWrite("scheduler-k3s", "--global", "chart-overrides.cert-manager", map[string]string{
"installCRDs": "true", "installCRDs": "true",
"service.annotations.prometheus.io/scrape": "true", "service.annotations.prometheus.io/scrape": "true",
})).To(Succeed()) })).To(Succeed())
Expect(common.PropertyWrite("scheduler-k3s", "--global", "chart.cert-manager.installCRDs", "false")).To(Succeed()) Expect(common.PropertyWrite("scheduler-k3s", "--global", "chart.cert-manager.installCRDs", "false")).To(Succeed())
@@ -99,9 +99,9 @@ func TestMigrateChartPropertiesToMapFormatPreservesExistingNonOverlappingKeys(t
got, err := common.PropertyMapGet("scheduler-k3s", "--global", "chart-overrides.cert-manager") got, err := common.PropertyMapGet("scheduler-k3s", "--global", "chart-overrides.cert-manager")
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(got).To(Equal(map[string]string{ Expect(got).To(Equal(map[string]string{
"installCRDs": "false", "installCRDs": "false",
"service.annotations.prometheus.io/scrape": "true", "service.annotations.prometheus.io/scrape": "true",
"version": "1.13.3", "version": "1.13.3",
})) }))
} }