Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy concepts section post-Docsy #21997

Merged

Conversation

sftim
Copy link
Contributor

@sftim sftim commented Jun 22, 2020

Tidy the Concepts section following the switch to Docsy.
Preview.

  • give every subsection directly below Concepts a description
  • Where an existing Concept section has an index and the first page is “Overview of X”, move the content of that overview into the index page itself.
  • and tidy one note to use a shortcode

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. language/en Issues or PRs related to English language labels Jun 22, 2020
@k8s-ci-robot k8s-ci-robot requested review from chenopis and thockin June 22, 2020 22:23
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Jun 22, 2020
@sftim
Copy link
Contributor Author

sftim commented Jun 22, 2020

Prompted by #21815 (comment)

@sftim
Copy link
Contributor Author

sftim commented Jun 22, 2020

Helps with #21755

@netlify
Copy link

netlify bot commented Jun 22, 2020

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 4a4719d

https://deploy-preview-21997--kubernetes-io-master-staging.netlify.app

@sftim sftim force-pushed the 20200622_tidy_concepts_section_post_docsy branch 2 times, most recently from 31899f1 to 929269d Compare June 22, 2020 22:40
@@ -1,5 +1,6 @@
---
title: "Containers"
weight: 40
description: Technology for packaging the (compiled) code for an application along with the dependencies it needs at run time
Copy link
Contributor

@kbhawkey kbhawkey Jun 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:
Sentence does not end with period.
compiled
Technology for packaging the ... . How is this page different from the general definition of containers, such as,
https://docs.microsoft.com/en-us/dotnet/architecture/microservices/container-docker-introduction/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is borrowed from https://kubernetes.io/docs/concepts/containers/overview/
I was going to leave wording changes for a follow-up PR.

I'm happy to use different wording here; do you have something in mind?

@@ -3,6 +3,9 @@ reviewers:
- lavalamp
title: Kubernetes Components
content_type: concept
description: >
A Kubernetes cluster consists of a set of worker machines, called nodes , that run containerized applications. Every cluster has at least one worker node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could the text be simplified? The paragraph identifies nodes and control plane but describes them separately.
A cluster needs a control plane component as well as a node?
Here is one way to edit:
A Kubernetes cluster consists of a set of machines called nodes. [is this needed: Every cluster has at least one node.]
The nodes host the Pods that represent the application components and run the containerized applications. The control plane manages the nodes and the Pods in the cluster. In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.

@sftim sftim force-pushed the 20200622_tidy_concepts_section_post_docsy branch from 929269d to 44db6c8 Compare June 24, 2020 13:27
@@ -1,5 +1,11 @@
---
title: "Services, Load Balancing, and Networking"
weight: 60
description: >
Kubernetes networking addresses four concerns.
Containers within a Pod use networking to communicate via loopback.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the four concerns follow? If so, could you use a colon after ... four concerns?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how the rendered page would look.

Kubernetes networking addresses four concerns: Containers within a Pod use networking to communicate via loopback. Cluster networking provides communication between different Pods. The Service resource lets you expose an application running in Pods to be reachable from outside your cluster. You can also use Services to publish services only for consumption inside your cluster.

?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please shorten description. Something like:
Cluster services and networking expose applications to external services and enable communication between Pods.

@@ -1,5 +1,9 @@
---
title: "Storage"
weight: 70
description: >
Kubernetes provides both long-term and ephemeral storage that you can make available to Pods.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there are several you can phrases in the paragraph.
A quick edit:
Kubernetes provides both long-term and ephemeral storage. Pods interface with the
storage resources to persist and maintain the state of applications.
Stateful applications in your cluster rely upon durable storage. You can also configure
different classes of storage and automate how these are provisioned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please shorten. Possible edit:
Kubernetes provides both long-term and ephemeral storage.


## Kubernetes Control Plane

The various parts of the Kubernetes Control Plane, such as the Kubernetes Master and kubelet processes, govern how Kubernetes communicates with your cluster. The Control Plane maintains a record of all of the Kubernetes Objects in the system, and runs continuous control loops to manage those objects' state. At any given time, the Control Plane's control loops will respond to changes in the cluster and work to make the actual state of all the objects in the system match the desired state that you provided.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: What happens to this content? I agree that much of this should be edited.
I can't recall, but did you have another pull request to tweak this content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I see it, this content goes - at least for now. It doesn't seem that useful to keep given how Docsy renders the section links.

What I could do is add an explicit link into https://deploy-preview-21997--kubernetes-io-master-staging.netlify.app/docs/concepts/overview/what-is-kubernetes/

Does that work?

@@ -1,5 +1,8 @@
---
title: "Scheduling and Eviction"
weight: 90
description: >
In Kubernetes, scheduling refers to making sure that Pods are matched to Nodes so that the kubelet can run them.
Eviction is the process of proactively failing one or more Pods on resource-starved Nodes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This could be reworded.
Quick edit:
In Kubernetes, scheduling refers to managing the assignment of Pods to Nodes based on scheduling policies and available resources.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reduce.
Kubernetes schedules and evicts Pods to a match available resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kubernetes schedules and evicts Pods to a match available resources.

I'd like to write something that summarizes what the Scheduling & Eviction section contains, not what scheduling & eviction is. (I found this hard).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to come up (and work with your text) with a brief statement describing the following topic.
Readers will understand what content comes next.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More to crunch on:
Assigning taints and tolerations, scheduling resources, managing evictions

@kbhawkey
Copy link
Contributor

@sftim , In the process of reviewing. This is more than a "tidy" up.
Generally, I like the descriptions as they work well with the docsy theme.

description: >
Lower-level detail relevant to creating or administering a Kubernetes cluster.
---

<!-- overview -->
The cluster administration overview is for anyone creating or administering a Kubernetes cluster.
It assumes some familiarity with core Kubernetes [concepts](/docs/concepts/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a direct cut-n-paste from cluster-administration-overview?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I used mv then tweaked the metadata.


*Configuration files* and *flags* are documented in the Reference section of the online documentation, under each binary:

* [kubelet](/docs/admin/kubelet/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is a direct copy.
nit: The links should be corrected (/docs/admin/).

@kbhawkey
Copy link
Contributor

@kbhawkey
Copy link
Contributor

Looking at the descriptions on the rendered page.
Some descriptions could be reduced, otherwise, I think the text distracts with the rest of the page. Such as:
https://deploy-preview-21997--kubernetes-io-master-staging.netlify.app/docs/concepts/services-networking/

The description for Workloads doesn't read as well to me, Understand Pods.
https://deploy-preview-21997--kubernetes-io-master-staging.netlify.app/docs/concepts/workloads/

@sftim
Copy link
Contributor Author

sftim commented Jun 24, 2020

@kbhawkey I agree there probably is better wording. What's in this PR is already the best suggestion I have though.

@kbhawkey
Copy link
Contributor

kbhawkey commented Jun 24, 2020

@kbhawkey I agree there probably is better wording. What's in this PR is already the best suggestion I have though.

OK, I understand. Of note, the text appears in the page source meta data. Shorter strings seem better.
I think most of the descriptions work. I wonder if the problem (for me) is the placement of the
description on the page. The description appears first where as I would expect the title first and then the text snippet (functioning as an overview or synopsis). If the snippet is one sentence, it is not as noticeable. If more than one sentence, readers may not want to continue reading the rest of the page.
Could the page layout include the title and then the description?

@sftim
Copy link
Contributor Author

sftim commented Jun 24, 2020

Could the page layout include the title and then the description?

That means changing the Docsy theme, right? I'm not opposed to that but it seems like quite a chunk of work. We can do this right away, or at least sooner.

@kbhawkey
Copy link
Contributor

I think the docs layout override of the theme could change:
website\layouts\docs\list.html

@sftim
Copy link
Contributor Author

sftim commented Jun 24, 2020

website/layouts/docs/list.html

Ah, yes!

@kbhawkey
Copy link
Contributor

The theme default behavior lists the title first followed by the "lead" div.

@sftim sftim force-pushed the 20200622_tidy_concepts_section_post_docsy branch 2 times, most recently from 2de44fe to 5258f2c Compare June 25, 2020 15:43
@@ -2,7 +2,6 @@
title: "Configuration"
weight: 80
description: >
Kubernetes provides two similar resources for configuring Pods: ConfigMap and Secret. The main difference is
confidentiality; Secret lets you set up extra controls to keep the data in a Secret confidential.
Resouces that Kubernetes provides configuring Pods.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resources that Kubernetes provides to configure Pods.

@sftim
Copy link
Contributor Author

sftim commented Jun 25, 2020

/retitle [WIP] Tidy concepts section post-Docsy

@k8s-ci-robot k8s-ci-robot changed the title Tidy concepts section post-Docsy [WIP] Tidy concepts section post-Docsy Jun 25, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2020
@sftim sftim force-pushed the 20200622_tidy_concepts_section_post_docsy branch from 5258f2c to fa6e985 Compare June 25, 2020 16:05
@sftim
Copy link
Contributor Author

sftim commented Jun 25, 2020

/retitle Tidy concepts section post-Docsy

@k8s-ci-robot k8s-ci-robot changed the title [WIP] Tidy concepts section post-Docsy Tidy concepts section post-Docsy Jun 25, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2020
sftim added 3 commits June 25, 2020 17:09
Each section directly beneath Concepts gains a description.
Where an existing Concept section has an index and the first page is
“Overview of X”, move the content of that overview into the index page
itself.

Also, configure redirects accordingly.
@sftim sftim force-pushed the 20200622_tidy_concepts_section_post_docsy branch from fa6e985 to 4a4719d Compare June 25, 2020 16:11
@sftim
Copy link
Contributor Author

sftim commented Jun 25, 2020

IMO this revised page is much better than the existing, inaccurate content - I'm keen to remove the misleading text:

The Kubernetes Master is a collection of three processes that run on a single node in your cluster, which is designated as the master node.

@kbhawkey
Copy link
Contributor

@sftim, Things look good. I'd like to see this come together with the page structure change.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 27, 2020
@kbhawkey
Copy link
Contributor

Issue related to concepts section, #22110.

@kbhawkey
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kbhawkey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 28, 2020
@k8s-ci-robot k8s-ci-robot merged commit 86d373b into kubernetes:master Jun 28, 2020
@kbhawkey
Copy link
Contributor

kbhawkey commented Jun 28, 2020

@sftim, some of the pages look OK. Should have asked for a rebase to show the description updates on the pages.
The _index pages with page body content place the description after the page content instead of
before the content.
See, https://kubernetes.io/docs/concepts/containers/
https://kubernetes.io/docs/concepts/cluster-administration/
https://kubernetes.io/docs/concepts/extend-kubernetes/
https://kubernetes.io/docs/concepts/services-networking/

@kbhawkey
Copy link
Contributor

Created a follow-up PR #22113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants