Website: Consistent order in sample yaml files

Created on 17 Apr 2019  路  27Comments  路  Source: kubernetes/website

This is a Bug Report


Problem:

Under https://kubernetes.io/docs the order of elements in most sample yaml files are like

apiVersion: <version>
kind: <resource>
metadata:
  name: <resource name>
spec:
  ...

but the orders of some sample files are different like:

kind: <resource>
apiVersion: <version>
metadata:
  name: <resource name>
spec:
  ...

or

apiVersion: <version>
metadata:
  name: <resource name>
spec:
  ...
kind: <resource>

and that lets readers a little confused.

Proposed Solution:

Nice to make these orders consistent in whole doc.

Page to Update:
https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually is one of examples. (See the sample of keyword YXBpVXJsOiAiaHR0cHM6Ly9teS)

The list of files we need to check under k8s.io/website/content/en/docs

  • [x] concepts/architecture/cloud-controller.md (done)
  • [x] concepts/cluster-administration/cloud-providers.md (done)
  • [x] concepts/cluster-administration/manage-deployment.md (@oomichi https://github.com/kubernetes/website/pull/14189)
  • [x] concepts/configuration/assign-pod-node.md (done)
  • [x] concepts/configuration/manage-compute-resources-container.md (done)
  • [x] concepts/configuration/pod-priority-preemption.md (done)
  • [x] concepts/configuration/scheduler-perf-tuning.md (done)
  • [x] concepts/configuration/secret.md (@oomichi https://github.com/kubernetes/website/pull/14190)
  • [x] concepts/containers/images.md (done)
  • [x] concepts/containers/runtime-class.md (done)
  • [x] concepts/extend-kubernetes/compute-storage-net/device-plugins.md (done)
  • [x] concepts/extend-kubernetes/compute-storage-net/network-plugins.md (done)
  • [x] concepts/extend-kubernetes/poseidon-firmament-alternate-scheduler.md (done)
  • [x] concepts/extend-kubernetes/service-catalog.md (done)
  • [x] concepts/overview/object-management-kubectl/declarative-config.md~~ (done)
  • [x] concepts/overview/object-management-kubectl/kustomization.md (Keep current description to match actual output)
  • [x] concepts/overview/working-with-objects/common-labels.md (done)
  • [x] concepts/overview/working-with-objects/labels.md (done)
  • [x] concepts/policy/pod-security-policy.md (@oomichi https://github.com/kubernetes/website/pull/14191)
  • [x] concepts/policy/resource-quotas.md (done)
  • [x] concepts/services-networking/connect-applications-service.md (done)
  • [x] concepts/services-networking/dns-pod-service.md (done)
  • [x] concepts/services-networking/ingress.md (@oomichi https://github.com/kubernetes/website/pull/14192)
  • [x] concepts/services-networking/network-policies.md (done)
  • [x] concepts/services-networking/service.md (@oomichi https://github.com/kubernetes/website/pull/14212)
  • [x] concepts/storage/dynamic-provisioning.md (done)
  • [x] concepts/storage/persistent-volumes.md (@oomichi https://github.com/kubernetes/website/pull/14213)
  • [x] concepts/storage/storage-classes.md (@oomichi https://github.com/kubernetes/website/pull/14213)
  • [x] concepts/storage/volumes.md (done)
  • [x] concepts/storage/volume-snapshot-classes.md (done)
  • [x] concepts/storage/volume-snapshots.md (done)
  • [x] concepts/workloads/controllers/garbage-collection.md (done)
  • [x] concepts/workloads/controllers/jobs-run-to-completion.md (done)
  • [x] concepts/workloads/controllers/replicaset.md (done)
  • [x] concepts/workloads/controllers/statefulset.md (done)
  • [x] concepts/workloads/pods/init-containers.md (@oomichi https://github.com/kubernetes/website/pull/14214)
  • [x] concepts/workloads/pods/pod-lifecycle.md (done)
  • [x] concepts/workloads/pods/pod-overview.md (done)
  • [x] contribute/style/style-guide.md (done)
  • [x] getting-started-guides/fedora/fedora_manual_config.md (done)
  • [x] reference/access-authn-authz/admission-controllers.md (done)
  • [x] reference/access-authn-authz/authentication.md (@k-toyoda-pi https://github.com/kubernetes/website/pull/14195)
  • [x] reference/access-authn-authz/authorization.md (done)
  • [x] reference/access-authn-authz/bootstrap-tokens.md (done)
  • [x] reference/access-authn-authz/extensible-admission-controllers.md (done)
  • [x] reference/access-authn-authz/rbac.md (@k-toyoda-pi https://github.com/kubernetes/website/pull/14195)
  • [x] reference/access-authn-authz/webhook.md (done)
  • [x] reference/command-line-tools-reference/kubelet-tls-bootstrapping.md (@oomichi https://github.com/kubernetes/website/pull/14238)
  • [x] reference/kubectl/cheatsheet.md (done)
  • [x] reference/setup-tools/kubeadm/kubeadm-init-phase.md (done)
  • [x] reference/setup-tools/kubeadm/kubeadm-join.md (@oomichi https://github.com/kubernetes/website/pull/14238)
  • [x] reference/using-api/api-concepts.md (done)
  • [x] setup/independent/control-plane-flags.md (done)
  • [x] setup/independent/high-availability.md (done)
  • [x] setup/independent/kubelet-integration.md (done)
  • [x] setup/independent/setup-ha-etcd-with-kubeadm.md (done)
  • [x] setup/minikube.md (done)
  • [x] setup/multiple-zones.md (@k-toyoda-pi https://github.com/kubernetes/website/pull/14242)
  • [x] setup/release/notes.md (done)
  • [x] setup/windows/intro-windows-in-kubernetes.md (done)
  • [x] setup/windows/user-guide-windows-containers.md (done)
  • [x] tasks/access-application-cluster/communicate-containers-same-pod-shared-volume.md (@k-toyoda-pi)
  • [x] tasks/access-application-cluster/configure-access-multiple-clusters.md (@k-toyoda-pi)
  • [x] tasks/access-application-cluster/configure-cloud-provider-firewall.md (@k-toyoda-pi)
  • [x] tasks/access-application-cluster/ingress-minikube.md (@k-toyoda-pi)
  • [x] tasks/access-kubernetes-api/custom-resources/custom-resource-definitions.md (@oomichi https://github.com/kubernetes/website/pull/14254)
  • [x] tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning.md (done)
  • [x] tasks/administer-cluster/configure-multiple-schedulers.md (@s-ito-ts)
  • [x] tasks/administer-cluster/declare-network-policy.md (@s-ito-ts)
  • [x] tasks/administer-cluster/dns-custom-nameservers.md (@s-ito-ts)
  • [x] tasks/administer-cluster/dns-debugging-resolution.md (@s-ito-ts)
  • [x] tasks/administer-cluster/encrypt-data.md (@s-ito-ts)
  • [x] tasks/administer-cluster/kms-provider.md (@s-ito-ts)
  • [x] tasks/administer-cluster/kubeadm/kubeadm-certs.md (@s-ito-ts)
  • [x] tasks/administer-cluster/kubelet-config-file.md (@s-ito-ts)
  • [x] tasks/administer-cluster/limit-storage-consumption.md (@s-ito-ts)
  • [x] tasks/administer-cluster/namespaces.md (@s-ito-ts)
  • [x] tasks/administer-cluster/namespaces-walkthrough.md (@s-ito-ts)
  • [x] tasks/administer-cluster/reconfigure-kubelet.md (@s-ito-ts https://github.com/kubernetes/website/pull/14245)
  • [x] tasks/administer-cluster/static-pod.md (@s-ito-ts)
  • [x] tasks/administer-cluster/sysctl-cluster.md (@s-ito-ts)
  • [x] tasks/configure-pod-container/configure-gmsa.md (https://github.com/kubernetes/website/pull/14259)
  • [x] tasks/configure-pod-container/configure-persistent-volume-storage.md (https://github.com/kubernetes/website/pull/14259)
  • [x] tasks/configure-pod-container/configure-pod-configmap.md (https://github.com/kubernetes/website/pull/14259)
  • [x] tasks/configure-pod-container/configure-service-account.md
  • [x] tasks/configure-pod-container/pull-image-private-registry.md (https://github.com/kubernetes/website/pull/14259)
  • [x] tasks/debug-application-cluster/audit.md (https://github.com/kubernetes/website/pull/14260)
  • [x] tasks/debug-application-cluster/debug-application-introspection.md
  • [x] tasks/debug-application-cluster/debug-service.md
  • [x] tasks/debug-application-cluster/determine-reason-pod-failure.md
  • [x] tasks/federation/administer-federation/hpa.md
  • [x] tasks/federation/federation-service-discovery.md
  • [x] tasks/federation/set-up-cluster-federation-kubefed.md
  • [x] tasks/inject-data-application/define-environment-variable-container.md
  • [x] tasks/job/parallel-processing-expansion.md
  • [x] tasks/manage-gpus/scheduling-gpus.md (done)
  • [x] tasks/manage-hugepages/scheduling-hugepages.md (done)
  • [x] tasks/run-application/configure-pdb.md (done)
  • [x] tasks/run-application/horizontal-pod-autoscale-walkthrough.md (done)
  • [x] tasks/run-application/rolling-update-replication-controller.md (done)
  • [x] tasks/tls/managing-tls-in-a-cluster.md (done)
  • [x] tutorials/clusters/apparmor.md (done)
  • [x] tutorials/stateful-application/cassandra.md (done)
kinbug languagen

Most helpful comment

great collaboration and self-organization @oomichi @s-ito-ts @k-toyoda-pi

馃啋 馃挴

All 27 comments

working on this issue..would be a good start.

/kind bug

@Vageesha17 i see your PR #13875 was merged. Were you planning to create more PRs as part of this issue ?

I am checking whole files which contain yaml format.

@oomichi thanks for working on tidy up all this.

QQ - are you working on a particular order or you pick random pages ? -ie - you planning to finish concepts first before moving to tasks ?

/language en

@DanyC97

QQ - are you working on a particular order or you pick random pages ? -ie - you planning to finish concepts first before moving to tasks

I am working on the order from top to bottom on this Issue message at the above.
That means yes, I am concentrating on concepts pages now, then setup, tasks would be next action items.
If I can find another volunteers, they will work for setup or tasks before I finish concepts.

I've already pushed all PRs for concepts today :-)

I can work to following item.
tasks/administer-cluster/*

I checked some files. these files are no problem.

  • setup/independent/control-plane-flags.md
  • setup/independent/high-availability.md
  • setup/independent/kubelet-integration.md
  • setup/independent/setup-ha-etcd-with-kubeadm.md
  • setup/minikube.md
  • setup/windows/intro-windows-in-kubernetes.md
  • setup/windows/user-guide-windows-containers.md

Sorry. I did not tell you exactly. The following files are no problem.
authentication.md is also good.

  • reference/access-authn-authz/authentication.md
  • reference/access-authn-authz/authorization.md
  • reference/access-authn-authz/bootstrap-tokens.md
  • reference/access-authn-authz/extensible-admission-controllers.md
  • reference/access-authn-authz/webhook.md

I've already pushed all PRs for concepts today :-)

yeah, i keep an eye on it ;)

@DanyC97

yeah, i keep an eye on it ;)

Thank you so much :-)

@s-ito-ts

I can work to following item.
tasks/administer-cluster/*

Thanks :-)
I did put your name on the above list.

@k-toyoda-pi

I checked some files. these files are no problem.

Thanks for checking these files.
Your list you mentioned doesn't contain the following file under setup

  • setup/multiple-zones.md
  • setup/release/notes.md

Does it mean these files contain this issue and you will fix them, right ? :-)

Cool, we have done under reference today.

@oomichi

Does it mean these files contain this issue and you will fix them, right ? :-)

OK. I will fix "setup/multiple-zones.md".
But "setup/release/notes.md" may have no problem as scope of this issue, because a part like yaml is bullet points actually. I think that converting to bullet point is strange.

https://kubernetes.io/docs/setup/release/notes/#other-notable-changes-2

  • This change ensures that volumes get provisioned based on the zone information provided in allowedTopologies.

I can work to

  • tasks/access-application-cluster/*

@s-ito-ts Your latest PR fixes tasks/administer-cluster/reconfigure-kubelet.md only under tasks/administer-cluster/. Don't the other files under tasks/administer-cluster/ contain this problem?
I'd like to update the status for each file based on your input.

My working items in this issue has been done :-)

@oomichi

Your latest PR fixes tasks/administer-cluster/reconfigure-kubelet.md only under tasks/administer-cluster/. Don't the other files under tasks/administer-cluster/ contain this problem?
I'd like to update the status for each file based on your input.

I had finished fixes of this problem under tasks/administer-cluster/.
Some yaml were created from files under the examples/admin/.
So, I fixed the files under examples/admin/ instead of the files under tasks/administer-cluster/.

@s-ito-ts

I had finished fixes of this problem under tasks/administer-cluster/.
Some yaml were created from files under the examples/admin/.

Thanks for your confirmation. I have marked these items as done on the above list.

@k-toyoda-pi

The last piece is tasks/access-application-cluster/ which you are assigned.
Is it possible to make it?

re: concepts/overview/object-management-kubectl/kustomization.md (TODO: need to check kubectl kustomize ./ output)

I tried to run kustomize and the output like

$ kubectl kustomize ./
apiVersion: v1
data:
  application.properties: |
    FOO=Bar
kind: ConfigMap
metadata:
  name: example-configmap-1-8mbdf7882g
$

That is the same as current doc, so I keep current doc for avoiding readers' confusion.

https://github.com/kubernetes/website/pull/14246 fixed the remaining things.
So we have finished this issue, thank you everyone so much :-)

great collaboration and self-organization @oomichi @s-ito-ts @k-toyoda-pi

馃啋 馃挴

@DanyC97 Thank you so much :-)

Was this page helpful?
0 / 5 - 0 ratings