Skip to content
Permalink
Browse files

Add template files and boilerplate headers (#498)

* Add template files

* Add script to verify copyright boilerplate

* Add boilerplate headers to all files

* Fix lint tests
  • Loading branch information...
nikhita authored and kubermatic-bot committed Apr 24, 2019
1 parent b9af737 commit 9f8747e322c345e5db002ddba48e097ebcdaf445
Showing with 2,188 additions and 3 deletions.
  1. +58 −0 CONTRIBUTING.md
  2. +36 −0 DCO
  3. +14 −0 Dockerfile
  4. +14 −0 Makefile
  5. +5 −0 NOTICE
  6. +34 −1 README.md
  7. +15 −0 Zenhub.md
  8. +1 −1 cmd/controller/main.go
  9. +16 −0 cmd/webhook/main.go
  10. +37 −0 code-of-conduct.md
  11. +15 −0 hack/boilerplate.go.txt
  12. +14 −0 hack/boilerplate/boilerplate.Dockerfile.txt
  13. +14 −0 hack/boilerplate/boilerplate.Makefile.txt
  14. +14 −0 hack/boilerplate/boilerplate.bzl.txt
  15. +16 −0 hack/boilerplate/boilerplate.generatego.txt
  16. +16 −0 hack/boilerplate/boilerplate.go.txt
  17. +234 −0 hack/boilerplate/boilerplate.py
  18. +16 −0 hack/boilerplate/boilerplate.py.txt
  19. +13 −0 hack/boilerplate/boilerplate.sh.txt
  20. +19 −0 hack/boilerplate/test/fail.go
  21. +17 −0 hack/boilerplate/test/fail.py
  22. +17 −0 hack/boilerplate/test/pass.go
  23. +17 −0 hack/boilerplate/test/pass.py
  24. +14 −0 hack/build-kubevirt-images.sh
  25. +14 −0 hack/ci-e2e-test.sh
  26. +14 −0 hack/run-machine-controller.sh
  27. +14 −0 hack/update-fixtures.sh
  28. +35 −0 hack/verify-boilerplate.sh
  29. +14 −0 hack/verify-type-revision-annotation-const.sh
  30. +14 −0 image-builder/build.sh
  31. +14 −0 image-builder/download_kubernetes.sh
  32. +16 −0 pkg/admission/admission.go
  33. +16 −0 pkg/admission/machinedeployments.go
  34. +16 −0 pkg/admission/machinedeployments_test.go
  35. +16 −0 pkg/admission/machinedeployments_validation.go
  36. +16 −0 pkg/admission/machines.go
  37. +16 −0 pkg/apis/cluster/v1alpha1/conversions/conversions.go
  38. +16 −0 pkg/apis/cluster/v1alpha1/conversions/conversions_test.go
  39. +16 −0 pkg/apis/cluster/v1alpha1/conversions/providerconfig_to_providerspec.go
  40. +16 −0 pkg/apis/cluster/v1alpha1/conversions/providerconfig_to_providerspec_test.go
  41. +16 −0 pkg/apis/cluster/v1alpha1/migrations/migrations.go
  42. +16 −0 pkg/cloudprovider/cache/cloudprovidercache.go
  43. +16 −0 pkg/cloudprovider/cache/cloudprovidercache_test.go
  44. +16 −0 pkg/cloudprovider/cloud/provider.go
  45. +16 −0 pkg/cloudprovider/common/ssh/ssh.go
  46. +16 −0 pkg/cloudprovider/errors/errors.go
  47. +16 −0 pkg/cloudprovider/instance/instance.go
  48. +16 −0 pkg/cloudprovider/provider.go
  49. +16 −0 pkg/cloudprovider/provider/aws/cloudconfig.go
  50. +16 −0 pkg/cloudprovider/provider/aws/cloudconfig_test.go
  51. +16 −0 pkg/cloudprovider/provider/aws/provider.go
  52. +16 −0 pkg/cloudprovider/provider/azure/cloudconfig.go
  53. +16 −0 pkg/cloudprovider/provider/azure/create_delete_resources.go
  54. +16 −0 pkg/cloudprovider/provider/azure/get_client.go
  55. +16 −0 pkg/cloudprovider/provider/azure/provider.go
  56. +16 −0 pkg/cloudprovider/provider/digitalocean/provider.go
  57. +16 −0 pkg/cloudprovider/provider/fake/provider.go
  58. +16 −0 pkg/cloudprovider/provider/gce/cloudconfig.go
  59. +16 −0 pkg/cloudprovider/provider/gce/cloudconfig_test.go
  60. +16 −0 pkg/cloudprovider/provider/gce/config.go
  61. +16 −0 pkg/cloudprovider/provider/gce/instance.go
  62. +16 −0 pkg/cloudprovider/provider/gce/provider.go
  63. +16 −0 pkg/cloudprovider/provider/gce/service.go
  64. +16 −0 pkg/cloudprovider/provider/hetzner/provider.go
  65. +16 −0 pkg/cloudprovider/provider/kubevirt/provider.go
  66. +16 −0 pkg/cloudprovider/provider/linode/provider.go
  67. +16 −0 pkg/cloudprovider/provider/openstack/cloudconfig.go
  68. +16 −0 pkg/cloudprovider/provider/openstack/cloudconfig_test.go
  69. +16 −0 pkg/cloudprovider/provider/openstack/helper.go
  70. +16 −0 pkg/cloudprovider/provider/openstack/provider.go
  71. +16 −0 pkg/cloudprovider/provider/vsphere/cloudconfig.go
  72. +16 −0 pkg/cloudprovider/provider/vsphere/cloudconfig_test.go
  73. +16 −0 pkg/cloudprovider/provider/vsphere/helper.go
  74. +16 −0 pkg/cloudprovider/provider/vsphere/provider.go
  75. +16 −0 pkg/cloudprovider/validationwrapper.go
  76. +16 −0 pkg/clusterinfo/configmap.go
  77. +16 −0 pkg/clusterinfo/configmap_test.go
  78. +16 −0 pkg/controller/machine/kubeconfig.go
  79. +16 −0 pkg/controller/machine/kubeconfig_test.go
  80. +1 −1 pkg/controller/machine/machine.go
  81. +16 −0 pkg/controller/machine/machine_test.go
  82. +16 −0 pkg/controller/machine/metrics.go
  83. +16 −0 pkg/health/readiness.go
  84. +16 −0 pkg/ini/duration.go
  85. +16 −0 pkg/ini/escape.go
  86. +16 −0 pkg/ini/escape_test.go
  87. +16 −0 pkg/kubernetes/helper.go
  88. +16 −0 pkg/machines/register.go
  89. +16 −0 pkg/machines/v1alpha1/register.go
  90. +16 −0 pkg/machines/v1alpha1/types.go
  91. +16 −0 pkg/machines/v1alpha1/zz_generated.deepcopy.go
  92. +16 −0 pkg/node/eviction/eviction.go
  93. +16 −0 pkg/node/eviction/eviction_test.go
  94. +16 −0 pkg/providerconfig/types.go
  95. +16 −0 pkg/providerconfig/types_test.go
  96. +16 −0 pkg/test/helper.go
  97. +16 −0 pkg/userdata/centos/provider.go
  98. +16 −0 pkg/userdata/centos/provider_test.go
  99. +16 −0 pkg/userdata/cloud/provider.go
  100. +16 −0 pkg/userdata/convert/gzip.go
  101. +16 −0 pkg/userdata/convert/ignition-converter.go
  102. +16 −0 pkg/userdata/coreos/provider.go
  103. +16 −0 pkg/userdata/coreos/provider_test.go
  104. +16 −0 pkg/userdata/helper/common_test.go
  105. +16 −0 pkg/userdata/helper/download_binaries_script.go
  106. +16 −0 pkg/userdata/helper/download_binaries_script_test.go
  107. +16 −0 pkg/userdata/helper/helper.go
  108. +16 −0 pkg/userdata/helper/kubelet.go
  109. +16 −0 pkg/userdata/helper/kubelet_test.go
  110. +16 −0 pkg/userdata/helper/template_functions.go
  111. +16 −0 pkg/userdata/ubuntu/provider.go
  112. +16 −0 pkg/userdata/ubuntu/provider_test.go
  113. +16 −0 test/e2e/provisioning/all_e2e_test.go
  114. +16 −0 test/e2e/provisioning/deploymentscenario.go
  115. +16 −0 test/e2e/provisioning/helper.go
  116. +16 −0 test/e2e/provisioning/migrateuidscenario.go
  117. +16 −0 test/e2e/provisioning/verify.go
  118. +14 −0 test/tools/integration/Makefile
  119. +14 −0 test/tools/integration/cleanup_machines.sh
  120. +14 −0 test/tools/integration/provision_master.sh
@@ -0,0 +1,58 @@
# How to Contribute

Loodse projects are [Apache 2.0 licensed](LICENSE) and accept contributions via
GitHub pull requests. This document outlines some of the conventions on
development workflow, commit message formatting, contact points and other
resources to make it easier to get your contribution accepted.

## Certificate of Origin

By contributing to this project you agree to the Developer Certificate of
Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution. See the [DCO](DCO) file for details.

Any copyright notices in this repo should specify the authors as "the Loodse XXX project contributors".

To sign your work, just add a line like this at the end of your commit message:

```
Signed-off-by: Joe Example <joe@example.com>
```

This can easily be done with the `--signoff` option to `git commit`.

By doing this you state that you can certify the following (from https://developercertificate.org/):

## Email and Chat

The XXX project currently uses the general Loodse email list and Slack channel:
- Email: [loodse-dev](https://groups.google.com/forum/#!forum/loodse-dev)
- Slack: #kubermatic channel on [Kubermatic Slack]((http://slack.kubermatic.io/))

Please avoid emailing maintainers found in the MAINTAINERS file directly. They
are very busy and read the mailing lists.

## Reporting a security vulnerability

Due to their public nature, GitHub and mailing lists are not appropriate places for reporting vulnerabilities. If you suspect you have found a security vulnerability in rkt, please do not file a GitHub issue, but instead email security@loodse.com with the full details, including steps to reproduce the issue.


## Getting Started

- Fork the repository on GitHub
- Read the [README](README.md) for build and test instructions
- Play with the project, submit bugs, submit patches!

### Contribution Flow

This is a rough outline of what a contributor's workflow looks like:

- Create a topic branch from where you want to base your work (usually master).
- Make commits of logical units.
- Make sure your commit messages are in the proper format (see below).
- Push your changes to a topic branch in your fork of the repository.
- Make sure the tests pass, and add any new tests as appropriate.
- Submit a pull request to the original repository.

Thanks for your contributions!
36 DCO
@@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
@@ -1,3 +1,17 @@
# Copyright 2019 The Machine Controller Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM alpine:3.7

RUN apk add --no-cache ca-certificates cdrkit
@@ -1,3 +1,17 @@
# Copyright 2019 The Machine Controller Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

SHELL = /bin/bash

GO_VERSION = 1.10.3
5 NOTICE
@@ -0,0 +1,5 @@
Loodse Project
Copyright 2019 Loodse GmbH

This product includes software developed at Loodse GmbH.
(http://www.loodse.com/).
@@ -11,9 +11,12 @@
- [OpenStack images](/docs/openstack-images.md)
- [Container runtimes](/docs/container_runtime.md)
- [Development](#development)

- E2E
- [Infra](/docs/e2e-infra.md)

- [TroubleShooting](#troubleshooting)
- [Contributing](#contributing)
- [Changelog](#changelog)

# Features
## What works
@@ -114,3 +117,33 @@ __Note:__ After finishing testing, please clean up after yourself:

You can also insert your ssh key into the created instances by editing the manifests in
[`test/e2e/provisioning/testdata/`](test/e2e/provisioning/testdata)

# Troubleshooting

If you encounter issues [file an issue][1] or talk to us on the [#kubermatic channel][2] on the [Kubermatic Slack][3].

# Contributing

Thanks for taking the time to join our community and start contributing!

### Before you start

* Please familiarize yourself with the [Code of Conduct][4] before contributing.
* See [CONTRIBUTING.md][5] for instructions on the developer certificate of origin that we require.
* Read how [we're using ZenHub][6] for project and roadmap planning

### Pull requests

* We welcome pull requests. Feel free to dig through the [issues][1] and jump in.

# Changelog

See [the list of releases][7] to find out about feature changes.

[1]: https://github.com/kubermatic/machine-controller/issues
[2]: https://kubermatic.slack.com/messages/kubermatic
[3]: http://slack.kubermatic.io/
[4]: code-of-conduct.md
[5]: CONTRIBUTING.md
[6]: Zenhub.md
[7]: https://github.com/kubermatic/machine-controller/releases
@@ -0,0 +1,15 @@
# ZenHub

As an Open Source community, it is necessary for our work, communication, and collaboration to be done in the open.
GitHub provides a central repository for code, pull requests, issues, and documentation. When applicable, we will use Google Docs for design reviews, proposals, and other working documents.

While GitHub issues, milestones, and labels generally work pretty well, the Loodse team has found that product planning requires some additional tooling that GitHub projects do not offer.

In our effort to minimize tooling while enabling product management insights, we have decided to use [ZenHub Open-Source](https://www.zenhub.com/blog/open-source/) to overlay product and project tracking on top of GitHub.
ZenHub is a GitHub application that provides Kanban visualization, Epic tracking, fine-grained prioritization, and more. It's primary backing storage system is existing GitHub issues along with additional metadata stored in ZenHub's database.

If you are an user or Developer, you do not _need_ to use ZenHub for your regular workflow (e.g to see open bug reports or feature requests, work on pull requests). However, if you'd like to be able to visualize the high-level project goals and roadmap, you will need to use the free version of ZenHub.

## Using ZenHub

ZenHub can be integrated within the GitHub interface using their [Chrome or FireFox extensions](https://www.zenhub.com/extension). In addition, you can use their dedicated web application.
@@ -1,5 +1,5 @@
/*
Copyright 2017 The Kubernetes Authors.
Copyright 2019 The Machine Controller Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -1,3 +1,19 @@
/*
Copyright 2019 The Machine Controller Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package main

import (
@@ -0,0 +1,37 @@
# Loodse Community Code of Conduct

## Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering
an open and welcoming community, we pledge to respect all people who contribute
through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic addresses,
without explicit permission
* Other unethical or unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are not
aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers
commit themselves to fairly and consistently applying these principles to every aspect
of managing this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Loodse Conduct Committee via coc@loodse.com.

This Code of Conduct is adapted from the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) and [Contributor Covenant](http://contributor-covenant.org/version/1/2/0/), version 1.2.0.
@@ -0,0 +1,15 @@
/*
Copyright YEAR The Machine Controller Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -0,0 +1,14 @@
# Copyright YEAR The Machine Controller Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

@@ -0,0 +1,14 @@
# Copyright YEAR The Machine Controller Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

@@ -0,0 +1,14 @@
# Copyright YEAR The Machine Controller Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

@@ -0,0 +1,16 @@
/*
Copyright The Machine Controller Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

@@ -0,0 +1,16 @@
/*
Copyright YEAR The Machine Controller Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

0 comments on commit 9f8747e

Please sign in to comment.
You can’t perform that action at this time.