Merge pull request #23452 from david-mcmahon/mungedocs

Add --norecurse bool to allow mungedocs to process kube root.
pull/6/head
Fabio Yeon 2016-04-01 12:06:56 -07:00
commit bf07a6f5e1
8 changed files with 50 additions and 28 deletions

View File

@ -16,6 +16,7 @@ binary | sha1 hash | md5 hash
* restore ability to run against secured etcd ([#21535](https://github.com/kubernetes/kubernetes/pull/21535), [@AdoHe](https://github.com/AdoHe))
### Other notable changes
* Trusty: Avoid reaching GCE custom metadata size limit ([#22818](https://github.com/kubernetes/kubernetes/pull/22818), [@andyzheng0831](https://github.com/andyzheng0831))
* Update kubectl help for 1.2 resources ([#23305](https://github.com/kubernetes/kubernetes/pull/23305), [@janetkuo](https://github.com/janetkuo))
* Removing URL query param from swagger UI to fix the XSS issue ([#23234](https://github.com/kubernetes/kubernetes/pull/23234), [@nikhiljindal](https://github.com/nikhiljindal))
@ -151,7 +152,7 @@ etc) volumes and block-device volumes will be owned by the FSGroup, and each
container in the pod will run with the FSGroup as a supplemental group
* Volumes that support SELinux labelling are now automatically relabeled with the
Pods SELinux context, if specified
* A stable client library release\_1\_2 is added. The library is [here](https://github.com/kubernetes/kubernetes/tree/master/pkg/client/clientset_generated/release_1_2), and detailed doc is [here](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/generating-clientset.md#released-clientsets). We will keep the interface of this go client stable.
* A stable client library release\_1\_2 is added. The library is [here](pkg/client/clientset_generated/release_1_2/), and detailed doc is [here](docs/devel/generating-clientset.md#released-clientsets). We will keep the interface of this go client stable.
* New Azure File Service Volume Plugin enables mounting Microsoft Azure File
Volumes (SMB 2.1 and 3.0) into a Pod. See [example](https://github.com/kubernetes/kubernetes/blob/release-1.2/examples/azure_file/README.md) for details.
* Logs usage and root filesystem usage of a container, volumes usage of a pod and node disk usage are exposed through Kubelet new metrics API.
@ -165,7 +166,7 @@ automatically provision a PersistentVolume to bind to an unfulfilled
PersistentVolumeClaim.
* Run multiple schedulers in parallel, e.g. one or more custom schedulers
alongside the default Kubernetes scheduler, using pod annotations to select
among the schedulers for each pod. Documentation is [here](http://kubernetes.io/docs/admin/multiple-schedulers.md), design doc is [here](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/multiple-schedulers.md).
among the schedulers for each pod. Documentation is [here](http://kubernetes.io/docs/admin/multiple-schedulers.md), design doc is [here](docs/proposals/multiple-schedulers.md).
* More expressive node affinity syntax, and support for “soft” node affinity.
Node selectors (to constrain pods to schedule on a subset of nodes) now support
the operators {<code>In, NotIn, Exists, DoesNotExist, Gt, Lt</code>} instead of just conjunction of exact match on node label values. In
@ -178,11 +179,11 @@ details can be found in the [DNS README](https://github.com/kubernetes/kubernete
* New SchedulerExtender enables users to implement custom
out-of-(the-scheduler)-process scheduling predicates and priority functions,
for example to schedule pods based on resources that are not directly managed
by Kubernetes. Changes were introduced in PR [#13580](https://github.com/kubernetes/kubernetes/pull/13580). Example configuration and documentation is available [here](https://github.com/kubernetes/kubernetes/blob/master/docs/design/scheduler_extender.md). This is an alpha feature and may not be supported in its current form at beta
by Kubernetes. Changes were introduced in PR [#13580](https://github.com/kubernetes/kubernetes/pull/13580). Example configuration and documentation is available [here](docs/design/scheduler_extender.md). This is an alpha feature and may not be supported in its current form at beta
or GA.
* New Flex Volume Plugin enables users to use out-of-process volume plugins that
are installed to “/usr/libexec/kubernetes/kubelet-plugins/volume/exec/” on
every node, instead of being compiled into the Kubernetes binary. See [example](https://github.com/kubernetes/kubernetes/blob/master/examples/flexvolume/README.md) for details.
every node, instead of being compiled into the Kubernetes binary. See [example](examples/flexvolume/README.md) for details.
* vendor volumes into a pod. It expects vendor drivers are installed in the
volume plugin path on each kubelet node. This is an alpha feature and may
change in future.
@ -361,4 +362,5 @@ With kube-up:
Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]()

View File

@ -1,3 +1,4 @@
[Moved to CONTRIBUTING.md](CONTRIBUTING.md)
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CONTRIB.md?pixel)]()

View File

@ -17,7 +17,7 @@ Please fill out either the individual or corporate Contributor License Agreement
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.
***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the main repository. This policy does not apply to [third_party](https://github.com/kubernetes/kubernetes/tree/master/third_party).
***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the main repository. This policy does not apply to [third_party](third_party/).
### Contributing A Patch

View File

@ -2,7 +2,7 @@
See the [user guide overview](docs/user-guide/overview.md) for an introduction to Kubernetes and its core concepts.
See the [design overview](docs/design) for an overview of the system design.
See the [design overview](docs/design/) for an overview of the system design.
See the [API overview](docs/api.md) and [conventions](docs/devel/api-conventions.md) for an overview of the API design.

View File

@ -12,6 +12,7 @@
[Coverage Status Widget]: https://coveralls.io/repos/kubernetes/kubernetes/badge.svg
### Are you ...
* Interested in learning more about using Kubernetes? Please see our user-facing documentation on [kubernetes.io](http://kubernetes.io)
* Interested in hacking on the core Kubernetes code base? Keep reading!
@ -32,9 +33,11 @@ Kubernetes builds upon a [decade and a half of experience at Google running prod
<hr>
### Kubernetes can run anywhere!
However, initial development was done on GCE and so our instructions and scripts are built around that. If you make it work on other infrastructure please let us know and contribute instructions/code.
### Kubernetes is ready for Production!
With the [1.0.1 release](https://github.com/kubernetes/kubernetes/releases/tag/v1.0.1) Kubernetes is ready to serve your production workloads.
@ -43,7 +46,7 @@ With the [1.0.1 release](https://github.com/kubernetes/kubernetes/releases/tag/v
Kubernetes works with the following concepts:
[**Cluster**](docs/admin/README.md)
: A cluster is a set of physical or virtual machines and other infrastructure resources used by Kubernetes to run your applications. Kubernetes can run anywhere! See the [Getting Started Guides](docs/getting-started-guides) for instructions for a variety of services.
: A cluster is a set of physical or virtual machines and other infrastructure resources used by Kubernetes to run your applications. Kubernetes can run anywhere! See the [Getting Started Guides](docs/getting-started-guides/) for instructions for a variety of services.
[**Node**](docs/admin/node.md)
: A node is a physical or virtual machine running Kubernetes, onto which pods can be scheduled.
@ -127,7 +130,7 @@ You can also view recordings of past events and presentations on our [Media page
For Q&A, our threads are at:
* [Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes)
* [Slack](/docs/troubleshooting.md#slack)
* [Slack](https://github.com/docs/troubleshooting.md#slack)
### Want to do more than just 'discuss' Kubernetes?

View File

@ -35,6 +35,7 @@ const latestReleaseBranch = "release-1.2"
var (
verbose = flag.Bool("verbose", false, "On verification failure, emit pre-munge and post-munge versions.")
verify = flag.Bool("verify", false, "Exit with status 1 if files would have needed changes but do not change.")
norecurse = flag.Bool("norecurse", false, "Only process the files of --root-dir.")
rootDir = flag.String("root-dir", "", "Root directory containing documents to be processed.")
// "repo-root" seems like a dumb name, this is the relative path (from rootDir) to get to the repoRoot
relRoot = flag.String("repo-root", "..", `Appended to --root-dir to get the repository root.
@ -155,6 +156,10 @@ func (f fileProcessor) visit(path string) error {
func newWalkFunc(fp *fileProcessor, changesNeeded *bool) filepath.WalkFunc {
return func(path string, info os.FileInfo, err error) error {
stat, err := os.Stat(path)
if path != *rootDir && stat.IsDir() && *norecurse {
return filepath.SkipDir
}
if err := fp.visit(path); err != nil {
*changesNeeded = true
if err != ErrChangesNeeded {
@ -194,7 +199,7 @@ func main() {
flag.Parse()
if *rootDir == "" {
fmt.Fprintf(os.Stderr, "usage: %s [--verify] --root-dir <docs root>\n", flag.Arg(0))
fmt.Fprintf(os.Stderr, "usage: %s [--help] [--verify] [--norecurse] --root-dir [--skip-munges=<skip list>] <docs root>\n", flag.Arg(0))
os.Exit(1)
}

View File

@ -40,6 +40,7 @@ This Code of Conduct is adapted from the Contributor Covenant
http://contributor-covenant.org/version/1/2/0/
### Kubernetes Events Code of Conduct
Kubernetes events are working conferences intended for professional networking and collaboration in the
Kubernetes community. Attendees are expected to behave according to professional standards and in accordance
with their employer's policies on appropriate workplace behavior.
@ -55,5 +56,4 @@ be engaging in discriminatory or offensive speech or actions.
Please bring any concerns to to the immediate attention of Kubernetes event staff
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/code-of-conduct.md?pixel)]()

View File

@ -58,4 +58,15 @@ elif [[ $ret -gt 1 ]]; then
exit 1
fi
"${mungedocs}" "--skip-munges=unversioned-warning,analytics" \
"--norecurse" \
"--root-dir=${KUBE_ROOT}/" && ret=0 || ret=$?
if [[ $ret -eq 1 ]]; then
echo "${KUBE_ROOT}/ requires manual changes. See preceding errors."
exit 1
elif [[ $ret -gt 1 ]]; then
echo "Error running mungedocs."
exit 1
fi
# ex: ts=2 sw=2 et filetype=sh