Skip to content

Commit

Permalink
Edits post-Hugo migration
Browse files Browse the repository at this point in the history
Signed-off-by: Misty Stanley-Jones <[email protected]>
  • Loading branch information
Misty Stanley-Jones committed May 21, 2018
1 parent b9dd751 commit 0a8ee5e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
17 changes: 10 additions & 7 deletions content/en/docs/admin/admission-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Using Admission Controllers
---

* TOC
{:toc}
{{< toc >}}

## What are they?

Expand Down Expand Up @@ -61,12 +61,13 @@ admission control plugins:
kube-apiserver --enable-admission-plugins=NamespaceLifecyle,LimitRanger ...
```

{{< note >}}
**Note**: Depending on the way your Kubernetes cluster is deployed and how the
API server is started, you may need to apply the settings in different ways.
For example, you may have to modify the systemd unit file if the API server is
deployed as a systemd service, you may modify the manifest file for the API
server if Kubernetes is deployed in a self-hosted way.
{: .note}
{{< /note >}}

## How do I turn off an admission controller?

Expand Down Expand Up @@ -255,7 +256,7 @@ Note that webhook API objects are subject to the same versioning compatibility r

An example request body:

```
```json
{
"apiVersion":"imagepolicy.k8s.io/v1alpha1",
"kind":"ImageReview",
Expand All @@ -278,7 +279,7 @@ An example request body:

The remote service is expected to fill the ImageReviewStatus field of the request and respond to either allow or disallow access. The response body's "spec" field is ignored and may be omitted. A permissive response would return:

```
```json
{
"apiVersion": "imagepolicy.k8s.io/v1alpha1",
"kind": "ImageReview",
Expand All @@ -290,7 +291,7 @@ The remote service is expected to fill the ImageReviewStatus field of the reques

To disallow access, the service would return:

```
```json
{
"apiVersion": "imagepolicy.k8s.io/v1alpha1",
"kind": "ImageReview",
Expand Down Expand Up @@ -476,17 +477,19 @@ This admission controller has the following behavior:
1. Evaluate the pod's node selector against the namespace-specific whitelist defined the plugin configuration file.
Conflicts result in rejection.

{{< note >}}
**Note:** PodNodeSelector allows forcing pods to run on specifically labeled nodes. Also see the PodTolerationRestriction
admission plugin, which allows preventing pods from running on specifically tainted nodes.
{: .note}
{{< /note >}}

### PersistentVolumeClaimResize

This admission controller implements additional validations for checking incoming `PersistentVolumeClaim` resize requests.

{{< note >}}
**Note:** Support for volume resizing is available as an alpha feature. Admins must set the feature gate `ExpandPersistentVolumes`
to `true` to enable resizing.
{: .note}
{{< /note >}}

After enabling the `ExpandPersistentVolumes` feature gate, enabling the `PersistentVolumeClaimResize` admission
controller is recommended, too. This admission controller prevents resizing of all claims by default unless a claim's `StorageClass`
Expand Down
26 changes: 17 additions & 9 deletions content/en/docs/concepts/storage/persistent-volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Persistent Volumes
This document describes the current state of `PersistentVolumes` in Kubernetes. Familiarity with [volumes](/docs/concepts/storage/volumes/) is suggested.

* TOC
{:toc}
{{< toc >}}

## Introduction

Expand Down Expand Up @@ -73,8 +73,9 @@ Once a user has a claim and that claim is bound, the bound PV belongs to the use
### Storage Object in Use Protection
The purpose of the Storage Object in Use Protection feature is to ensure that Persistent Volume Claims (PVCs) in active use by a pod and Persistent Volume (PVs) that are bound to PVCs are not removed from the system as this may result in data loss.

{{< note >}}
**Note:** PVC is in active use by a pod when the pod status is `Pending` and the pod is assigned to a node or the pod status is `Running`.
{: .note}
{{< /note >}}

When the [Storage Object in Use Protection feature](/docs/tasks/administer-cluster/storage-object-in-use-protection/) is enabled, if a user deletes a PVC in active use by a pod, the PVC is not removed immediately. PVC removal is postponed until the PVC is no longer actively used by any pods, and also if admin deletes a PV that is bound to a PVC, the PV is not removed immediately. PV removal is postponed until the PV is not bound to a PVC any more.

Expand Down Expand Up @@ -134,8 +135,9 @@ For volume plugins that support the `Delete` reclaim policy, deletion removes bo

#### Recycle

{{< warning >}}
**Warning:** The `Recycle` reclaim policy is deprecated. Instead, the recommended approach is to use dynamic provisioning.
{: .warning}
{{< /warning >}}

If supported by the underlying volume plugin, the `Recycle` reclaim policy performs a basic scrub (`rm -rf /thevolume/*`) on the volume and makes it available again for a new claim.

Expand Down Expand Up @@ -207,8 +209,9 @@ resizing to take place. Also, file system resizing is only supported for followi
* XFS
* Ext3, Ext4

{{< note >}}
**Note:** Expanding EBS volumes is a time consuming operation. Also, there is a per-volume quota of one modification every 6 hours.
{: .note}
{{< /note >}}


## Types of Persistent Volumes
Expand Down Expand Up @@ -273,8 +276,9 @@ Currently, storage size is the only resource that can be set or requested. Futu

Prior to v1.9, the default behavior for all volume plugins was to create a filesystem on the persistent volume. With v1.9, the user can specify a `volumeMode` which will now support raw block devices in addition to file systems. Valid values for `volumeMode` are "Filesystem" or "Block". If left unspecified, `volumeMode` defaults to "Filesystem" internally. This is an optional API parameter.

{{< note >}}
**Note:** This feature is alpha in v1.9 and may change in the future.
{: .note}
{{< /note >}}

### Access Modes

Expand Down Expand Up @@ -345,8 +349,9 @@ Currently, only NFS and HostPath support recycling. AWS EBS, GCE PD, Azure Disk,

A Kubernetes administrator can specify additional mount options for when a Persistent Volume is mounted on a node.

{{< note >}}
**Note:** Not all Persistent volume types support mount options.
{: .note}
{{< /note >}}

The following volume types support mount options:

Expand Down Expand Up @@ -462,8 +467,9 @@ When a PVC specifies a `selector` in addition to requesting a `StorageClass`,
the requirements are ANDed together: only a PV of the requested class and with
the requested labels may be bound to the PVC.

{{< note >}}
**Note:** Currently, a PVC with a non-empty `selector` can't have a PV dynamically provisioned for it.
{: .note}
{{< /note >}}

In the past, the annotation `volume.beta.kubernetes.io/storage-class` was used instead
of `storageClassName` attribute. This annotation is still working, however
Expand Down Expand Up @@ -552,8 +558,9 @@ spec:
claimName: block-pvc
```

{{< note >}}
**Note:** When adding a raw block device for a Pod, we specify the device path in the container instead of a mount path.
{: .note}
{{< /note >}}

### Binding Block Volumes

Expand All @@ -573,8 +580,9 @@ Volume binding matrix for statically provisioned volumes:
| Filesystem | Block | NO BIND |
| Filesystem | unspecified | BIND |

{{< note >}}
**Note:** Only statically provisioned volumes are supported for alpha release. Administrators should take care to consider these values when working with raw block devices.
{: .note}
{{< /note >}}

## Writing Portable Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ approvers:
- msau42
- jsafrane
title: Storage Object in Use Protection
content_template: templates/task
---

{% capture overview %}
{{% capture overview %}}
{{< feature-state for_k8s_version="v1.10" state="beta" >}}

Persistent volume claims (PVCs) that are in active use by a pod and persistent volumes (PVs) that are bound to PVCs can be protected from premature removal.

{% endcapture %}
{{% /capture %}}

{% capture prerequisites %}
{{% capture prerequisites %}}

The Storage Object in Use Protection feature is enabled in one of the below Kubernetes versions:
- {% assign for_k8s_version = "1.10" %} {% include feature-state-beta.md %}
- {% assign for_k8s_version = "1.11" %} {% include feature-state-stable.md %}

{% endcapture %}
{{% /capture %}}

{% capture steps %}
{{% capture steps %}}

## Storage Object in Use Protection feature used for PVC Protection

Expand Down Expand Up @@ -306,11 +308,11 @@ $ kubectl get pv
No resources found.
```

{% endcapture %}
{{% /capture %}}

{% capture discussion %}
{{% capture discussion %}}


{% endcapture %}
{{% /capture %}}

{% include templates/task.md %}

0 comments on commit 0a8ee5e

Please sign in to comment.