What is the canonical YAML naming style
Kubernetes using camelCase: https://kubernetes.io/docs/user-guide/jobs/
apiVersion
, restartPolicy
CircleCI using snake_case: https://circleci.com/docs/1.0/configuration/
working_directory
restore_cache
, store_artifacts
Jenkins with dash-case: https://github.com/jenkinsci/yaml-project-plugin/blob/master/samples/google-cloud-storage/.jenkins.yaml
stapler-class
So it looks like projects and teams use their own conventions and there is no one definite standard.
Use the standard dictated by the surrounding software.
For example, in my current project the YAML file contains default values for Python attributes. Since the names used in YAML appear in the associated Python API, it is clear that on this particular project, the YAML names should obey the Python lower_case_with_underscores
naming convention per PEP-8.
My next project might have a different prevailing naming convention, in which case I will use that in the associated YAML files.