Skip to content

Commit

Permalink
Merge pull request #451 from bottlerocket-os/main
Browse files Browse the repository at this point in the history
Move to Prod: FAQ item, ECS settings fix, new hugo version
  • Loading branch information
stockholmux authored Mar 11, 2024
2 parents f1cec16 + 0235480 commit 38dee39
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
env:
# based on known good environment
HUGO_VERSION: 0.104.2
HUGO_VERSION: 0.123.8
steps:
- name: Install Hugo CLI
run: |
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ preview:
docker run --rm -it \
-v "${PWD}":/src \
-p 1313:1313 \
klakegg/hugo:0.101.0-ext-alpine \
server -w --bind=0.0.0.0
hugomods/hugo:exts-0.123.8 \
hugo server -w --bind=0.0.0.0

preview_finch:
finch run --rm -it \
-v "${PWD}":/src \
-p 1313:1313 \
hugomods/hugo:exts-0.123.8 \
hugo server -w --bind=0.0.0.0


mdlint:
docker run --rm \
Expand Down
6 changes: 4 additions & 2 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
.btn-lg, .btn-group-lg > .btn {
border-radius: 6px;
}

.d-lg-block.d-none {
display: none !important;
}

._td-navbar {
background-color: $dark-teal;
Expand All @@ -25,7 +27,7 @@
}
.td-sidebar-nav a:hover { color: $dark-teal; }
}
.navbar-brand .font-weight-bold { font-weight: 600 !important; }
.navbar-brand .font-weight-bold { font-weight: 500 !important; }
.td-home, .td-main, .td-section, .td-page {
.td-navbar {
background: linear-gradient($dark 0%, $dark-blue 10%, $dark-blue 100%);
Expand Down
20 changes: 14 additions & 6 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,21 @@ ul_show = 1
[module.hugoVersion]
extended = true
min = "0.73.0"
[[module.imports]]
path = "github.com/google/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = false

[[module.imports]]
path = "github.com/google/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = false
[[module.mounts]]
source= "/third-party/google/docsy/layouts/_default"
target= "layouts/_default"
includeFiles= "baseof.html"
[[module.mounts]]
source= "/third-party/google/docsy/layouts/partials"
target= "layouts/partials"
includeFiles= ["navbar.html", "footer.html"]

[languages]
[languages.all]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
question = "Why is my allocatable memory lower than expected?"
group = "Kubernetes"
+++

You may observe that allocatable memory is lower than on general-purpose Linux distributions. There are 2 possible reasons for this:

* As the [control container](https://github.com/bottlerocket-os/bottlerocket-control-container) runs in a second instance of containerd, a small amount of memory is reserved for this process. Typically this is just a few MiB.

* If you increase the [maxPods setting on the kubelet](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration), you may see a linear decrease in allocatable memory proportional to the max number of pods. The formula for this reservation is detailed in the [Settings Reference](https://bottlerocket.dev/en/os/1.19.x/api/settings/kubernetes/#kube-reserved). This may be different to the calculation used by other Linux distributions. This setting can be overridden by providing a static value to the settings [user data](https://github.com/bottlerocket-os/bottlerocket#using-user-data).

3 changes: 2 additions & 1 deletion data/settings/1.14.x/ecs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ description = """
Time to wait for the task's containers to stop on their own before they are forcefully stopped.
Valid time units include `s`, `m`, and `h` (e.g. `1h`, `1m1s`).
"""
default = "`30s`"
see = [
["`ECS_DISABLE_PRIVILEGED` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
["`ECS_CONTAINER_STOP_TIMEOUT` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
]

[[docs.ref.enable-spot-instance-draining]]
Expand Down
3 changes: 2 additions & 1 deletion data/settings/1.15.x/ecs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ description = """
Time to wait for the task's containers to stop on their own before they are forcefully stopped.
Valid time units include `s`, `m`, and `h` (e.g. `1h`, `1m1s`).
"""
default = "`30s`"
see = [
["`ECS_DISABLE_PRIVILEGED` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
["`ECS_CONTAINER_STOP_TIMEOUT` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
]

[[docs.ref.enable-spot-instance-draining]]
Expand Down
3 changes: 2 additions & 1 deletion data/settings/1.16.x/ecs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ description = """
Time to wait for the task's containers to stop on their own before they are forcefully stopped.
Valid time units include `s`, `m`, and `h` (e.g. `1h`, `1m1s`).
"""
default = "`30s`"
see = [
["`ECS_DISABLE_PRIVILEGED` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
["`ECS_CONTAINER_STOP_TIMEOUT` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
]

[[docs.ref.enable-spot-instance-draining]]
Expand Down
3 changes: 2 additions & 1 deletion data/settings/1.17.x/ecs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ description = """
Time to wait for the task's containers to stop on their own before they are forcefully stopped.
Valid time units include `s`, `m`, and `h` (e.g. `1h`, `1m1s`).
"""
default = "`30s`"
see = [
["`ECS_DISABLE_PRIVILEGED` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
["`ECS_CONTAINER_STOP_TIMEOUT` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
]

[[docs.ref.enable-spot-instance-draining]]
Expand Down
3 changes: 2 additions & 1 deletion data/settings/1.18.x/ecs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ description = """
Time to wait for the task's containers to stop on their own before they are forcefully stopped.
Valid time units include `s`, `m`, and `h` (e.g. `1h`, `1m1s`).
"""
default = "`30s`"
see = [
["`ECS_DISABLE_PRIVILEGED` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
["`ECS_CONTAINER_STOP_TIMEOUT` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
]

[[docs.ref.enable-spot-instance-draining]]
Expand Down
3 changes: 2 additions & 1 deletion data/settings/1.19.x/ecs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ description = """
Time to wait for the task's containers to stop on their own before they are forcefully stopped.
Valid time units include `s`, `m`, and `h` (e.g. `1h`, `1m1s`).
"""
default = "`30s`"
see = [
["`ECS_DISABLE_PRIVILEGED` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
["`ECS_CONTAINER_STOP_TIMEOUT` in the [ECS Agent Environment Variables](https://github.com/aws/amazon-ecs-agent/blob/master/README.md#environment-variables)"]
]

[[docs.ref.enable-spot-instance-draining]]
Expand Down
1 change: 0 additions & 1 deletion layouts/_default/baseof.html

This file was deleted.

1 change: 0 additions & 1 deletion layouts/partials/footer.html

This file was deleted.

6 changes: 3 additions & 3 deletions layouts/partials/hooks/head-end.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- /* get the directory of the file being rendered */ -}}
{{- $file := print .Page.File.Dir -}}
{{- $file := .Page.Path -}}
{{- /* break it apart */ -}}
{{- $parts := split $file "/" -}}
{{- /* the first part is the section (aka product 'os', etc.) */ -}}
{{- $sect := index $parts 0 -}}
{{- $sect := index $parts 1 -}}
{{- /* is it in the site data? If so we might need to show a notice and do a rel cannonical */ -}}
{{- if in $.Site.Data.versioned.sections $sect }}
{{- /* get the current version parts */ -}}
Expand All @@ -13,7 +13,7 @@
{{- /* but it into the scratch for later page elemnents */ -}}
{{- .Page.Scratch.Set (print $sect "-latest") $latest -}}
{{- /* now get the page version from the URL */ -}}
{{- $pageVersion := index $parts 1 }}
{{- $pageVersion := index $parts 2 -}}
{{- /* if the page version is not equal to the latest, we've got out of date stuff */ -}}
{{- if (ne $latest $pageVersion) -}}
{{- /* create the corresponding filename for the newer version (e.g. /en/foo/1.13.x/ -> /en/foo/1.14.x/) */ -}}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/navbar.html

This file was deleted.

2 changes: 1 addition & 1 deletion layouts/shortcodes/all-settings.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $current_version := index (split .Page.File "/") 1 -}}
{{- $current_version := index (split .Page.File.Dir "/") 1 -}}
{{- $all_versions := slice -}}
{{- $current_version_index := -1 -}}
{{- $new_badge := .Get "new_badge" }}
Expand Down

0 comments on commit 38dee39

Please sign in to comment.