diff --git a/cmd/mungedocs/toc.go b/cmd/mungedocs/toc.go index de68beb5308..8a4a1a0203d 100644 --- a/cmd/mungedocs/toc.go +++ b/cmd/mungedocs/toc.go @@ -75,9 +75,9 @@ func buildTOC(markdown []byte) ([]byte, error) { if numSharps > 0 { indent := strings.Repeat(" ", numSharps-1) bookmark := strings.Replace(strings.ToLower(heading), " ", "-", -1) - // remove ' and ? in bookmarks - bookmark = strings.Replace(bookmark, "?", "", -1) - bookmark = strings.Replace(bookmark, "'", "", -1) + // remove symbols (except for -) in bookmarks + r := regexp.MustCompile("[^A-Za-z0-9-]") + bookmark = r.ReplaceAllString(bookmark, "") tocLine := fmt.Sprintf("%s- [%s](#%s)\n", indent, heading, bookmark) buffer.WriteString(tocLine) } diff --git a/cmd/mungedocs/toc_test.go b/cmd/mungedocs/toc_test.go index 4180a480c33..ad32319085d 100644 --- a/cmd/mungedocs/toc_test.go +++ b/cmd/mungedocs/toc_test.go @@ -38,8 +38,8 @@ func Test_buildTOC(t *testing.T) { "- [Title](#title)\n - [Section Heading](#section-heading)\n", }, { - "# Title\nLorem ipsum \n## Section Heading\n### Why doesn't this work?\ndolor sit amet\n", - "- [Title](#title)\n - [Section Heading](#section-heading)\n - [Why doesn't this work?](#why-doesnt-this-work)\n", + "# Title\nLorem ipsum \n## Section Heading\n### Ok, why doesn't this work? ...add 4 *more* `symbols`!\ndolor sit amet\n", + "- [Title](#title)\n - [Section Heading](#section-heading)\n - [Ok, why doesn't this work? ...add 4 *more* `symbols`!](#ok-why-doesnt-this-work-add-4-more-symbols)\n", }, } for _, c := range cases { diff --git a/docs/admin/admission-controllers.md b/docs/admin/admission-controllers.md index 7a28f4ccf07..c09bdc311d8 100644 --- a/docs/admin/admission-controllers.md +++ b/docs/admin/admission-controllers.md @@ -37,7 +37,7 @@ certainly want the docs that go with that version. - [ResourceQuota](#resourcequota) - [LimitRanger](#limitranger) - [NamespaceExists](#namespaceexists) - - [NamespaceAutoProvision (deprecated)](#namespaceautoprovision-(deprecated)) + - [NamespaceAutoProvision (deprecated)](#namespaceautoprovision-deprecated) - [NamespaceLifecycle](#namespacelifecycle) - [Is there a recommended set of plug-ins to use?](#is-there-a-recommended-set-of-plug-ins-to-use) diff --git a/docs/admin/networking.md b/docs/admin/networking.md index b69f64d35a0..6f74372c4e3 100644 --- a/docs/admin/networking.md +++ b/docs/admin/networking.md @@ -29,7 +29,7 @@ certainly want the docs that go with that version. - [Docker model](#docker-model) - [Kubernetes model](#kubernetes-model) - [How to achieve this](#how-to-achieve-this) - - [Google Compute Engine (GCE)](#google-compute-engine-(gce)) + - [Google Compute Engine (GCE)](#google-compute-engine-gce) - [L2 networks and linux bridging](#l2-networks-and-linux-bridging) - [Flannel](#flannel) - [OpenVSwitch](#openvswitch) diff --git a/docs/devel/api-conventions.md b/docs/devel/api-conventions.md index 4a0cfccbd3d..3014d0cb8e4 100644 --- a/docs/devel/api-conventions.md +++ b/docs/devel/api-conventions.md @@ -31,7 +31,7 @@ using resources with kubectl can be found in (working_with_resources.md).* **Table of Contents** - - [Types (Kinds)](#types-(kinds)) + - [Types (Kinds)](#types-kinds) - [Resources](#resources) - [Objects](#objects) - [Metadata](#metadata) diff --git a/docs/user-guide/README.md b/docs/user-guide/README.md index e7c9dec34d5..4e16951beee 100644 --- a/docs/user-guide/README.md +++ b/docs/user-guide/README.md @@ -24,7 +24,7 @@ certainly want the docs that go with that version. **Table of Contents** -- [Kubernetes User Guide: Managing Applications](#kubernetes-user-guide:-managing-applications) +- [Kubernetes User Guide: Managing Applications](#kubernetes-user-guide-managing-applications) - [Quick walkthrough](#quick-walkthrough) - [Thorough walkthrough](#thorough-walkthrough) - [Concept guide](#concept-guide) diff --git a/docs/user-guide/configuring-containers.md b/docs/user-guide/configuring-containers.md index d71ac7f1763..07cac3e94d0 100644 --- a/docs/user-guide/configuring-containers.md +++ b/docs/user-guide/configuring-containers.md @@ -24,7 +24,7 @@ certainly want the docs that go with that version. **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Configuring and launching containers](#kubernetes-user-guide:-managing-applications:-configuring-and-launching-containers) +- [Kubernetes User Guide: Managing Applications: Configuring and launching containers](#kubernetes-user-guide-managing-applications-configuring-and-launching-containers) - [Configuration in Kubernetes](#configuration-in-kubernetes) - [Launching a container using a configuration file](#launching-a-container-using-a-configuration-file) - [Validating configuration](#validating-configuration) diff --git a/docs/user-guide/connecting-applications.md b/docs/user-guide/connecting-applications.md index 789eb83b698..0e4dd2322dc 100644 --- a/docs/user-guide/connecting-applications.md +++ b/docs/user-guide/connecting-applications.md @@ -24,7 +24,7 @@ certainly want the docs that go with that version. **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Connecting applications](#kubernetes-user-guide:-managing-applications:-connecting-applications) +- [Kubernetes User Guide: Managing Applications: Connecting applications](#kubernetes-user-guide-managing-applications-connecting-applications) - [The Kubernetes model for connecting containers](#the-kubernetes-model-for-connecting-containers) - [Exposing pods to the cluster](#exposing-pods-to-the-cluster) - [Creating a Service](#creating-a-service) diff --git a/docs/user-guide/deploying-applications.md b/docs/user-guide/deploying-applications.md index cd5b940066c..01cb4be54a6 100644 --- a/docs/user-guide/deploying-applications.md +++ b/docs/user-guide/deploying-applications.md @@ -24,7 +24,7 @@ certainly want the docs that go with that version. **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Deploying continuously running applications](#kubernetes-user-guide:-managing-applications:-deploying-continuously-running-applications) +- [Kubernetes User Guide: Managing Applications: Deploying continuously running applications](#kubernetes-user-guide-managing-applications-deploying-continuously-running-applications) - [Launching a set of replicas using a configuration file](#launching-a-set-of-replicas-using-a-configuration-file) - [Viewing replication controller status](#viewing-replication-controller-status) - [Deleting replication controllers](#deleting-replication-controllers) diff --git a/docs/user-guide/introspection-and-debugging.md b/docs/user-guide/introspection-and-debugging.md index 05567f0ea4f..50e0ae0d869 100644 --- a/docs/user-guide/introspection-and-debugging.md +++ b/docs/user-guide/introspection-and-debugging.md @@ -28,10 +28,10 @@ your pods. But there are a number of ways to get even more information about you **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Application Introspection and Debugging](#kubernetes-user-guide:-managing-applications:-application-introspection-and-debugging) - - [Using ```kubectl describe pod``` to fetch details about pods](#using-```kubectl-describe-pod```-to-fetch-details-about-pods) - - [Example: debugging Pending Pods](#example:-debugging-pending-pods) - - [Example: debugging a down/unreachable node](#example:-debugging-a-down/unreachable-node) +- [Kubernetes User Guide: Managing Applications: Application Introspection and Debugging](#kubernetes-user-guide-managing-applications-application-introspection-and-debugging) + - [Using ```kubectl describe pod``` to fetch details about pods](#using-kubectl-describe-pod-to-fetch-details-about-pods) + - [Example: debugging Pending Pods](#example-debugging-pending-pods) + - [Example: debugging a down/unreachable node](#example-debugging-a-downunreachable-node) - [What's next?](#whats-next) diff --git a/docs/user-guide/managing-deployments.md b/docs/user-guide/managing-deployments.md index 313c202ba1f..fcbd468c6d1 100644 --- a/docs/user-guide/managing-deployments.md +++ b/docs/user-guide/managing-deployments.md @@ -26,7 +26,7 @@ You’ve deployed your application and exposed it via a service. Now what? Kuber **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Managing deployments](#kubernetes-user-guide:-managing-applications:-managing-deployments) +- [Kubernetes User Guide: Managing Applications: Managing deployments](#kubernetes-user-guide-managing-applications-managing-deployments) - [Organizing resource configurations](#organizing-resource-configurations) - [Bulk operations in kubectl](#bulk-operations-in-kubectl) - [Using labels effectively](#using-labels-effectively) diff --git a/docs/user-guide/namespaces/README.md b/docs/user-guide/namespaces/README.md index 31df786995f..fa80d2c837b 100644 --- a/docs/user-guide/namespaces/README.md +++ b/docs/user-guide/namespaces/README.md @@ -88,13 +88,13 @@ Use the file [`namespace-dev.json`](namespace-dev.json) which describes a develo Create the development namespace using kubectl. ```shell -$ kubectl create -f docs/user-guide/kubernetes-namespaces/namespace-dev.json +$ kubectl create -f docs/user-guide/namespaces/namespace-dev.json ``` And then lets create the production namespace using kubectl. ```shell -$ kubectl create -f docs/user-guide/kubernetes-namespaces/namespace-prod.json +$ kubectl create -f docs/user-guide/namespaces/namespace-prod.json ``` To be sure things are right, let's list all of the namespaces in our cluster. diff --git a/docs/user-guide/persistent-volumes.md b/docs/user-guide/persistent-volumes.md index 8514119e820..538a6b82880 100644 --- a/docs/user-guide/persistent-volumes.md +++ b/docs/user-guide/persistent-volumes.md @@ -43,7 +43,7 @@ This document describes the current state of `PersistentVolumes` in Kubernetes. - [PersistentVolumeClaims](#persistentvolumeclaims) - [Access Modes](#access-modes) - [Resources](#resources) - - [ Claims As Volumes](#-claims-as-volumes) + - [Claims As Volumes](#claims-as-volumes) @@ -194,7 +194,7 @@ Claims use the same conventions as volumes when requesting storage with specific Claims, like pods, can request specific quantities of a resource. In this case, the request is for storage. The same [resource model](../design/resources.md) applies to both volumes and claims. -## Claims As Volumes +## Claims As Volumes Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the `PersistentVolume` backing the claim. The volume is then mounted to the host and into the pod. diff --git a/docs/user-guide/production-pods.md b/docs/user-guide/production-pods.md index f851edd249a..bd84fce4bfa 100644 --- a/docs/user-guide/production-pods.md +++ b/docs/user-guide/production-pods.md @@ -24,13 +24,13 @@ certainly want the docs that go with that version. **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Working with pods and containers in production](#kubernetes-user-guide:-managing-applications:-working-with-pods-and-containers-in-production) +- [Kubernetes User Guide: Managing Applications: Working with pods and containers in production](#kubernetes-user-guide-managing-applications-working-with-pods-and-containers-in-production) - [Persistent storage](#persistent-storage) - [Distributing credentials](#distributing-credentials) - [Authenticating with a private image registry](#authenticating-with-a-private-image-registry) - [Helper containers](#helper-containers) - [Resource management](#resource-management) - - [Liveness and readiness probes (aka health checks)](#liveness-and-readiness-probes-(aka-health-checks)) + - [Liveness and readiness probes (aka health checks)](#liveness-and-readiness-probes-aka-health-checks) - [Lifecycle hooks and termination notice](#lifecycle-hooks-and-termination-notice) - [Termination message](#termination-message) - [What's next?](#whats-next) diff --git a/docs/user-guide/quick-start.md b/docs/user-guide/quick-start.md index 367ff43f5fa..54221ec95c6 100644 --- a/docs/user-guide/quick-start.md +++ b/docs/user-guide/quick-start.md @@ -24,7 +24,7 @@ certainly want the docs that go with that version. **Table of Contents** -- [Kubernetes User Guide: Managing Applications: Quick start](#kubernetes-user-guide:-managing-applications:-quick-start) +- [Kubernetes User Guide: Managing Applications: Quick start](#kubernetes-user-guide-managing-applications-quick-start) - [Launching a simple application](#launching-a-simple-application) - [Exposing your application to the Internet](#exposing-your-application-to-the-internet) - [Killing the application](#killing-the-application) diff --git a/docs/user-guide/replication-controller.md b/docs/user-guide/replication-controller.md index f3942888247..68daefc0a0f 100644 --- a/docs/user-guide/replication-controller.md +++ b/docs/user-guide/replication-controller.md @@ -25,7 +25,7 @@ certainly want the docs that go with that version. **Table of Contents** - [Replication Controller](#replication-controller) - - [What is a _replication controller_?](#what-is-a-_replication-controller_) + - [What is a _replication controller_?](#what-is-a-replication-controller) - [How does a replication controller work?](#how-does-a-replication-controller-work) - [Pod template](#pod-template) - [Labels](#labels) diff --git a/docs/user-guide/secrets.md b/docs/user-guide/secrets.md index 67597caa585..ce62179446e 100644 --- a/docs/user-guide/secrets.md +++ b/docs/user-guide/secrets.md @@ -41,9 +41,9 @@ a docker image. - [Consuming Secret Values](#consuming-secret-values) - [Secret and Pod Lifetime interaction](#secret-and-pod-lifetime-interaction) - [Use cases](#use-cases) - - [Use-Case: Pod with ssh keys](#use-case:-pod-with-ssh-keys) - - [Use-Case: Pods with prod / test credentials](#use-case:-pods-with-prod-/-test-credentials) - - [Use-case: Secret visible to one container in a pod](#use-case:-secret-visible-to-one-container-in-a-pod) + - [Use-Case: Pod with ssh keys](#use-case-pod-with-ssh-keys) + - [Use-Case: Pods with prod / test credentials](#use-case-pods-with-prod--test-credentials) + - [Use-case: Secret visible to one container in a pod](#use-case-secret-visible-to-one-container-in-a-pod) - [Security Properties](#security-properties) - [Protections](#protections) - [Risks](#risks) diff --git a/docs/user-guide/services.md b/docs/user-guide/services.md index 075b2e68910..c582b9e5442 100644 --- a/docs/user-guide/services.md +++ b/docs/user-guide/services.md @@ -36,9 +36,9 @@ certainly want the docs that go with that version. - [Environment variables](#environment-variables) - [DNS](#dns) - [Headless services](#headless-services) - - [External services](#external-services) - - [Type = NodePort](#type-=-nodeport) - - [Type = LoadBalancer](#type-=-loadbalancer) + - [External services](#external-services) + - [Type = NodePort](#type--nodeport) + - [Type = LoadBalancer](#type--loadbalancer) - [Shortcomings](#shortcomings) - [Future work](#future-work) - [The gory details of virtual IPs](#the-gory-details-of-virtual-ips) @@ -342,7 +342,7 @@ they desire, but leaves them freedom to do discovery in their own way. Applications can still use a self-registration pattern and adapters for other discovery systems could easily be built upon this API. -##External services +## External services For some parts of your application (e.g. frontends) you may want to expose a Service onto an external (outside of your cluster, maybe public internet) IP diff --git a/docs/user-guide/walkthrough/k8s201.md b/docs/user-guide/walkthrough/k8s201.md index 7d6b28c8cf3..e590d7e39ab 100644 --- a/docs/user-guide/walkthrough/k8s201.md +++ b/docs/user-guide/walkthrough/k8s201.md @@ -30,7 +30,7 @@ In order for the kubectl usage examples to work, make sure you have an examples **Table of Contents** -- [Kubernetes 201 - Labels, Replication Controllers, Services and Health Checking](#kubernetes-201---labels,-replication-controllers,-services-and-health-checking) +- [Kubernetes 201 - Labels, Replication Controllers, Services and Health Checking](#kubernetes-201---labels-replication-controllers-services-and-health-checking) - [Labels](#labels) - [Replication Controllers](#replication-controllers) - [Replication Controller Management](#replication-controller-management)