Skip to content

Commit 926af28

Browse files
committed
Merge in missing changes from master
1 parent b09f1b9 commit 926af28

File tree

16 files changed

+108
-41
lines changed

16 files changed

+108
-41
lines changed

docs/concepts/api-extension/custom-resources.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,24 @@ When creating a new API, consider whether to [aggregate your API with the Kubern
4848
#### Declarative APIs
4949

5050
In a Declarative API, typically:
51-
- your API consists of a relatively small number of relatively small objects (resources).
52-
- the objects define configuration of applications or infrastructure
53-
- the objects are updated relatively infrequently
54-
- humans often need to read and write the objects
55-
- the main operations on the objects are CRUD-y (creating, reading, updating and deleting)
56-
- transactions across objects are not required: the API represents a desired state, not an exact state.
51+
- Your API consists of a relatively small number of relatively small objects (resources).
52+
- The objects define configuration of applications or infrastructure.
53+
- The objects are updated relatively infrequently.
54+
- Humans often need to read and write the objects.
55+
- The main operations on the objects are CRUD-y (creating, reading, updating and deleting).
56+
- Transactions across objects are not required: the API represents a desired state, not an exact state.
5757

5858
Imperative APIs are not declarative.
5959
Signs that your API might not be declarative include:
60-
- the client says "do this", and then gets a synchornous response back when it is done.
61-
- the client says "do this", and then gets an operation ID back, and has to check a separate Operation objects to determine completion of the request.
62-
- you talk about Remote Procedure Calls (RPCs)
63-
- directly stoing large amounts of data (e.g. > a few kB per object, or >1000s of objects)
64-
- high bandwidth access (10s of requests per second sustained) needed
65-
- store end-user data (such as images, PII, etc) or other large-scale data processed by applications
66-
- the natural operations on the objects are not CRUD-y.
67-
- the API is not easily modeled as objects.
68-
- you chose to represent pending operations with an operation ID or operation object.
60+
- The client says "do this", and then gets a synchornous response back when it is done.
61+
- The client says "do this", and then gets an operation ID back, and has to check a separate Operation objects to determine completion of the request.
62+
- You talk about Remote Procedure Calls (RPCs).
63+
- Directly storing large amounts of data (e.g. > a few kB per object, or >1000s of objects).
64+
- High bandwidth access (10s of requests per second sustained) needed.
65+
- Store end-user data (such as images, PII, etc) or other large-scale data processed by applications.
66+
- The natural operations on the objects are not CRUD-y.
67+
- The API is not easily modeled as objects.
68+
- You chose to represent pending operations with an operation ID or operation object.
6969

7070
### Should I use a configMap or a custom resource?
7171

@@ -102,7 +102,7 @@ Aggregated APIs are subordinate APIServers that sit behind the primary API serve
102102

103103
Custom Resource Definitions (CRDS) allow users to create new types of resources without adding another APIserver. You do not need to understand API Aggregation to use CRDs.
104104

105-
Regardless of whether they are installed via CRDs or AA, the new resources are called Custom Resources to distinguish them from built-in Kubernetes resources (like pods)
105+
Regardless of whether they are installed via CRDs or AA, the new resources are called Custom Resources to distinguish them from built-in Kubernetes resources (like pods).
106106

107107
## CustomResourceDefinitions
108108

@@ -215,9 +215,9 @@ Kubernetes [client libraries](/docs/reference/client-libraries/) can be used to
215215

216216
When you add a custom resource, you can access it using:
217217
- kubectl
218-
- the kubernetes dynamic client
219-
- a REST client that you write
220-
- a client generated using Kubernetes client generation tools (generating one is an advanced undertaking, but some projects may provide a client along with the CRD or AA).
218+
- The kubernetes dynamic client.
219+
- A REST client that you write.
220+
- A client generated using Kubernetes client generation tools (generating one is an advanced undertaking, but some projects may provide a client along with the CRD or AA).
221221

222222
{% endcapture %}
223223

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
apiVersion: extensions/v1beta1
22
kind: PodSecurityPolicy
33
metadata:
4-
name: permissive
4+
name: example
55
spec:
6+
privileged: false # Don't allow privileged pods!
7+
# The rest fills in some required fields.
68
seLinux:
79
rule: RunAsAny
810
supplementalGroups:
@@ -11,10 +13,5 @@ spec:
1113
rule: RunAsAny
1214
fsGroup:
1315
rule: RunAsAny
14-
hostPorts:
15-
- min: 8000
16-
max: 8080
1716
volumes:
1817
- '*'
19-
allowedCapabilities:
20-
- '*'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: extensions/v1beta1
2+
kind: PodSecurityPolicy
3+
metadata:
4+
name: privileged
5+
annotations:
6+
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
7+
spec:
8+
privileged: true
9+
allowPrivilegeEscalation: true
10+
allowedCapabilities:
11+
- '*'
12+
volumes:
13+
- '*'
14+
hostNetwork: true
15+
hostPorts:
16+
- min: 0
17+
max: 65535
18+
hostIPC: true
19+
hostPID: true
20+
runAsUser:
21+
rule: 'RunAsAny'
22+
seLinux:
23+
rule: 'RunAsAny'
24+
supplementalGroups:
25+
rule: 'RunAsAny'
26+
fsGroup:
27+
rule: 'RunAsAny'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
apiVersion: extensions/v1beta1
2+
kind: PodSecurityPolicy
3+
metadata:
4+
name: restricted
5+
annotations:
6+
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
7+
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
8+
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
9+
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
10+
spec:
11+
privileged: false
12+
# Required to prevent escalations to root.
13+
allowPrivilegeEscalation: false
14+
# This is redundant with non-root + disallow privilege escalation,
15+
# but we can provide it for defense in depth.
16+
requiredDropCapabilities:
17+
- ALL
18+
# Allow core volume types.
19+
volumes:
20+
- 'configMap'
21+
- 'emptyDir'
22+
- 'projected'
23+
- 'secret'
24+
- 'downwardAPI'
25+
# Assume that persistentVolumes set up by the cluster admin are safe to use.
26+
- 'persistentVolumeClaim'
27+
hostNetwork: false
28+
hostIPC: false
29+
hostPID: false
30+
runAsUser:
31+
# Require the container to run without root privileges.
32+
rule: 'MustRunAsNonRoot'
33+
seLinux:
34+
# This policy assumes the nodes are using AppArmor rather than SELinux.
35+
rule: 'RunAsAny'
36+
supplementalGroups:
37+
rule: 'MustRunAs'
38+
ranges:
39+
# Forbid adding the root group.
40+
- min: 1
41+
max: 65535
42+
fsGroup:
43+
rule: 'MustRunAs'
44+
ranges:
45+
# Forbid adding the root group.
46+
- min: 1
47+
max: 65535
48+
readOnlyRootFilesystem: false

docs/concepts/storage/persistent-volumes.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ Generally, a PV will have a specific storage capacity. This is set using the PV
245245
Currently, storage size is the only resource that can be set or requested. Future attributes may include IOPS, throughput, etc.
246246

247247
### Volume Mode
248-
{% assign for_k8s_version="v1.9" %}{% include feature-state-alpha.md %}
249248

250249
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.
251250

251+
**Note:** This feature is alpha in v1.9 and may change in the future.
252+
{: .note}
253+
252254
### Access Modes
253255

254256
A `PersistentVolume` can be mounted on a host in any way supported by the resource provider. As shown in the table below, providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV's capabilities.
@@ -384,7 +386,7 @@ Claims use the same conventions as volumes when requesting storage with specific
384386

385387
### Volume Modes
386388

387-
Claims use the same convention as volumes to indicate the consumption of the volume as either a filesystem or block device.
389+
Claims use the same convention as volumes to indicates the consumption of the volume as either a filesystem or block device.
388390

389391
### Resources
390392

@@ -470,7 +472,7 @@ spec:
470472

471473
## Raw Block Volume Support
472474

473-
Static provisioning support for Raw Block Volumes is included as an alpha feature for v1.9. Raw block volumes can be specified through new API fields. Currently, Fibre Channel is the only supported plugin for this feature.
475+
Static provisioning support for Raw Block Volumes is included as an alpha feature for v1.9. With this change are some new API fields that need to be used to facilitate this functionality. Currently, Fibre Channel is the only supported plugin for this feature.
474476

475477
### Persistent Volumes using a Raw Block Volume
476478
```
@@ -530,7 +532,7 @@ spec:
530532
531533
### Binding Block Volumes
532534
533-
If a user requests a raw block volume through the persistentVolumeClaim.volumeMode field, it can only bind to PersistentVolume with the matching volumeMode field.
535+
If a user requests a raw block volume by indicating this using the volumeMode field in the PersistentVolumeClaim spec, the binding rules differ slighty from previous releases that didn't consider this mode as part of the spec.
534536
Listed is a table of possible combinations the user and admin might specify for requesting a raw block device. The table indicates if the volume will be bound or not given the combinations:
535537
Volume binding matrix for statically provisioned volumes:
536538

docs/getting-started-guides/scratch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ Complete this template for the scheduler pod:
705705
"containers": [
706706
{
707707
"name": "kube-scheduler",
708-
"image": "$HYBERKUBE_IMAGE",
708+
"image": "$HYPERKUBE_IMAGE",
709709
"command": [
710710
"/hyperkube",
711711
"scheduler",

docs/tasks/access-application-cluster/access-cluster.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ $ kubectl proxy --port=8080 &
5555

5656
See [kubectl proxy](/docs/user-guide/kubectl/{{page.version}}/#proxy) for more details.
5757

58-
Then you can explore the API with curl, wget, or a browser, like so:
58+
Then you can explore the API with curl, wget, or a browser, replacing localhost
59+
with [::1] for IPv6, like so:
5960

6061
```shell
6162
$ curl http://localhost:8080/api/

docs/tasks/access-application-cluster/frontend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
kind: Service
21
apiVersion: v1
2+
kind: Service
33
metadata:
44
name: frontend
55
spec:

docs/tutorials/stateful-application/web.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Service
43
metadata:

docs/tutorials/stateful-application/webp.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Service
43
metadata:
@@ -45,4 +44,4 @@ spec:
4544
accessModes: [ "ReadWriteOnce" ]
4645
resources:
4746
requests:
48-
storage: 1Gi
47+
storage: 1Gi

docs/tutorials/stateful-application/zookeeper.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Service
43
metadata:

docs/user-guide/environment-guide/backend-rc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: ReplicationController
43
metadata:

docs/user-guide/environment-guide/backend-srv.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Service
43
metadata:

docs/user-guide/environment-guide/show-rc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: ReplicationController
43
metadata:

docs/user-guide/environment-guide/show-srv.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Service
43
metadata:

docs/user-guide/multi-pod.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Pod
43
metadata:

0 commit comments

Comments
 (0)