Skip to content

Commit

Permalink
Merge branch 'master' into labels_annotations_taints
Browse files Browse the repository at this point in the history
  • Loading branch information
CKchen0726 committed Jan 21, 2021
2 parents c6f6fb9 + 08a4e63 commit c6b704e
Show file tree
Hide file tree
Showing 335 changed files with 45,344 additions and 4,647 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/google/docsy.git
[submodule "api-ref-generator"]
path = api-ref-generator
url = https://github.com/kubernetes-sigs/reference-docs
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# change is that the Hugo version is now an overridable argument rather than a fixed
# environment variable.

FROM alpine:latest
FROM golang:1.15-alpine

LABEL maintainer="Luc Perkins <lperkins@linuxfoundation.org>"

Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ docker-serve:
@echo -e "$(CCRED)**** The use of docker-serve is deprecated. Use container-serve instead. ****$(CCEND)"
$(MAKE) container-serve

container-image:
container-image: ## Build a container image for the preview of the website
$(CONTAINER_ENGINE) build . \
--network=host \
--tag $(CONTAINER_IMAGE) \
Expand All @@ -67,7 +67,7 @@ container-image:
container-build: module-check
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify"

container-serve: module-check
container-serve: module-check ## Boot the development server using container. Run `make container-image` before this.
$(CONTAINER_RUN) --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

test-examples:
Expand All @@ -85,3 +85,10 @@ docker-internal-linkcheck:
container-internal-linkcheck: link-checker-image-pull
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --config config.toml,linkcheck-config.toml --buildFuture
$(CONTAINER_ENGINE) run --mount type=bind,source=$(CURDIR),target=/test --rm wjdp/htmltest htmltest

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

api-reference: clean-api-reference ## Build the API reference pages. go needed
cd api-ref-generator/gen-resourcesdocs && \
go run cmd/main.go kwebsite --config-dir config/v1.20/ --file api/v1.20/swagger.json --output-dir ../../content/en/docs/reference/kubernetes-api --templates templates
14 changes: 11 additions & 3 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ aliases:
- mrbobbytables
sig-docs-blog-reviewers: # Reviewers for blog content
- castrojo
- cody-clark
- kbarnard10
- mrbobbytables
- onlydole
- parispittman
- vonguard
sig-docs-de-owners: # Admins for German content
- bene2k1
- mkorbi
Expand All @@ -30,6 +27,7 @@ aliases:
- kbarnard10
- kbhawkey
- onlydole
- reylejano
- savitharaghunathan
- sftim
- steveperry-53
Expand Down Expand Up @@ -139,6 +137,7 @@ aliases:
- seokho-son
- ysyukr
- pjhwa
- yoonian
sig-docs-leads: # Website chairs and tech leads
- irvifa
- jimangel
Expand Down Expand Up @@ -215,3 +214,12 @@ aliases:
- idvoretskyi
- MaxymVlasov
- Potapy4
# authoritative source: git.k8s.io/community/OWNERS_ALIASES
committee-steering: # provide PR approvals for announcements
- cblecker
- derekwaynecarr
- dims
- liggitt
- mrbobbytables
- nikhita
- parispittman
5 changes: 3 additions & 2 deletions README-uk.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
```bash
git clone https://github.com/kubernetes/website.git
cd website
hugo server --buildFuture
git submodule update --init --recursive --depth 1
make serve
```

<!-- This will start the local Hugo server on port 1313. Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh. -->
Expand Down Expand Up @@ -82,4 +83,4 @@ hugo server --buildFuture
## Дякуємо!

<!-- Kubernetes thrives on community participation, and we appreciate your contributions to our website and our documentation! -->
Долучення до спільноти - запорука успішного розвитку Kubernetes. Ми цінуємо ваш внесок у наш сайт і документацію!
Долучення до спільноти - запорука успішного розвитку Kubernetes. Ми цінуємо ваш внесок у наш сайт і документацію!
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

This repository contains the assets required to build the [Kubernetes website and documentation](https://kubernetes.io/). We're glad that you want to contribute!

+ [Contributing to the docs](#contributing-to-the-docs)
+ [Localization ReadMes](#localization-readmemds)

# Using this repository

You can run the website locally using Hugo (Extended version), or you can run it in a container runtime. We strongly recommend using the container runtime, as it gives deployment consistency with the live website.
Expand Down Expand Up @@ -56,6 +59,49 @@ make serve

This will start the local Hugo server on port 1313. Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.

## Building the API reference pages

The API reference pages located in `content/en/docs/reference/kubernetes-api` are built from the Swagger specification, using https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs.

To update the reference pages for a new Kubernetes release (replace v1.20 in the following examples with the release to update to):

1. Pull the `kubernetes-resources-reference` submodule:

```
git submodule update --init --recursive --depth 1
```

2. Create a new API revision into the submodule, and add the Swagger specification:

```
mkdir api-ref-generator/gen-resourcesdocs/api/v1.20
curl 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json' > api-ref-generator/gen-resourcesdocs/api/v1.20/swagger.json
```

3. Copy the table of contents and fields configuration for the new release from a previous one:

```
mkdir api-ref-generator/gen-resourcesdocs/api/v1.20
cp api-ref-generator/gen-resourcesdocs/api/v1.19/* api-ref-generator/gen-resourcesdocs/api/v1.20/
```

4. Adapt the files `toc.yaml` and `fields.yaml` to reflect the changes between the two releases

5. Next, build the pages:

```
make api-reference
```

You can test the results locally by making and serving the site from a container image:

```
make container-image
make container-serve
```

6. When all changes of the new contract are reflected into the configuration files `toc.yaml` and `fields.yaml`, create a Pull Request with the newly generated API reference pages.

## Troubleshooting
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version

Expand Down
1 change: 1 addition & 0 deletions api-ref-generator
Submodule api-ref-generator added at ce9745
61 changes: 61 additions & 0 deletions assets/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -578,3 +578,64 @@ body.td-documentation {
color: black;
text-decoration: none !important;
}

@media print {
/* Do not print announcements */
#announcement, section#announcement, #fp-announcement, section#fp-announcement {
display: none;
}
}

#announcement, #fp-announcement {
> * {
color: inherit;
background: inherit;
}

a {
color: inherit;
border-bottom: 1px solid #fff;
}

a:hover {
color: inherit;
border-bottom: none;
}
}

#announcement {
padding-top: 105px;
padding-bottom: 25px;
}

.header-hero {
padding-top: 40px;
}

/* Extra announcement height only for landscape viewports */
@media (min-aspect-ratio: 8/9) {
#fp-announcement {
min-height: 25vh;
}
}

#fp-announcement aside {
padding-top: 115px;
padding-bottom: 25px;
}

.announcement {
.content {
margin-bottom: 0px;
}


> p {
.gridPage #announcement .content p,
.announcement > h4,
.announcement > h3 {
color: #ffffff;
}
}
}

7 changes: 1 addition & 6 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ disableBrowserError = true

disableKinds = ["taxonomy", "taxonomyTerm"]

ignoreFiles = [ "^OWNERS$", "README[-]+[a-z]*\\.md", "^node_modules$", "content/en/docs/doc-contributor-tools" ]
ignoreFiles = [ "(?:^|/)OWNERS$", "README[-]+[a-z]*\\.md", "^node_modules$", "content/en/docs/doc-contributor-tools" ]

timeout = 3000

Expand Down Expand Up @@ -154,11 +154,6 @@ githubWebsiteRaw = "raw.githubusercontent.com/kubernetes/website"
# GitHub repository link for editing a page and opening issues.
github_repo = "https://github.com/kubernetes/website"

# param for displaying an announcement block on every page.
# See /i18n/en.toml for message text and title.
announcement = true
announcement_bg = "#000000" #choose a dark color – text is white

#Searching
k8s_search = true

Expand Down
8 changes: 4 additions & 4 deletions content/en/blog/_posts/2020-12-02-dockershim-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ All your existing images will still work exactly the same.

### What about private images?

Also yes. All CRI runtimes support the same pull secrets configuration used in
Yes. All CRI runtimes support the same pull secrets configuration used in
Kubernetes, either via the PodSpec or ServiceAccount.


Expand All @@ -82,7 +82,7 @@ usability of other container runtimes. As an example, OpenShift 4.x has been
using the [CRI-O] runtime in production since June 2019.

For other examples and references you can look at the adopters of containerd and
cri-o, two container runtimes under the Cloud Native Computing Foundation ([CNCF]).
CRI-O, two container runtimes under the Cloud Native Computing Foundation ([CNCF]).
- [containerd](https://github.com/containerd/containerd/blob/master/ADOPTERS.md)
- [CRI-O](https://github.com/cri-o/cri-o/blob/master/ADOPTERS.md)

Expand Down Expand Up @@ -110,7 +110,7 @@ provide an end-to-end standard for managing containers.

That’s a complex question and it depends on a lot of factors. If Docker is
working for you, moving to containerd should be a relatively easy swap and
has have strictly better performance and less overhead. However we encourage you
will have strictly better performance and less overhead. However, we encourage you
to explore all the options from the [CNCF landscape] in case another would be an
even better fit for your environment.

Expand All @@ -129,7 +129,7 @@ common things to consider when migrating are:
- Kubectl plugins that require docker CLI or the control socket
- Kubernetes tools that require direct access to Docker (e.g. kube-imagepuller)
- Configuration of functionality like `registry-mirrors` and insecure registries
- Other support scripts or daemons that expect docker to be available and are run
- Other support scripts or daemons that expect Docker to be available and are run
outside of Kubernetes (e.g. monitoring or security agents)
- GPUs or special hardware and how they integrate with your runtime and Kubernetes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ as a container runtime after v1.20.

**You do not need to panic. It’s not as dramatic as it sounds.**

tl;dr Docker as an underlying runtime is being deprecated in favor of runtimes
that use the [Container Runtime Interface(CRI)](https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/)
TL;DR Docker as an underlying runtime is being deprecated in favor of runtimes
that use the [Container Runtime Interface (CRI)](https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/)
created for Kubernetes. Docker-produced images will continue to work in your
cluster with all runtimes, as they always have.

Expand Down Expand Up @@ -48,7 +48,7 @@ is a popular choice for that runtime (other common options include containerd
and CRI-O), but Docker was not designed to be embedded inside Kubernetes, and
that causes a problem.

You see, the thing we call “Docker” isn’t actually one thing -- it’s an entire
You see, the thing we call “Docker” isn’t actually one thing&mdash;it’s an entire
tech stack, and one part of it is a thing called “containerd,” which is a
high-level container runtime by itself. Docker is cool and useful because it has
a lot of UX enhancements that make it really easy for humans to interact with
Expand All @@ -66,11 +66,11 @@ does Kubernetes need the Dockershim?

Docker isn’t compliant with CRI, the [Container Runtime Interface](https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/).
If it were, we wouldn’t need the shim, and this wouldn’t be a thing. But it’s
not the end of the world, and you don’t need to panic -- you just need to change
not the end of the world, and you don’t need to panic&mdash;you just need to change
your container runtime from Docker to another supported container runtime.

One thing to note: If you are relying on the underlying docker socket
(/var/run/docker.sock) as part of a workflow within your cluster today, moving
(`/var/run/docker.sock`) as part of a workflow within your cluster today, moving
to a different runtime will break your ability to use it. This pattern is often
called Docker in Docker. There are lots of options out there for this specific
use case including things like
Expand All @@ -82,10 +82,10 @@ use case including things like

This change addresses a different environment than most folks use to interact
with Docker. The Docker installation you’re using in development is unrelated to
the Docker runtime inside your Kubernetes cluster. It’s confusing, I know. As a
developer, Docker is still useful to you in all the ways it was before this
the Docker runtime inside your Kubernetes cluster. It’s confusing, we understand.
As a developer, Docker is still useful to you in all the ways it was before this
change was announced. The image that Docker produces isn’t really a
Docker-specific image -- it’s an OCI ([Open Container Initiative](https://opencontainers.org/)) image.
Docker-specific image&mdash;it’s an OCI ([Open Container Initiative](https://opencontainers.org/)) image.
Any OCI-compliant image, regardless of the tool you use to build it, will look
the same to Kubernetes. Both [containerd](https://containerd.io/) and
[CRI-O](https://cri-o.io/) know how to pull those images and run them. This is
Expand All @@ -95,10 +95,10 @@ So, this change is coming. It’s going to cause issues for some, but it isn’t
catastrophic, and generally it’s a good thing. Depending on how you interact
with Kubernetes, this could mean nothing to you, or it could mean a bit of work.
In the long run, it’s going to make things easier. If this is still confusing
for you, that’s okay -- there’s a lot going on here, Kubernetes has a lot of
for you, that’s okay&mdash;there’s a lot going on here; Kubernetes has a lot of
moving parts, and nobody is an expert in 100% of it. We encourage any and all
questions regardless of experience level or complexity! Our goal is to make sure
everyone is educated as much as possible on the upcoming changes. `<3` We hope
this has answered most of your questions and soothed some anxieties!
everyone is educated as much as possible on the upcoming changes. We hope
this has answered most of your questions and soothed some anxieties! ❤️

Looking for more answers? Check out our accompanying [Dockershim Deprecation FAQ](/blog/2020/12/02/dockershim-faq/).
2 changes: 1 addition & 1 deletion content/en/docs/concepts/architecture/controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ control loops automatically fix failures. This means that,
potentially, your cluster never reaches a stable state.

As long as the controllers for your cluster are running and able to make
useful changes, it doesn't matter if the overall state is or is not stable.
useful changes, it doesn't matter if the overall state is stable or not.

## Design

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/concepts/architecture/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ checks the state of each node every `--node-monitor-period` seconds.
Heartbeats, sent by Kubernetes nodes, help determine the availability of a node.

There are two forms of heartbeats: updates of `NodeStatus` and the
[Lease object](/docs/reference/generated/kubernetes-api/{{< latest-version >}}/#lease-v1-coordination-k8s-io).
[Lease object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#lease-v1-coordination-k8s-io).
Each Node has an associated Lease object in the `kube-node-lease`
{{< glossary_tooltip term_id="namespace" text="namespace">}}.
Lease is a lightweight resource, which improves the performance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ Finally, add the same parameters into the API server start parameters.
Note that you may need to adapt the sample commands based on the hardware
architecture and cfssl version you are using.

curl -L https://github.com/cloudflare/cfssl/releases/download/v1.4.1/cfssl_1.4.1_linux_amd64 -o cfssl
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -o cfssl
chmod +x cfssl
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.4.1/cfssljson_1.4.1_linux_amd64 -o cfssljson
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -o cfssljson
chmod +x cfssljson
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.4.1/cfssl-certinfo_1.4.1_linux_amd64 -o cfssl-certinfo
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl-certinfo_1.5.0_linux_amd64 -o cfssl-certinfo
chmod +x cfssl-certinfo
1. Create a directory to hold the artifacts and initialize cfssl:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,5 +527,5 @@ When you enable the API Priority and Fairness feature, the kube-apiserver serves

For background information on design details for API priority and fairness, see
the [enhancement proposal](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190228-priority-and-fairness.md).
You can make suggestions and feature requests via [SIG API
Machinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery).
You can make suggestions and feature requests via [SIG API Machinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery)
or the feature's [slack channel](http://kubernetes.slack.com/messages/api-priority-and-fairness).
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,4 @@ endpoint on the scheduler. You must use the `--show-hidden-metrics-for-version=1
## {{% heading "whatsnext" %}}

* Read about the [Prometheus text format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) for metrics
* See the list of [stable Kubernetes metrics](https://github.com/kubernetes/kubernetes/blob/master/test/instrumentation/testdata/stable-metrics-list.yaml)
* Read about the [Kubernetes deprecation policy](/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior)
Loading

0 comments on commit c6b704e

Please sign in to comment.