Skip to content

Commit c70301d

Browse files
authored
Merge pull request #281 from justaugustus/v1alpha2-reintegrate
Deploy Azure clusters via v1alpha2 APIs
2 parents 60b7c60 + 03c82d0 commit c70301d

File tree

4,011 files changed

+8876
-1232534
lines changed

Some content is hidden

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

4,011 files changed

+8876
-1232534
lines changed

.bazelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.dockerignore

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
generatedconfigs/
2-
.env
3-
kubeconfig
4-
minikube.kubeconfig
5-
.travis.yml
1+
.git
2+
.github
3+
.vscode
4+
bin/
5+
config/
6+
hack/
7+
docs/
8+
examples/
9+
scripts/
10+
**/.md

.gitignore

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,22 @@ bin
2424
envfile
2525

2626
# kubeconfigs
27-
/kind.kubeconfig
28-
/minikube.kubeconfig
29-
/kubeconfig
30-
31-
# binaries
32-
/manager
33-
/clusterctl
34-
/clusterazureadm
27+
kind.kubeconfig
28+
minikube.kubeconfig
29+
kubeconfig
3530

3631
# Example and binary output directory
3732
/out
3833

39-
# bazel
40-
/bazel-bin
41-
/bazel-cluster-api-provider-azure
42-
/bazel-genfiles
43-
/bazel-out
44-
/bazel-testlogs
45-
4634
# vscode
4735
.vscode
48-
.idea
4936

5037
# goland
5138
.idea
5239

5340
# Ignore output manifests
54-
cmd/clusterctl/examples/azure/out
55-
cmd/clusterctl/examples/azure/provider-components-base.yaml
41+
examples/_out
42+
examples/provider-components-base.yaml
43+
examples/provider-components/provider-components-*.yaml
44+
config/samples
45+
manager_image_patch.yaml-e

.golangci.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
1-
linters-settings:
2-
govet:
3-
check-shadowing: true
4-
gocyclo:
5-
min-complexity: 19
6-
maligned:
7-
suggest-new: true
81
linters:
92
enable:
103
- golint
114
- govet
125
- gofmt
13-
- goimports
146
- structcheck
157
- varcheck
168
- interfacer
179
- unconvert
1810
- ineffassign
1911
- goconst
20-
- gocyclo
12+
# - gocyclo
2113
- maligned
2214
- misspell
2315
- nakedret

BUILD.bazel

Lines changed: 0 additions & 93 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,74 @@
11
# Contributing Guidelines
2+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
3+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
24

3-
Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt:
45

5-
_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._
6+
- [Contributor License Agreements](#contributor-license-agreements)
7+
- [Finding Things That Need Help](#finding-things-that-need-help)
8+
- [Contributing a Patch](#contributing-a-patch)
9+
- [Backporting a Patch](#backporting-a-patch)
10+
- [Merge Approval](#merge-approval)
11+
- [Google Doc Viewing Permissions](#google-doc-viewing-permissions)
12+
- [Issue and Pull Request Management](#issue-and-pull-request-management)
613

7-
## Getting Started
14+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
815

9-
We have full documentation on how to get started contributing here:
16+
Read the following guide if you're interested in contributing to cluster-api.
1017

11-
<!---
12-
If your repo has certain guidelines for contribution, put them here ahead of the general k8s resources
13-
-->
18+
## Contributor License Agreements
1419

15-
- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
16-
- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing)
17-
- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers
20+
We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles.
21+
22+
Please fill out either the individual or corporate Contributor License Agreement (CLA). More information about the CLA and instructions for signing it [can be found here](https://github.com/kubernetes/community/blob/master/CLA.md).
23+
24+
***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the repository.
25+
26+
## Finding Things That Need Help
27+
28+
If you're new to the project and want to help, but don't know where to start, we have a semi-curated list of issues that should not need deep knowledge of the system. [Have a look and see if anything sounds interesting](https://github.com/kubernetes-sigs/cluster-api-provider-azure/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). Alternatively, read some of the docs on other controllers and try to write your own, file and fix any/all issues that come up, including gaps in documentation!
29+
30+
## Contributing a Patch
31+
32+
1. If you haven't already done so, sign a Contributor License Agreement (see details above).
33+
1. Fork the desired repo, develop and test your code changes.
34+
1. Submit a pull request.
35+
1. All code PR must be labeled with
36+
⚠️ (:warning:, major or breaking changes), ✨ (:sparkles:, minor or feature additions), 🐛 (:bug:, patch and bugfixes), 📖 (:book:, documentation or proposals), or 🏃 (:running:, other)
37+
38+
All changes must be code reviewed. Coding conventions and standards are explained in the official [developer docs](https://github.com/kubernetes/community/tree/master/contributors/devel). Expect reviewers to request that you avoid common [go style mistakes](https://github.com/golang/go/wiki/CodeReviewComments) in your PRs.
39+
40+
## Backporting a Patch
41+
42+
Cluster API ships older versions through `release-X.X` branches, usually backports are reserved to critical bug-fixes.
43+
Some release branches might ship with both Go modules and dep (e.g. `release-0.1`), users backporting patches should always make sure
44+
that the vendored Go modules dependencies match the Gopkg.lock and Gopkg.toml ones by running `dep ensure`
45+
46+
### Merge Approval
47+
48+
Cluster API maintainers may add "LGTM" (Looks Good To Me) or an equivalent comment to indicate that a PR is acceptable. Any change requires at least one LGTM. No pull requests can be merged until at least one Cluster API maintainer signs off with an LGTM.
49+
50+
### Google Doc Viewing Permissions
51+
52+
To gain viewing permissions to google docs in this project, please join either the [kubernetes-dev](https://groups.google.com/forum/#!forum/kubernetes-dev) or [kubernetes-sig-cluster-lifecycle](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle) google group.
53+
54+
### Issue and Pull Request Management
55+
56+
Anyone may comment on issues and submit reviews for pull requests. However, in
57+
order to be assigned an issue or pull request, you must be a member of the
58+
[Kubernetes SIGs](https://github.com/kubernetes-sigs) GitHub organization.
59+
60+
If you are a Kubernetes GitHub organization member, you are eligible for
61+
membership in the Kubernetes SIGs GitHub organization and can request
62+
membership by [opening an issue](https://github.com/kubernetes/org/issues/new?template=membership.md&title=REQUEST%3A%20New%20membership%20for%20%3Cyour-GH-handle%3E)
63+
against the kubernetes/org repo.
64+
65+
However, if you are a member of any of the related Kubernetes GitHub
66+
organizations but not of the Kubernetes org, you will need explicit sponsorship
67+
for your membership request. You can read more about Kubernetes membership and
68+
sponsorship [here](https://github.com/kubernetes/community/blob/master/community-membership.md).
69+
70+
Cluster API maintainers can assign you an issue or pull request by leaving a
71+
`/assign <your Github ID>` comment on the issue or pull request.
1872

1973
## Mentorship
2074

Dockerfile

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,32 @@
1313
# limitations under the License.
1414

1515
# Build the manager binary
16-
FROM golang:1.12 as builder
16+
FROM golang:1.12.9 as builder
17+
WORKDIR /workspace
1718

18-
# Copy in the go src
19-
WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-azure
20-
COPY pkg/ pkg/
21-
COPY cmd/ cmd/
22-
COPY vendor/ vendor/
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 ./ ./
2332

2433
# Build
25-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager sigs.k8s.io/cluster-api-provider-azure/cmd/manager
34+
ARG ARCH
35+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
36+
go build -a -ldflags '-extldflags "-static"' \
37+
-o manager .
2638

2739
# Copy the controller-manager into a thin image
28-
FROM gcr.io/distroless/base
29-
WORKDIR /root/
30-
COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-azure/manager .
31-
ENTRYPOINT ["./manager"]
40+
FROM gcr.io/distroless/static:latest
41+
WORKDIR /
42+
COPY --from=builder /workspace/manager .
43+
USER nobody
44+
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)