Skip to content

Commit 3692941

Browse files
author
Tim Bannister
committed
Merge branch main into dev-1.22-hi.1
2 parents f636e47 + f53d403 commit 3692941

File tree

3,674 files changed

+511959
-211796
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,674 files changed

+511959
-211796
lines changed

.github/ISSUE_TEMPLATE/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ STOP -- PLEASE READ!
1111
1212
GitHub is not the right place for support requests.
1313
14-
If you're looking for help, check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes)
14+
If you're looking for help, check [Server Fault](https://serverfault.com/questions/tagged/kubernetes).
1515
1616
You can also post your question on the [Kubernetes Slack](http://slack.k8s.io/) or the [Discuss Kubernetes](https://discuss.kubernetes.io/) forum.
1717

.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/start/#improve-existing-content
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/OWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# When modifying this file, consider the security implications of
44
# allowing listed reviewers / approvals to modify or remove any
55
# configured GitHub Actions.
6+
#
7+
options:
8+
no_parent_owners: true
69

710
reviewers:
811
- sig-docs-leads

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ nohup.out
2929
# Hugo output
3030
public/
3131
resources/
32+
.hugo_build.lock
3233

3334
# Netlify Functions build output
3435
package-lock.json

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[submodule "themes/docsy"]
22
path = themes/docsy
33
url = https://github.com/google/docsy.git
4+
branch = v0.2.0
45
[submodule "api-ref-generator"]
56
path = api-ref-generator
67
url = https://github.com/kubernetes-sigs/reference-docs

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ These are just guidelines, not rules. Use your best judgment, and feel free to p
99

1010
### Code of Conduct
1111

12-
Kubernetes follows the [Cloud Native Computing Foundation (CNCF) Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the
12+
Kubernetes follows the [Cloud Native Computing Foundation (CNCF) Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the
1313
[Kubernetes Code of Conduct Committee](https://github.com/kubernetes/community/tree/master/committee-code-of-conduct) <[email protected]>.
1414

1515
### Documentation and Site Decisions
@@ -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 master 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](http://kubernetes.io/docs/home/contribute/create-pull-request/).
3838

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

Dockerfile

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

7-
FROM golang:1.15-alpine
7+
FROM golang:1.18-alpine
88

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

1111
RUN apk add --no-cache \
1212
curl \
13+
gcc \
14+
g++ \
15+
musl-dev \
16+
build-base \
17+
libc6-compat
18+
19+
ARG HUGO_VERSION
20+
21+
RUN mkdir $HOME/src && \
22+
cd $HOME/src && \
23+
curl -L https://github.com/gohugoio/hugo/archive/refs/tags/v${HUGO_VERSION}.tar.gz | tar -xz && \
24+
cd "hugo-${HUGO_VERSION}" && \
25+
go install --tags extended
26+
27+
FROM golang:1.18-alpine
28+
29+
RUN apk add --no-cache \
30+
runuser \
1331
git \
1432
openssh-client \
1533
rsync \
16-
build-base \
17-
libc6-compat \
1834
npm && \
1935
npm install -D autoprefixer postcss-cli
2036

21-
ARG HUGO_VERSION
22-
23-
RUN mkdir -p /usr/local/src && \
24-
cd /usr/local/src && \
25-
curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xz && \
26-
mv hugo /usr/local/bin/hugo && \
37+
RUN mkdir -p /var/hugo && \
2738
addgroup -Sg 1000 hugo && \
28-
adduser -Sg hugo -u 1000 -h /src hugo
39+
adduser -Sg hugo -u 1000 -h /var/hugo hugo && \
40+
chown -R hugo: /var/hugo && \
41+
runuser -u hugo -- git config --global --add safe.directory /src
42+
43+
COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
2944

3045
WORKDIR /src
3146

LICENSE

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exhaustive, and do not form part of our licenses.
3333
material not subject to the license. This includes other CC-
3434
licensed material, or material used under an exception or
3535
limitation to copyright. More considerations for licensors:
36-
wiki.creativecommons.org/Considerations_for_licensors
36+
wiki.creativecommons.org/Considerations_for_licensors
3737

3838
Considerations for the public: By using one of our public
3939
licenses, a licensor grants the public permission to use the
@@ -48,9 +48,9 @@ exhaustive, and do not form part of our licenses.
4848
rights in the material. A licensor may make special requests,
4949
such as asking that all changes be marked or described.
5050
Although not required by our licenses, you are encouraged to
51-
respect those requests where reasonable. More_considerations
52-
for the public:
53-
wiki.creativecommons.org/Considerations_for_licensees
51+
respect those requests where reasonable. More considerations
52+
for the public:
53+
wiki.creativecommons.org/Considerations_for_licensees
5454

5555
=======================================================================
5656

@@ -378,7 +378,7 @@ Section 8 -- Interpretation.
378378
Creative Commons is not a party to its public
379379
licenses. Notwithstanding, Creative Commons may elect to apply one of
380380
its public licenses to material it publishes and in those instances
381-
will be considered the "Licensor." The text of the Creative Commons
381+
will be considered the Licensor. The text of the Creative Commons
382382
public licenses is dedicated to the public domain under the CC0 Public
383383
Domain Dedication. Except for the limited purpose of indicating that
384384
material is shared under a Creative Commons public license or as
@@ -393,3 +393,4 @@ the avoidance of doubt, this paragraph does not form part of the
393393
public licenses.
394394

395395
Creative Commons may be contacted at creativecommons.org.
396+

Makefile

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ 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+
CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src"
1313

1414
CCRED=\033[0;31m
1515
CCEND=\033[0m
@@ -19,37 +19,39 @@ CCEND=\033[0m
1919
help: ## Show this help.
2020
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
2121

22-
module-check:
22+
module-check: ## Check if all of the required submodules are correctly initialized.
2323
@git submodule status --recursive | awk '/^[+-]/ {err = 1; printf "\033[31mWARNING\033[0m Submodule not initialized: \033[34m%s\033[0m\n",$$2} END { if (err != 0) print "You need to run \033[32mmake module-init\033[0m to initialize missing modules first"; exit err }' 1>&2
2424

25-
module-init:
25+
module-init: ## Initialize required submodules.
2626
@echo "Initializing submodules..." 1>&2
2727
@git submodule update --init --recursive --depth 1
2828

2929
all: build ## Build site with production settings and put deliverables in ./public
3030

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

3434
build-preview: module-check ## Build site with drafts and future posts enabled
35-
hugo --buildDrafts --buildFuture
35+
hugo --buildDrafts --buildFuture --environment preview
3636

3737
deploy-preview: ## Deploy preview site via netlify
38-
hugo --enableGitInfo --buildFuture -b $(DEPLOY_PRIME_URL)
38+
hugo --enableGitInfo --buildFuture --environment preview -b $(DEPLOY_PRIME_URL)
3939

4040
functions-build:
4141
$(NETLIFY_FUNC) build functions-src
4242

4343
check-headers-file:
4444
scripts/check-headers-file.sh
4545

46-
production-build: build check-headers-file ## Build the production site and ensure that noindex headers aren't added
46+
production-build: module-check ## Build the production site and ensure that noindex headers aren't added
47+
hugo --minify --environment production
48+
HUGO_ENV=production $(MAKE) check-headers-file
4749

48-
non-production-build: ## Build the non-production site, which adds noindex headers to prevent indexing
49-
hugo --enableGitInfo
50+
non-production-build: module-check ## Build the non-production site, which adds noindex headers to prevent indexing
51+
hugo --enableGitInfo --environment nonprod
5052

5153
serve: module-check ## Boot the development server.
52-
hugo server --buildFuture
54+
hugo server --buildFuture --environment development
5355

5456
docker-image:
5557
@echo -e "$(CCRED)**** The use of docker-image is deprecated. Use container-image instead. ****$(CCEND)"
@@ -69,11 +71,15 @@ container-image: ## Build a container image for the preview of the website
6971
--tag $(CONTAINER_IMAGE) \
7072
--build-arg HUGO_VERSION=$(HUGO_VERSION)
7173

74+
container-push: container-image ## Push container image for the preview of the website
75+
$(CONTAINER_ENGINE) push $(CONTAINER_IMAGE)
76+
7277
container-build: module-check
73-
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify"
78+
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify --environment development"
7479

75-
container-serve: module-check ## Boot the development server using container. Run `make container-image` before this.
76-
$(CONTAINER_RUN) --cap-drop=ALL --cap-add=AUDIT_WRITE --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir
80+
# no build lock to allow for read-only mounts
81+
container-serve: module-check ## Boot the development server using container.
82+
$(CONTAINER_RUN) --cap-drop=ALL --cap-add=AUDIT_WRITE --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --environment development --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir --noBuildLock
7783

7884
test-examples:
7985
scripts/test_examples.sh install
@@ -88,8 +94,8 @@ docker-internal-linkcheck:
8894
$(MAKE) container-internal-linkcheck
8995

9096
container-internal-linkcheck: link-checker-image-pull
91-
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --config config.toml,linkcheck-config.toml --buildFuture
92-
$(CONTAINER_ENGINE) run --mount type=bind,source=$(CURDIR),target=/test --rm wjdp/htmltest htmltest
97+
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --config config.toml,linkcheck-config.toml --buildFuture --environment test
98+
$(CONTAINER_ENGINE) run --mount "type=bind,source=$(CURDIR),target=/test" --rm wjdp/htmltest htmltest
9399

94100
clean-api-reference: ## Clean all directories in API reference directory, preserve _index.md
95101
rm -rf content/en/docs/reference/kubernetes-api/*/

0 commit comments

Comments
 (0)