diff --git a/content/en/docs/concepts/cluster-administration/logging.md b/content/en/docs/concepts/cluster-administration/logging.md index 8ce3884216..58004b2a4b 100644 --- a/content/en/docs/concepts/cluster-administration/logging.md +++ b/content/en/docs/concepts/cluster-administration/logging.md @@ -160,7 +160,7 @@ Consider the following example. A pod runs a single container, and the container writes to two different log files, using two different formats. Here's a configuration file for the Pod: -{{< code file="two-files-counter-pod.yaml" >}} +{{< codenew file="admin/logging/two-files-counter-pod.yaml" >}} It would be a mess to have log entries of different formats in the same log stream, even if you managed to redirect both components to the `stdout` stream of @@ -170,7 +170,7 @@ the logs to its own `stdout` stream. Here's a configuration file for a pod that has two sidecar containers: -{{< code file="two-files-counter-pod-streaming-sidecar.yaml" >}} +{{< codenew file="admin/logging/two-files-counter-pod-streaming-sidecar.yaml" >}} Now when you run this pod, you can access each log stream separately by running the following commands: @@ -226,7 +226,7 @@ which uses fluentd as a logging agent. Here are two configuration files that you can use to implement this approach. The first file contains a [ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/) to configure fluentd. -{{< code file="fluentd-sidecar-config.yaml" >}} +{{< codenew file="admin/logging/fluentd-sidecar-config.yaml" >}} **Note**: The configuration of fluentd is beyond the scope of this article. For information about configuring fluentd, see the @@ -235,7 +235,7 @@ information about configuring fluentd, see the The second file describes a pod that has a sidecar container running fluentd. The pod mounts a volume where fluentd can pick up its configuration data. -{{< code file="two-files-counter-pod-agent-sidecar.yaml" >}} +{{< codenew file="admin/logging/two-files-counter-pod-agent-sidecar.yaml" >}} After some time you can find log messages in the Stackdriver interface. diff --git a/content/en/docs/concepts/cluster-administration/manage-deployment.md b/content/en/docs/concepts/cluster-administration/manage-deployment.md index a91813c558..499675139e 100644 --- a/content/en/docs/concepts/cluster-administration/manage-deployment.md +++ b/content/en/docs/concepts/cluster-administration/manage-deployment.md @@ -22,12 +22,12 @@ You've deployed your application and exposed it via a service. Now what? Kuberne Many applications require multiple resources to be created, such as a Deployment and a Service. Management of multiple resources can be simplified by grouping them together in the same file (separated by `---` in YAML). For example: -{{< code file="nginx-app.yaml" >}} +{{< codenew file="application/nginx-app.yaml" >}} Multiple resources can be created the same way as a single resource: ```shell -$ kubectl create -f https://k8s.io/docs/concepts/cluster-administration/nginx-app.yaml +$ kubectl create -f https://k8s.io/examples/application/nginx-app.yaml service "my-nginx-svc" created deployment "my-nginx" created ``` @@ -37,13 +37,13 @@ The resources will be created in the order they appear in the file. Therefore, i `kubectl create` also accepts multiple `-f` arguments: ```shell -$ kubectl create -f https://k8s.io/docs/concepts/cluster-administration/nginx/nginx-svc.yaml -f https://k8s.io/docs/concepts/cluster-administration/nginx/nginx-deployment.yaml +$ kubectl create -f https://k8s.io/examples/application/nginx/nginx-svc.yaml -f https://k8s.io/examples/application/nginx/nginx-deployment.yaml ``` And a directory can be specified rather than or in addition to individual files: ```shell -$ kubectl create -f https://k8s.io/docs/concepts/cluster-administration/nginx/ +$ kubectl create -f https://k8s.io/examples/application/nginx/ ``` `kubectl` will read any files with suffixes `.yaml`, `.yml`, or `.json`. @@ -53,8 +53,8 @@ It is a recommended practice to put resources related to the same microservice o A URL can also be specified as a configuration source, which is handy for deploying directly from configuration files checked into github: ```shell -$ kubectl create -f https://raw.githubusercontent.com/kubernetes/website/master/docs/concepts/cluster-administration/nginx-deployment.yaml -deployment "nginx-deployment" created +$ kubectl create -f https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/nginx/nginx-deployment.yaml +deployment "my-nginx" created ``` ## Bulk operations in kubectl @@ -62,7 +62,7 @@ deployment "nginx-deployment" created Resource creation isn't the only operation that `kubectl` can perform in bulk. It can also extract resource names from configuration files in order to perform other operations, in particular to delete the same resources you created: ```shell -$ kubectl delete -f https://k8s.io/docs/concepts/cluster-administration/nginx-app.yaml +$ kubectl delete -f https://k8s.io/examples/application/nginx-app.yaml deployment "my-nginx" deleted service "my-nginx-svc" deleted ``` @@ -89,7 +89,7 @@ NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-nginx-svc 10.0.0.208 80/TCP 0s ``` -With the above commands, we first create resources under `docs/concepts/cluster-administration/nginx/` and print the resources created with `-o name` output format +With the above commands, we first create resources under `examples/application/nginx/` and print the resources created with `-o name` output format (print each resource as resource/name). Then we `grep` only the "service", and then print it with `kubectl get`. If you happen to organize your resources across several subdirectories within a particular directory, you can recursively perform the operations on the subdirectories also, by specifying `--recursive` or `-R` alongside the `--filename,-f` flag. @@ -321,7 +321,7 @@ Then, you can use [`kubectl apply`](/docs/reference/generated/kubectl/kubectl-co This command will compare the version of the configuration that you're pushing with the previous version and apply the changes you've made, without overwriting any automated changes to properties you haven't specified. ```shell -$ kubectl apply -f docs/concepts/cluster-administration/nginx/nginx-deployment.yaml +$ kubectl apply -f https://k8s.io/examples/application/nginx/nginx-deployment.yaml deployment "my-nginx" configured ``` @@ -371,7 +371,7 @@ and In some cases, you may need to update resource fields that cannot be updated once initialized, or you may just want to make a recursive change immediately, such as to fix broken pods created by a Deployment. To change such fields, use `replace --force`, which deletes and re-creates the resource. In this case, you can simply modify your original configuration file: ```shell -$ kubectl replace -f docs/concepts/cluster-administration/nginx/nginx-deployment.yaml --force +$ kubectl replace -f https://k8s.io/examples/application/nginx/nginx-deployment.yaml --force deployment "my-nginx" deleted deployment "my-nginx" replaced ``` @@ -405,4 +405,4 @@ That's it! The Deployment will declaratively update the deployed nginx applicati - [Learn about how to use `kubectl` for application introspection and debugging.](/docs/tasks/debug-application-cluster/debug-application-introspection/) - [Configuration Best Practices and Tips](/docs/concepts/configuration/overview/) -{{% /capture %}} \ No newline at end of file +{{% /capture %}} diff --git a/content/en/docs/concepts/cluster-administration/nginx-deployment.yaml b/content/en/docs/concepts/cluster-administration/nginx-deployment.yaml deleted file mode 100644 index 192f724a18..0000000000 --- a/content/en/docs/concepts/cluster-administration/nginx-deployment.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-deployment -spec: - selector: - matchLabels: - app: nginx - replicas: 3 - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.7.9 - ports: - - containerPort: 80 diff --git a/content/en/docs/tasks/federation/Values.yaml b/content/en/docs/tasks/federation/Values.yaml deleted file mode 100644 index 2bbf5f361e..0000000000 --- a/content/en/docs/tasks/federation/Values.yaml +++ /dev/null @@ -1,10 +0,0 @@ -isClusterService: false -serviceType: "LoadBalancer" -plugins: - kubernetes: - enabled: false - etcd: - enabled: true - zones: - - "example.com." - endpoint: "http://etcd-cluster.my-namespace:2379" diff --git a/content/en/docs/tasks/federation/set-up-coredns-provider-federation.md b/content/en/docs/tasks/federation/set-up-coredns-provider-federation.md index 269922067f..0101bf32e7 100644 --- a/content/en/docs/tasks/federation/set-up-coredns-provider-federation.md +++ b/content/en/docs/tasks/federation/set-up-coredns-provider-federation.md @@ -60,7 +60,18 @@ The CoreDNS default configuration should be customized to suit the federation. Shown below is the Values.yaml, which overrides the default configuration parameters on the CoreDNS chart. -{{< code file="Values.yaml" >}} +```yaml +isClusterService: false +serviceType: "LoadBalancer" +plugins: + kubernetes: + enabled: false + etcd: + enabled: true + zones: + - "example.com." + endpoint: "http://etcd-cluster.my-namespace:2379" +``` The above configuration file needs some explanation: diff --git a/content/en/docs/tasks/federation/set-up-placement-policies-federation.md b/content/en/docs/tasks/federation/set-up-placement-policies-federation.md index 2e75180ee2..84c8a9f9b9 100644 --- a/content/en/docs/tasks/federation/set-up-placement-policies-federation.md +++ b/content/en/docs/tasks/federation/set-up-placement-policies-federation.md @@ -34,7 +34,7 @@ received from the external policy engine. Shown below is an example ConfigMap for the Admission Controller: -{{< code file="scheduling-policy-admission.yaml" >}} +{{< codenew file="federation/scheduling-policy-admission.yaml" >}} The ConfigMap contains three files: @@ -84,7 +84,7 @@ Create a Service in the host cluster to contact the external policy engine: Shown below is an example Service for OPA. -{{< code file="policy-engine-service.yaml" >}} +{{< codenew file="federation/policy-engine-service.yaml" >}} Create a Deployment in the host cluster with the Federation control plane: @@ -92,7 +92,7 @@ Create a Deployment in the host cluster with the Federation control plane: Shown below is an example Deployment for OPA. -{{< code file="policy-engine-deployment.yaml" >}} +{{< codenew file="federation/policy-engine-deployment.yaml" >}} ## Configuring placement policies via ConfigMaps @@ -128,7 +128,7 @@ Annotate one of the clusters to indicate that it is PCI certified. Deploy a Federated ReplicaSet to test the placement policy. -{{< code file="replicaset-example-policy.yaml" >}} +{{< codenew file="federation/replicaset-example-policy.yaml" >}} Shown below is the command to deploy a ReplicaSet that *does* match the policy. diff --git a/content/en/docs/tutorials/clusters/apparmor.md b/content/en/docs/tutorials/clusters/apparmor.md index 4b59bc1d72..c8bd96c379 100644 --- a/content/en/docs/tutorials/clusters/apparmor.md +++ b/content/en/docs/tutorials/clusters/apparmor.md @@ -191,10 +191,10 @@ done Next, we'll run a simple "Hello AppArmor" pod with the deny-write profile: -{{< code file="hello-apparmor-pod.yaml" >}} +{{< codenew file="pods/security/hello-apparmor.yaml" >}} ```shell -$ kubectl create -f ./hello-apparmor-pod.yaml +$ kubectl create -f ./hello-apparmor.yaml ``` If we look at the pod events, we can see that the Pod container was created with the AppArmor diff --git a/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md b/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md index fa22162dd2..2de69abe74 100644 --- a/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md +++ b/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md @@ -35,85 +35,56 @@ This page provides a real world example of how to configure Redis using a Config You can follow the steps below to configure a Redis cache using data stored in a ConfigMap. -1. Create a ConfigMap from the `docs/tutorials/configuration/configmap/redis/redis-config` file: +First create a ConfigMap from the `examples/pods/config/redis-config` file: - ```shell - kubectl create configmap example-redis-config --from-file=https://k8s.io/docs/tutorials/configuration/configmap/redis/redis-config - kubectl get configmap example-redis-config -o yaml - ``` +```shell +kubectl create configmap example-redis-config --from-file=https://k8s.io/examples/pods/config/redis-config +kubectl get configmap example-redis-config -o yaml +``` - ```yaml - apiVersion: v1 - data: - redis-config: | - maxmemory 2mb - maxmemory-policy allkeys-lru - kind: ConfigMap - metadata: - creationTimestamp: 2016-03-30T18:14:41Z - name: example-redis-config - namespace: default - resourceVersion: "24686" - selfLink: /api/v1/namespaces/default/configmaps/example-redis-config - uid: 460a2b6e-f6a3-11e5-8ae5-42010af00002 - ``` +```yaml +apiVersion: v1 +data: + redis-config: | + maxmemory 2mb + maxmemory-policy allkeys-lru +kind: ConfigMap +metadata: + creationTimestamp: 2016-03-30T18:14:41Z + name: example-redis-config + namespace: default + resourceVersion: "24686" + selfLink: /api/v1/namespaces/default/configmaps/example-redis-config + uid: 460a2b6e-f6a3-11e5-8ae5-42010af00002 +``` -1. Create a pod specification that uses the config data stored in the ConfigMap: +Now create a pod specification that uses the config data stored in the ConfigMap: - ```yaml - apiVersion: v1 - kind: Pod - metadata: - name: redis - spec: - containers: - - name: redis - image: kubernetes/redis:v1 - env: - - name: MASTER - value: "true" - ports: - - containerPort: 6379 - resources: - limits: - cpu: "0.1" - volumeMounts: - - mountPath: /redis-master-data - name: data - - mountPath: /redis-master - name: config - volumes: - - name: data - emptyDir: {} - - name: config - configMap: - name: example-redis-config - items: - - key: redis-config - path: redis.conf - ``` -1. Create the pod: +{{< codenew file="pods/config/redis-pod.yaml" >}} - ```shell - kubectl create -f https://k8s.io/docs/tutorials/configuration/configmap/redis/redis-pod.yaml - ``` +Create the pod: - In the example, the config volume is mounted at `/redis-master`. - It uses `path` to add the `redis-config` key to a file named `redis.conf`. - The file path for the redis config, therefore, is `/redis-master/redis.conf`. - This is where the image will look for the config file for the redis master. +```shell +kubectl create -f https://k8s.io/examples/pods/config/redis-pod.yaml +``` -1. Use `kubectl exec` to enter the pod and run the `redis-cli` tool to verify that the configuration was correctly applied: +In the example, the config volume is mounted at `/redis-master`. +It uses `path` to add the `redis-config` key to a file named `redis.conf`. +The file path for the redis config, therefore, is `/redis-master/redis.conf`. +This is where the image will look for the config file for the redis master. - ```shell - kubectl exec -it redis redis-cli - 127.0.0.1:6379> CONFIG GET maxmemory - 1) "maxmemory" - 2) "2097152" - 127.0.0.1:6379> CONFIG GET maxmemory-policy - 1) "maxmemory-policy" - 2) "allkeys-lru" - ``` +Use `kubectl exec` to enter the pod and run the `redis-cli` tool to verify that +the configuration was correctly applied: + +```shell +kubectl exec -it redis redis-cli +127.0.0.1:6379> CONFIG GET maxmemory +1) "maxmemory" +2) "2097152" +127.0.0.1:6379> CONFIG GET maxmemory-policy +1) "maxmemory-policy" +2) "allkeys-lru" +``` {{% /capture %}} diff --git a/content/en/docs/concepts/cluster-administration/fluentd-sidecar-config.yaml b/content/en/examples/admin/logging/fluentd-sidecar-config.yaml similarity index 94% rename from content/en/docs/concepts/cluster-administration/fluentd-sidecar-config.yaml rename to content/en/examples/admin/logging/fluentd-sidecar-config.yaml index 6f7793c406..eea1849b03 100644 --- a/content/en/docs/concepts/cluster-administration/fluentd-sidecar-config.yaml +++ b/content/en/examples/admin/logging/fluentd-sidecar-config.yaml @@ -1,4 +1,7 @@ apiVersion: v1 +kind: ConfigMap +metadata: + name: fluentd-config data: fluentd.conf: | @@ -20,6 +23,3 @@ data: type google_cloud -kind: ConfigMap -metadata: - name: fluentd-config \ No newline at end of file diff --git a/content/en/docs/concepts/cluster-administration/two-files-counter-pod-agent-sidecar.yaml b/content/en/examples/admin/logging/two-files-counter-pod-agent-sidecar.yaml similarity index 100% rename from content/en/docs/concepts/cluster-administration/two-files-counter-pod-agent-sidecar.yaml rename to content/en/examples/admin/logging/two-files-counter-pod-agent-sidecar.yaml diff --git a/content/en/docs/concepts/cluster-administration/two-files-counter-pod-streaming-sidecar.yaml b/content/en/examples/admin/logging/two-files-counter-pod-streaming-sidecar.yaml similarity index 100% rename from content/en/docs/concepts/cluster-administration/two-files-counter-pod-streaming-sidecar.yaml rename to content/en/examples/admin/logging/two-files-counter-pod-streaming-sidecar.yaml diff --git a/content/en/docs/concepts/cluster-administration/two-files-counter-pod.yaml b/content/en/examples/admin/logging/two-files-counter-pod.yaml similarity index 100% rename from content/en/docs/concepts/cluster-administration/two-files-counter-pod.yaml rename to content/en/examples/admin/logging/two-files-counter-pod.yaml diff --git a/content/en/docs/concepts/cluster-administration/nginx-app.yaml b/content/en/examples/application/nginx-app.yaml similarity index 100% rename from content/en/docs/concepts/cluster-administration/nginx-app.yaml rename to content/en/examples/application/nginx-app.yaml diff --git a/content/en/docs/concepts/cluster-administration/nginx/nginx-deployment.yaml b/content/en/examples/application/nginx/nginx-deployment.yaml similarity index 100% rename from content/en/docs/concepts/cluster-administration/nginx/nginx-deployment.yaml rename to content/en/examples/application/nginx/nginx-deployment.yaml diff --git a/content/en/docs/concepts/cluster-administration/nginx/nginx-svc.yaml b/content/en/examples/application/nginx/nginx-svc.yaml similarity index 100% rename from content/en/docs/concepts/cluster-administration/nginx/nginx-svc.yaml rename to content/en/examples/application/nginx/nginx-svc.yaml diff --git a/content/en/docs/tasks/federation/policy-engine-deployment.yaml b/content/en/examples/federation/policy-engine-deployment.yaml similarity index 94% rename from content/en/docs/tasks/federation/policy-engine-deployment.yaml rename to content/en/examples/federation/policy-engine-deployment.yaml index 44f7069d4b..168af7ba4c 100644 --- a/content/en/docs/tasks/federation/policy-engine-deployment.yaml +++ b/content/en/examples/federation/policy-engine-deployment.yaml @@ -7,6 +7,9 @@ metadata: namespace: federation-system spec: replicas: 1 + selector: + matchLabels: + app: opa template: metadata: labels: diff --git a/content/en/docs/tasks/federation/policy-engine-service.yaml b/content/en/examples/federation/policy-engine-service.yaml similarity index 100% rename from content/en/docs/tasks/federation/policy-engine-service.yaml rename to content/en/examples/federation/policy-engine-service.yaml diff --git a/content/en/docs/tasks/federation/replicaset-example-policy.yaml b/content/en/examples/federation/replicaset-example-policy.yaml similarity index 100% rename from content/en/docs/tasks/federation/replicaset-example-policy.yaml rename to content/en/examples/federation/replicaset-example-policy.yaml diff --git a/content/en/docs/tasks/federation/scheduling-policy-admission.yaml b/content/en/examples/federation/scheduling-policy-admission.yaml similarity index 100% rename from content/en/docs/tasks/federation/scheduling-policy-admission.yaml rename to content/en/examples/federation/scheduling-policy-admission.yaml diff --git a/content/en/docs/tutorials/configuration/configmap/redis/redis-config b/content/en/examples/pods/config/redis-config similarity index 100% rename from content/en/docs/tutorials/configuration/configmap/redis/redis-config rename to content/en/examples/pods/config/redis-config diff --git a/content/en/docs/tutorials/configuration/configmap/redis/redis-pod.yaml b/content/en/examples/pods/config/redis-pod.yaml similarity index 100% rename from content/en/docs/tutorials/configuration/configmap/redis/redis-pod.yaml rename to content/en/examples/pods/config/redis-pod.yaml diff --git a/content/en/docs/tutorials/clusters/hello-apparmor-pod.yaml b/content/en/examples/pods/security/hello-apparmor.yaml similarity index 100% rename from content/en/docs/tutorials/clusters/hello-apparmor-pod.yaml rename to content/en/examples/pods/security/hello-apparmor.yaml diff --git a/test/examples_test.go b/test/examples_test.go index 61e224a0e4..14294a884d 100644 --- a/test/examples_test.go +++ b/test/examples_test.go @@ -294,23 +294,21 @@ func walkConfigFiles(inDir string, fn func(name, path string, data [][]byte)) er func TestExampleObjectSchemas(t *testing.T) { // Please help maintain the alphabeta order in the map cases := map[string]map[string][]runtime.Object{ - "docs/concepts/cluster-administration": { - "fluentd-sidecar-config": {&api.ConfigMap{}}, - "nginx-app": {&api.Service{}, &extensions.Deployment{}}, - "nginx-deployment": {&extensions.Deployment{}}, - "two-files-counter-pod": {&api.Pod{}}, - "two-files-counter-pod-agent-sidecar": {&api.Pod{}}, - "two-files-counter-pod-streaming-sidecar": {&api.Pod{}}, - }, - "docs/concepts/cluster-administration/nginx": { + "docs/concepts/overview/working-with-objects": { "nginx-deployment": {&extensions.Deployment{}}, + }, + "docs/concepts/services-networking": { + "curlpod": {&extensions.Deployment{}}, + "custom-dns": {&api.Pod{}}, + "hostaliases-pod": {&api.Pod{}}, + "ingress": {&extensions.Ingress{}}, + "nginx-secure-app": {&api.Service{}, &extensions.Deployment{}}, "nginx-svc": {&api.Service{}}, + "run-my-nginx": {&extensions.Deployment{}}, }, - "docs/tutorials/clusters": { - "hello-apparmor-pod": {&api.Pod{}}, - }, - "docs/tutorials/configuration/configmap/redis": { - "redis-pod": {&api.Pod{}}, + "docs/concepts/overview/object-management-kubectl": { + "simple_deployment": {&extensions.Deployment{}}, + "update_deployment": {&extensions.Deployment{}}, }, "examples/admin": { "namespace-dev": {&api.Namespace{}}, @@ -324,33 +322,39 @@ func TestExampleObjectSchemas(t *testing.T) { "busybox": {&api.Pod{}}, "dns-horizontal-autoscaler": {&extensions.Deployment{}}, }, + "examples/admin/logging": { + "fluentd-sidecar-config": {&api.ConfigMap{}}, + "two-files-counter-pod": {&api.Pod{}}, + "two-files-counter-pod-agent-sidecar": {&api.Pod{}}, + "two-files-counter-pod-streaming-sidecar": {&api.Pod{}}, + }, "examples/admin/resource": { - "cpu-constraints": {&api.LimitRange{}}, - "cpu-constraints-pod": {&api.Pod{}}, - "cpu-constraints-pod-2": {&api.Pod{}}, - "cpu-constraints-pod-3": {&api.Pod{}}, - "cpu-constraints-pod-4": {&api.Pod{}}, - "cpu-defaults": {&api.LimitRange{}}, - "cpu-defaults-pod": {&api.Pod{}}, - "cpu-defaults-pod-2": {&api.Pod{}}, - "cpu-defaults-pod-3": {&api.Pod{}}, - "memory-constraints": {&api.LimitRange{}}, - "memory-constraints-pod": {&api.Pod{}}, - "memory-constraints-pod-2": {&api.Pod{}}, - "memory-constraints-pod-3": {&api.Pod{}}, - "memory-constraints-pod-4": {&api.Pod{}}, - "memory-defaults": {&api.LimitRange{}}, - "memory-defaults-pod": {&api.Pod{}}, - "memory-defaults-pod-2": {&api.Pod{}}, - "memory-defaults-pod-3": {&api.Pod{}}, - "quota-mem-cpu": {&api.ResourceQuota{}}, - "quota-mem-cpu-pod": {&api.Pod{}}, - "quota-mem-cpu-pod-2": {&api.Pod{}}, - "quota-objects": {&api.ResourceQuota{}}, - "quota-objects-pvc": {&api.PersistentVolumeClaim{}}, - "quota-objects-pvc-2": {&api.PersistentVolumeClaim{}}, - "quota-pod": {&api.ResourceQuota{}}, - "quota-pod-deployment": {&extensions.Deployment{}}, + "cpu-constraints": {&api.LimitRange{}}, + "cpu-constraints-pod": {&api.Pod{}}, + "cpu-constraints-pod-2": {&api.Pod{}}, + "cpu-constraints-pod-3": {&api.Pod{}}, + "cpu-constraints-pod-4": {&api.Pod{}}, + "cpu-defaults": {&api.LimitRange{}}, + "cpu-defaults-pod": {&api.Pod{}}, + "cpu-defaults-pod-2": {&api.Pod{}}, + "cpu-defaults-pod-3": {&api.Pod{}}, + "memory-constraints": {&api.LimitRange{}}, + "memory-constraints-pod": {&api.Pod{}}, + "memory-constraints-pod-2": {&api.Pod{}}, + "memory-constraints-pod-3": {&api.Pod{}}, + "memory-constraints-pod-4": {&api.Pod{}}, + "memory-defaults": {&api.LimitRange{}}, + "memory-defaults-pod": {&api.Pod{}}, + "memory-defaults-pod-2": {&api.Pod{}}, + "memory-defaults-pod-3": {&api.Pod{}}, + "quota-mem-cpu": {&api.ResourceQuota{}}, + "quota-mem-cpu-pod": {&api.Pod{}}, + "quota-mem-cpu-pod-2": {&api.Pod{}}, + "quota-objects": {&api.ResourceQuota{}}, + "quota-objects-pvc": {&api.PersistentVolumeClaim{}}, + "quota-objects-pvc-2": {&api.PersistentVolumeClaim{}}, + "quota-pod": {&api.ResourceQuota{}}, + "quota-pod-deployment": {&extensions.Deployment{}}, }, "examples/admin/sched": { "my-scheduler": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &extensions.Deployment{}}, @@ -363,6 +367,7 @@ func TestExampleObjectSchemas(t *testing.T) { "deployment-patch": {&extensions.Deployment{}}, "deployment-scale": {&extensions.Deployment{}}, "deployment-update": {&extensions.Deployment{}}, + "nginx-app": {&api.Service{}, &extensions.Deployment{}}, "nginx-with-request": {&extensions.Deployment{}}, "shell-demo": {&api.Pod{}}, "simple_deployment": {&extensions.Deployment{}}, @@ -381,7 +386,11 @@ func TestExampleObjectSchemas(t *testing.T) { "redis-slave-service": {&api.Service{}}, }, "examples/application/hpa": { - "php-apache": {&autoscaling.HorizontalPodAutoscaler{}}, + "php-apache": {&autoscaling.HorizontalPodAutoscaler{}}, + }, + "examples/application/nginx": { + "nginx-deployment": {&extensions.Deployment{}}, + "nginx-svc": {&api.Service{}}, }, "examples/application/job": { "cronjob": {&batch.CronJob{}}, @@ -431,6 +440,12 @@ func TestExampleObjectSchemas(t *testing.T) { "node-problem-detector-configmap": {&extensions.DaemonSet{}}, "termination": {&api.Pod{}}, }, + "examples/federation": { + "policy-engine-deployment": {&extensions.Deployment{}}, + "policy-engine-service": {&api.Service{}}, + "replicaset-example-policy": {&extensions.ReplicaSet{}}, + "scheduling-policy-admission": {&api.ConfigMap{}}, + }, "examples/podpreset": { "allow-db": {&settings.PodPreset{}}, "allow-db-merged": {&api.Pod{}}, @@ -455,24 +470,27 @@ func TestExampleObjectSchemas(t *testing.T) { "private-reg-pod": {&api.Pod{}}, "share-process-namespace": {&api.Pod{}}, "simple-pod": {&api.Pod{}}, - "two-container-pod": {&api.Pod{}}, + "two-container-pod": {&api.Pod{}}, + }, + "examples/pods/config": { + "redis-pod": {&api.Pod{}}, }, "examples/pods/inject": { - "dapi-envars-container": {&api.Pod{}}, - "dapi-envars-pod": {&api.Pod{}}, - "dapi-volume": {&api.Pod{}}, - "dapi-volume-resources": {&api.Pod{}}, - "envars": {&api.Pod{}}, - "secret": {&api.Secret{}}, - "secret-envars-pod": {&api.Pod{}}, - "secret-pod": {&api.Pod{}}, + "dapi-envars-container": {&api.Pod{}}, + "dapi-envars-pod": {&api.Pod{}}, + "dapi-volume": {&api.Pod{}}, + "dapi-volume-resources": {&api.Pod{}}, + "envars": {&api.Pod{}}, + "secret": {&api.Secret{}}, + "secret-envars-pod": {&api.Pod{}}, + "secret-pod": {&api.Pod{}}, }, "examples/pods/probe": { - "exec-liveness": {&api.Pod{}}, - "http-liveness": {&api.Pod{}}, - "pod-with-http-healthcheck": {&api.Pod{}}, + "exec-liveness": {&api.Pod{}}, + "http-liveness": {&api.Pod{}}, + "pod-with-http-healthcheck": {&api.Pod{}}, "pod-with-tcp-socket-healthcheck": {&api.Pod{}}, - "tcp-liveness-readiness": {&api.Pod{}}, + "tcp-liveness-readiness": {&api.Pod{}}, }, "examples/pods/qos": { "qos-pod": {&api.Pod{}}, @@ -490,6 +508,7 @@ func TestExampleObjectSchemas(t *testing.T) { "memory-request-limit-3": {&api.Pod{}}, }, "examples/pods/security": { + "hello-apparmor": {&api.Pod{}}, "security-context": {&api.Pod{}}, "security-context-2": {&api.Pod{}}, "security-context-3": {&api.Pod{}}, @@ -525,14 +544,14 @@ func TestExampleObjectSchemas(t *testing.T) { "run-my-nginx": {&extensions.Deployment{}}, }, "examples/windows": { - "configmap-pod": {&api.ConfigMap{}, &api.Pod{}}, - "daemonset": {&extensions.DaemonSet{}}, - "deploy-hyperv": {&extensions.Deployment{}}, - "deploy-resource": {&extensions.Deployment{}}, - "emptydir-pod": {&api.Pod{}}, + "configmap-pod": {&api.ConfigMap{}, &api.Pod{}}, + "daemonset": {&extensions.DaemonSet{}}, + "deploy-hyperv": {&extensions.Deployment{}}, + "deploy-resource": {&extensions.Deployment{}}, + "emptydir-pod": {&api.Pod{}}, "hostpath-volume-pod": {&api.Pod{}}, - "secret-pod": {&api.Secret{}, &api.Pod{}}, - "simple-pod": {&api.Pod{}}, + "secret-pod": {&api.Secret{}, &api.Pod{}}, + "simple-pod": {&api.Pod{}}, }, }