Skip to content

Commit 382649b

Browse files
Merge pull request #2 from Nordix/init-mael
⚠️ Creation of CRDs and controller
2 parents 57e4493 + 2d796ff commit 382649b

File tree

128 files changed

+12071
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+12071
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Tell us about a problem you are experiencing
4+
5+
---
6+
7+
**What steps did you take and what happened:**
8+
[A clear and concise description on how to REPRODUCE the bug.]
9+
10+
11+
**What did you expect to happen:**
12+
13+
14+
**Anything else you would like to add:**
15+
[Miscellaneous information that will assist in solving the issue.]
16+
17+
18+
**Environment:**
19+
20+
- Cluster-api version:
21+
- CAPM3 version:
22+
- IPAM version:
23+
- Minikube version:
24+
- environment (metal3-dev-env or other):
25+
- Kubernetes version: (use `kubectl version`):
26+
27+
/kind bug
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature addition
3+
about: Suggest and track an idea for this project
4+
5+
---
6+
7+
**User Story**
8+
9+
As a [developer/user/operator] I would like to [high level description] for [reasons]
10+
11+
**Detailed Description**
12+
13+
[A clear and concise description of what you want to happen.]
14+
15+
**Anything else you would like to add:**
16+
17+
[Miscellaneous information that will assist in solving the issue.]
18+
19+
/kind feature

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- please add a icon to the title of this PR (see https://sigs.k8s.io/cluster-api/VERSIONING.md), and delete this line and similar ones -->
2+
<!-- the icon will be either ⚠️ (:warning:, major or breaking changes), ✨ (:sparkles:, minor or feature additions), 🐛 (:bug:, patch and bugfixes), 📖 (:book:, documentation or proposals), or 🏃 (:running:, other) -->
3+
4+
**What this PR does / why we need it**:
5+
6+
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
7+
Fixes #

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, build with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
bin/*
15+
hack/tools/bin/*
16+
examples/_out/*
17+
examples/provider-components/*-components.yaml
18+
out/*

.mdlrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Disable line-length for some code examples in getting-started
2+
rules "~MD013", "~MD005"

CONTRIBUTING.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# How to Contribute
2+
3+
Metal3 projects are [Apache 2.0 licensed](LICENSE) and accept contributions via
4+
GitHub pull requests. Those guidelines are the same as the
5+
[Cluster API guidelines](https://github.com/kubernetes-sigs/cluster-api/blob/master/CONTRIBUTING.md)
6+
7+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
8+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
9+
10+
- [Certificate of Origin](#certificate-of-origin)
11+
- [Finding Things That Need Help](#finding-things-that-need-help)
12+
- [Contributing a Patch](#contributing-a-patch)
13+
- [Backporting a Patch](#backporting-a-patch)
14+
- [Merge Approval](#merge-approval)
15+
- [Google Doc Viewing Permissions](#google-doc-viewing-permissions)
16+
- [Issue and Pull Request Management](#issue-and-pull-request-management)
17+
18+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
19+
20+
## Certificate of Origin
21+
22+
By contributing to this project you agree to the Developer Certificate of
23+
Origin (DCO). This document was created by the Linux Kernel community and is a
24+
simple statement that you, as a contributor, have the legal right to make the
25+
contribution. See the [DCO](DCO) file for details.
26+
27+
## Finding Things That Need Help
28+
29+
If you're new to the project and want to help, but don't know where to start, we
30+
have a semi-curated list of issues that
31+
should not need deep knowledge of the system. [Have a look and see if anything
32+
sounds interesting](https://github.com/metal3-io/cluster-api-provider-metal3/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
33+
Alternatively, read some of the docs on other controllers and try to write your
34+
own, file and fix any/all issues that come up, including gaps in documentation!
35+
36+
## Contributing a Patch
37+
38+
1. If you haven't already done so, sign a Contributor License Agreement (see
39+
details above).
40+
1. Fork the desired repo, develop and test your code changes.
41+
1. Submit a pull request.
42+
43+
All code PR must be labeled with one of
44+
45+
- ⚠️ (:warning:, major or breaking changes)
46+
- ✨ (:sparkles:, minor or feature additions)
47+
- 🐛 (:bug:, patch and bugfixes)
48+
- 📖 (:book:, documentation or proposals)
49+
- 🏃 (:running:, other)
50+
51+
All changes must be code reviewed. Coding conventions and standards are
52+
explained in the official [developer
53+
docs](https://github.com/kubernetes/community/tree/master/contributors/devel).
54+
Expect reviewers to request that you
55+
avoid common [go style
56+
mistakes](https://github.com/golang/go/wiki/CodeReviewComments) in your PRs.
57+
58+
## Backporting a Patch
59+
60+
Cluster API maintains older versions through `release-X.Y` branches. We accept
61+
backports of bug fixes to the most recent
62+
release branch. For example, if the most recent branch is `release-0.2`, and the
63+
`master` branch is under active
64+
development for v0.3.0, a bug fix that merged to `master` that also affects
65+
`v0.2.x` may be considered for backporting
66+
to `release-0.2`. We generally do not accept PRs against older release branches.
67+
68+
## Breaking Changes
69+
70+
Breaking changes are generally allowed in the `master` branch, as this is the
71+
branch used to develop the next minor release of Cluster API.
72+
73+
There may be times, however, when `master` is closed for breaking changes. This
74+
is likely to happen as we near the release of a new minor version.
75+
76+
Breaking changes are not allowed in release branches, as these represent minor
77+
versions that have already been released.
78+
These versions have consumers who expect the APIs, behaviors, etc. to remain
79+
stable during the life time of the patch stream for the minor release.
80+
81+
Examples of breaking changes include:
82+
83+
- Removing or renaming a field in a CRD
84+
- Removing or renaming a CRD
85+
- Removing or renaming an exported constant, variable, type, or function
86+
- Updating the version of critical libraries such as controller-runtime,
87+
client-go, apimachinery, etc.
88+
- Some version updates may be acceptable, for picking up bug fixes, but
89+
maintainers must exercise caution when reviewing.
90+
91+
There may, at times, need to be exceptions where breaking changes are allowed in
92+
release branches. These are at the discretion of the project's maintainers, and
93+
must be carefully considered before merging. An example of an allowed
94+
breaking change might be a fix for a behavioral bug that was released in an
95+
initial minor version (such as `v0.3.0`).
96+
97+
### Merge Approval
98+
99+
Please see the [Kubernetes community document on pull
100+
requests](https://git.k8s.io/community/contributors/guide/pull-requests.md) for
101+
more information about the merge process.
102+
103+
### Google Doc Viewing Permissions
104+
105+
To gain viewing permissions to google docs in this project, please join the
106+
[metal3-dev](https://groups.google.com/forum/#!forum/metal3-dev) google
107+
group.
108+
109+
### Issue and Pull Request Management
110+
111+
Anyone may comment on issues and submit reviews for pull requests. However, in
112+
order to be assigned an issue or pull request, you must be a member of the
113+
[Metal3-io organization](https://github.com/metal3-io) GitHub organization.
114+
115+
Metal3 maintainers can assign you an issue or pull request by leaving a
116+
`/assign <your Github ID>` comment on the issue or pull request.

DCO

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
1 Letterman Drive
6+
Suite D4700
7+
San Francisco, CA, 94129
8+
9+
Everyone is permitted to copy and distribute verbatim copies of this
10+
license document, but changing it is not allowed.
11+
12+
13+
Developer's Certificate of Origin 1.1
14+
15+
By making a contribution to this project, I certify that:
16+
17+
(a) The contribution was created in whole or in part by me and I
18+
have the right to submit it under the open source license
19+
indicated in the file; or
20+
21+
(b) The contribution is based upon previous work that, to the best
22+
of my knowledge, is covered under an appropriate open source
23+
license and I have the right under that license to submit that
24+
work with modifications, whether created in whole or in part
25+
by me, under the same open source license (unless I am
26+
permitted to submit under a different license), as indicated
27+
in the file; or
28+
29+
(c) The contribution was provided directly to me by some other
30+
person who certified (a), (b) or (c) and I have not modified
31+
it.
32+
33+
(d) I understand and agree that this project and the contribution
34+
are public and that a record of the contribution (including all
35+
personal information I submit with it, including my sign-off) is
36+
maintained indefinitely and may be redistributed consistent with
37+
this project or the open source license(s) involved.

Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright 2019 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Build the manager binary on golang image
16+
FROM registry.hub.docker.com/library/golang:1.13 as builder
17+
WORKDIR /workspace
18+
19+
# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy
20+
ARG goproxy=https://proxy.golang.org
21+
ENV GOPROXY=$goproxy
22+
23+
# Copy the Go Modules manifests
24+
COPY go.mod go.mod
25+
COPY go.sum go.sum
26+
# Cache deps before building and copying source so that we don't need to re-download as much
27+
# and so that source changes don't invalidate our downloaded layer
28+
RUN go mod download
29+
30+
# Copy the sources
31+
COPY main.go main.go
32+
COPY api/ api/
33+
COPY ipam/ ipam/
34+
COPY controllers/ controllers/
35+
36+
# Build
37+
ARG ARCH
38+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
39+
go build -a -ldflags '-extldflags "-static"' \
40+
-o manager .
41+
42+
# Copy the controller-manager into a thin image
43+
FROM gcr.io/distroless/static:latest
44+
WORKDIR /
45+
COPY --from=builder /workspace/manager .
46+
USER nobody
47+
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)