Skip to content

Commit 8404c66

Browse files
authored
Merge branch 'main' into resourcequotabehavior
2 parents 0955256 + fea59e8 commit 8404c66

File tree

3,351 files changed

+279264
-214184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,351 files changed

+279264
-214184
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- ℹ️
1+
<!--
22
33
Hello!
44
@@ -9,7 +9,7 @@
99
PLEASE title the FIRST commit appropriately, so that if you squash all
1010
your commits into one, the combined commit message makes sense.
1111
For overall help on editing and submitting pull requests, visit:
12-
https://kubernetes.io/docs/contribute/suggest-improvements/
12+
https://kubernetes.io/docs/contribute/suggesting-improvements/
1313
1414
Use the default base branch, “main”, if you're documenting existing
1515
features in the English localization.

.github/workflows/netlify-periodic-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
schedule: # Build twice daily: shortly after midnight and noon (UTC)
55
# Offset is to be nice to the build service
66
- cron: '4 0,12 * * *'
7+
permissions: {} # none
78
jobs:
89
build:
910
runs-on: ubuntu-latest

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ kubernetes.github.io.iml
2727
nohup.out
2828

2929
# Hugo output
30-
public/
31-
resources/
30+
/public
31+
/resources/
32+
.hugo_build.lock
3233

3334
# Netlify Functions build output
3435
package-lock.json
35-
functions/
36-
node_modules/
36+
/functions/
37+
/node_modules/
3738

3839
# Generated files when building with make container-build
3940
.config/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ Note that code issues should be filed against the main kubernetes repository, wh
3434

3535
### Submitting Documentation Pull Requests
3636

37-
If you're fixing an issue in the existing documentation, you should submit a PR against the main branch. Follow [these instructions to create a documentation pull request against the kubernetes.io repository](http://kubernetes.io/docs/home/contribute/create-pull-request/).
37+
If you're fixing an issue in the existing documentation, you should submit a PR against the main branch. Follow [these instructions to create a documentation pull request against the kubernetes.io repository](https://kubernetes.io/docs/contribute/new-content/open-a-pr/).
3838

3939
For more information, see [contributing to Kubernetes docs](https://kubernetes.io/docs/contribute/).

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# change is that the Hugo version is now an overridable argument rather than a fixed
55
# environment variable.
66

7-
FROM golang:1.18-alpine
7+
FROM docker.io/library/golang:1.20-alpine
88

99
LABEL maintainer="Luc Perkins <[email protected]>"
1010

@@ -24,7 +24,7 @@ RUN mkdir $HOME/src && \
2424
cd "hugo-${HUGO_VERSION}" && \
2525
go install --tags extended
2626

27-
FROM golang:1.18-alpine
27+
FROM docker.io/library/golang:1.20-alpine
2828

2929
RUN apk add --no-cache \
3030
runuser \

Makefile

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ CONTAINER_ENGINE ?= docker
99
IMAGE_REGISTRY ?= gcr.io/k8s-staging-sig-docs
1010
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile | cut -c 1-12)
1111
CONTAINER_IMAGE = $(IMAGE_REGISTRY)/k8s-website-hugo:v$(HUGO_VERSION)-$(IMAGE_VERSION)
12-
CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src"
12+
# Mount read-only to allow use with tools like Podman in SELinux mode
13+
# Container targets don't need to write into /src
14+
CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src:ro,Z"
1315

1416
CCRED=\033[0;31m
1517
CCEND=\033[0m
1618

19+
# Docker buildx related settings for multi-arch images
20+
DOCKER_BUILDX ?= docker buildx
21+
1722
.PHONY: all build build-preview help serve
1823

1924
help: ## Show this help.
@@ -29,13 +34,13 @@ module-init: ## Initialize required submodules.
2934
all: build ## Build site with production settings and put deliverables in ./public
3035

3136
build: module-check ## Build site with non-production settings and put deliverables in ./public
32-
hugo --minify --environment development
37+
hugo --cleanDestinationDir --minify --environment development
3338

3439
build-preview: module-check ## Build site with drafts and future posts enabled
35-
hugo --buildDrafts --buildFuture --environment preview
40+
hugo --cleanDestinationDir --buildDrafts --buildFuture --environment preview
3641

3742
deploy-preview: ## Deploy preview site via netlify
38-
hugo --enableGitInfo --buildFuture --environment preview -b $(DEPLOY_PRIME_URL)
43+
GOMAXPROCS=1 hugo --cleanDestinationDir --enableGitInfo --buildFuture --environment preview -b $(DEPLOY_PRIME_URL)
3944

4045
functions-build:
4146
$(NETLIFY_FUNC) build functions-src
@@ -44,11 +49,11 @@ check-headers-file:
4449
scripts/check-headers-file.sh
4550

4651
production-build: module-check ## Build the production site and ensure that noindex headers aren't added
47-
hugo --minify --environment production
52+
GOMAXPROCS=1 hugo --cleanDestinationDir --minify --environment production
4853
HUGO_ENV=production $(MAKE) check-headers-file
4954

5055
non-production-build: module-check ## Build the non-production site, which adds noindex headers to prevent indexing
51-
hugo --enableGitInfo --environment nonprod
56+
GOMAXPROCS=1 hugo --cleanDestinationDir --enableGitInfo --environment nonprod
5257

5358
serve: module-check ## Boot the development server.
5459
hugo server --buildFuture --environment development
@@ -74,6 +79,23 @@ container-image: ## Build a container image for the preview of the website
7479
container-push: container-image ## Push container image for the preview of the website
7580
$(CONTAINER_ENGINE) push $(CONTAINER_IMAGE)
7681

82+
PLATFORMS ?= linux/arm64,linux/amd64
83+
docker-push: ## Build a multi-architecture image and push that into the registry
84+
docker run --rm --privileged tonistiigi/binfmt:qemu-v6.2.0-26@sha256:5bf63a53ad6222538112b5ced0f1afb8509132773ea6dd3991a197464962854e --install all
85+
docker version
86+
$(DOCKER_BUILDX) version
87+
$(DOCKER_BUILDX) inspect image-builder > /dev/null 2>&1 || $(DOCKER_BUILDX) create --name image-builder --use
88+
# copy existing Dockerfile and insert --platform=${TARGETPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
89+
sed -e 's/\(^FROM\)/FROM --platform=\$$\{TARGETPLATFORM\}/' Dockerfile > Dockerfile.cross
90+
$(DOCKER_BUILDX) build \
91+
--push \
92+
--platform=$(PLATFORMS) \
93+
--build-arg HUGO_VERSION=$(HUGO_VERSION) \
94+
--tag $(CONTAINER_IMAGE) \
95+
-f Dockerfile.cross .
96+
$(DOCKER_BUILDX) stop image-builder
97+
rm Dockerfile.cross
98+
7799
container-build: module-check
78100
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify --environment development"
79101

OWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ approvers:
77
- sig-docs-en-owners # Defined in OWNERS_ALIASES
88

99
emeritus_approvers:
10+
# - celestehorgan, commented out to disable PR assignments
1011
# - chenopis, commented out to disable PR assignments
1112
# - irvifa, commented out to disable PR assignments
1213
# - jaredbhatti, commented out to disable PR assignments
14+
# - jimangel, commented out to disable PR assignments
1315
# - kbarnard10, commented out to disable PR assignments
1416
# - steveperry-53, commented out to disable PR assignments
15-
- stewart-yu
17+
- stewart-yu
1618
# - zacharysarah, commented out to disable PR assignments
1719

1820
labels:

0 commit comments

Comments
 (0)