Skip to content

Commit acd1715

Browse files
author
Phillip Wittrock
authored
Merge branch 'master' into fix_help_for_init
2 parents cdd95c6 + e34588a commit acd1715

File tree

5,310 files changed

+58006
-448666
lines changed

Some content is hidden

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

5,310 files changed

+58006
-448666
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
.idea/
2+
3+
# Not check in node_modules to a specific arch and os.
4+
docs/book/node_modules/

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ install:
2222
-
2323

2424
script:
25-
- TRACE=1 ./test.sh
25+
- TRACE=1 ./testv0.sh
2626
- ./test_existing_projects.sh
27+
- TRACE=1 ./testv1.sh
2728

2829
# TBD. Suppressing for now.
2930
notifications:

CONTRIBUTING.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
## Sign the CLA
44

55
Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests.
6-
Please see https://git.k8s.io/community/CLA.md for more info
76

8-
### Contributing A Patch
7+
Please see https://git.k8s.io/community/CLA.md for more info.
8+
9+
## Contributing steps
910

1011
1. Submit an issue describing your proposed change to the repo in question.
1112
1. The [repo owners](OWNERS) will respond to your issue promptly.
@@ -15,31 +16,29 @@ Please see https://git.k8s.io/community/CLA.md for more info
1516

1617
## How to build kubebuilder locally
1718

18-
Setup:
19-
20-
- Download [google container builder](https://cloud.google.com/container-builder/docs/build-debug-locally)
21-
- Export `OUTPUT` to a location to write the directory containing the final build artifacts
22-
23-
```sh
24-
export OUTPUT=/tmp/kubebuilder
25-
```
26-
27-
Run container-builder:
28-
29-
```sh
30-
container-builder-local --config=build/cloudbuild_local.yaml --dryrun=false \
31-
--write-workspace=$OUTPUT .
32-
```
33-
34-
Extract `tar.gz` from $OUTPUT to /usr/local
35-
36-
## Running kubebuilder tests
37-
38-
```sh
39-
go test ./pkg/...
40-
```
41-
42-
## Community, discussion, contribution, and support
19+
1. Setup tools
20+
1. Download and setup [gcloud](https://cloud.google.com/sdk/docs/downloads-interactive)
21+
1. Install `cloud-build-local` via `gcloud`
22+
```bash
23+
$ gcloud install cloud-build-local
24+
```
25+
1. Build
26+
1. Export `OUTPUT` to a location to write the directory containing the final build artifacts
27+
```sh
28+
$ export OUTPUT=/tmp/kubebuilder
29+
```
30+
2. Run container-builder:
31+
```sh
32+
$ cloud-build-local --config=build/cloudbuild_local.yaml --dryrun=false \
33+
--write-workspace=$OUTPUT .
34+
```
35+
1. Extract `tar.gz` from $OUTPUT to /usr/local
36+
1. Test
37+
```sh
38+
go test ./pkg/...
39+
```
40+
41+
## Community, discussion and support
4342

4443
Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
4544

@@ -48,8 +47,6 @@ You can reach the maintainers of this project at:
4847
- [Slack](http://slack.k8s.io/)
4948
- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-kubebuilder)
5049

51-
### Code of conduct
50+
## Code of conduct
5251

5352
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
54-
55-
[google container builder]: https://github.com/kubernetes-sigs/container-builder-local

Gopkg.lock

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ required = ["sigs.k8s.io/testing_frameworks/integration",
1919
"github.com/emicklei/go-restful",
2020
"github.com/go-openapi/spec",
2121
"k8s.io/kube-openapi/pkg/common",
22-
]
22+
# Workaround for https://github.com/golang/dep/issues/1306
23+
"github.com/kubernetes/repo-infra/verify/boilerplate/test",
24+
]
25+
26+
[[constraint]]
27+
name = "github.com/kubernetes/repo-infra"
28+
revision = "3c350a455362b622fe786e63f8f07b2a87f54f7b"
2329

2430
[[constraint]]
2531
name = "sigs.k8s.io/testing_frameworks"
@@ -64,3 +70,7 @@ required = ["sigs.k8s.io/testing_frameworks/integration",
6470
[prune]
6571
go-tests = true
6672
unused-packages = true
73+
74+
[[prune.project]]
75+
name = "github.com/kubernetes/repo-infra"
76+
unused-packages = false

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
[![Build Status](https://travis-ci.org/kubernetes-sigs/kubebuilder.svg?branch=master)](https://travis-ci.org/kubernetes-sigs/kubebuilder "Travis")
22
[![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes-sigs/kubebuilder)](https://goreportcard.com/report/github.com/kubernetes-sigs/kubebuilder)
33

4-
*Don't use `go get` / `go install`, instead you MUST download a tar binary release or create your own release using
5-
the release program.* To build your own release see [CONTRIBUTING.md](CONTRIBUTING.md)
6-
7-
## `kubebuilder`
4+
## Kubebuilder
85

96
Kubebuilder is a framework for building Kubernetes APIs using [custom resource definitions (CRDs)](https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions).
107

118
**Note:** kubebuilder does not exist as an example to *copy-paste*, but instead provides powerful libraries and tools
129
to simplify building and publishing Kubernetes APIs from scratch.
1310

14-
### Download and Install
11+
### Installalation
12+
13+
It is strongly recommended that you use a released version. Release binaries are available on the [releases](https://github.com/kubernetes-sigs/kubebuilder/releases) page.
14+
Follow the [instructions](http://book.kubebuilder.io/getting_started/installation_and_setup.html) to install Kubebuilder.
1515

16-
[Releases](https://github.com/kubernetes-sigs/kubebuilder/releases) are here
1716

1817
## Getting Started
1918

2019
See the [Getting Started](http://book.kubebuilder.io/quick_start.html) documentation.
2120

22-
![Quick Start](docs/gif/quickstart.gif)
21+
![Quick Start](docs/gif/quickstart-1.0.0.gif)
2322

2423
## Documentation
2524

@@ -80,3 +79,8 @@ Before you file an issue, please search existing issues to see if your issue is
8079

8180
- ### Slack
8281
For realtime discussion, you can join the [#kubebuilder](https://slack.k8s.io/#kubebuilder) slack channel. Slack requires registration, but the Kubernetes team is open invitation to anyone to register here. Feel free to come and ask any questions.
82+
83+
## Contributing
84+
Contributions are greatly appreciated. The maintainers actively manage the issues list, and try to highlight issues suitable for newcomers.
85+
The project follows the typical GitHub pull request model. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
86+
Before starting any work, please either comment on an existing issue, or file a new one.

build/build_kubebuilder.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
#!/bin/bash
2+
# Copyright 2018 The Kubernetes Authors.
23
#
3-
# Copyright 2018 The Kubernetes Authors.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
47
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
8+
# http://www.apache.org/licenses/LICENSE-2.0
89
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
1615

1716
set -e
1817
set -x

build/cloudbuild.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ steps:
2525
args: [fetch, --tags, --depth=100]
2626
- name: "ubuntu"
2727
args: ["mkdir", "-p", "/workspace/_output/linux_amd64"]
28-
- name: "gcr.io/kubebuilder/thirdparty-linux:1.10.1"
28+
- name: "gcr.io/kubebuilder/thirdparty-linux:1.11.0"
2929
args: ["tar", "-xzvf", "/kubebuilder_linux_amd64.tar.gz"]
3030
dir: "_output/linux_amd64"
3131
- name: "ubuntu"
3232
args: ["mkdir", "-p", "/workspace/_output/darwin_amd64"]
33-
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.10.1"
33+
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.11.0"
3434
args: ["tar", "-xzvf", "/kubebuilder_darwin_amd64.tar.gz"]
3535
dir: "_output/darwin_amd64"
3636
- name: "ubuntu"
3737
args: ["bash", "build/build_vendor.sh"]
3838
- name: "gcr.io/kubebuilder/goreleaser_with_go_1.10:0.0.1"
3939
args: ["bash", "build/build_kubebuilder.sh"]
4040
env:
41-
- 'KUBERNETES_VERSION=1.10'
41+
- 'KUBERNETES_VERSION=1.11'
4242
secretEnv: ['GITHUB_TOKEN']
4343
secrets:
4444
- kmsKeyName: projects/kubebuilder/locations/global/keyRings/kubebuilder-gh-tokens/cryptoKeys/gh-release-token

build/cloudbuild_local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
steps:
2424
- name: "ubuntu"
2525
args: ["mkdir", "-p", "/workspace/_output/linux_amd64"]
26-
- name: "gcr.io/kubebuilder/thirdparty-linux:1.10.1"
26+
- name: "gcr.io/kubebuilder/thirdparty-linux:1.11.0"
2727
args: ["tar", "-xzvf", "/kubebuilder_linux_amd64.tar.gz"]
2828
dir: "_output/linux_amd64"
2929
- name: "ubuntu"
3030
args: ["mkdir", "-p", "/workspace/_output/darwin_amd64"]
31-
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.10.1"
31+
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.11.0"
3232
args: ["tar", "-xzvf", "/kubebuilder_darwin_amd64.tar.gz"]
3333
dir: "_output/darwin_amd64"
3434
- name: "ubuntu"

build/cloudbuild_snapshot.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
steps:
2424
- name: "ubuntu"
2525
args: ["mkdir", "-p", "/workspace/_output/linux_amd64"]
26-
- name: "gcr.io/kubebuilder/thirdparty-linux:1.10.1"
26+
- name: "gcr.io/kubebuilder/thirdparty-linux:1.11.0"
2727
args: ["tar", "-xzvf", "/kubebuilder_linux_amd64.tar.gz"]
2828
dir: "_output/linux_amd64"
2929
- name: "ubuntu"
3030
args: ["mkdir", "-p", "/workspace/_output/darwin_amd64"]
31-
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.10.1"
31+
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.11.0"
3232
args: ["tar", "-xzvf", "/kubebuilder_darwin_amd64.tar.gz"]
3333
dir: "_output/darwin_amd64"
3434
- name: "ubuntu"
3535
args: ["bash", "build/build_vendor.sh"]
3636
- name: "gcr.io/kubebuilder/goreleaser_with_go_1.10:0.0.1"
3737
args: ["bash", "build/build_kubebuilder.sh", "--snapshot"]
3838
env:
39-
- 'KUBERNETES_VERSION=1.10'
39+
- 'KUBERNETES_VERSION=1.11'
4040
- name: 'gcr.io/cloud-builders/gsutil'
4141
args: ['-h', 'Content-Type:application/gzip', 'cp', '-a', 'public-read', 'dist/kubebuilder_master_linux_amd64.tar.gz', 'gs://kubebuilder-release/kubebuilder_master_linux_amd64.tar.gz']
4242
- name: 'gcr.io/cloud-builders/gsutil'

build/cloudbuild_tools.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
steps:
16-
- name: "gcr.io/kubebuilder/thirdparty-${_GOOS}:1.10.1"
16+
- name: "gcr.io/kubebuilder/thirdparty-${_GOOS}:1.11.0"
1717
args: ["cp", "/kubebuilder_${_GOOS}_${_GOARCH}.tar.gz", "/workspace/kubebuilder-${TAG_NAME}-${_GOOS}-${_GOARCH}.tar.gz"]
1818
env:
1919
- 'GOOS=${_GOOS}'

build/gitbook/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Copyright 2018 The Kubernetes Authors.
1+
# Copyright 2018 The Kubernetes Authors.
22
#
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
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
66
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
7+
# http://www.apache.org/licenses/LICENSE-2.0
88
#
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.
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.
1414

1515
FROM node:6
1616

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
run: gitbook-1-0
6+
name: gitbook-1-0
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
run: gitbook-1-0
12+
template:
13+
metadata:
14+
labels:
15+
run: gitbook-1-0
16+
spec:
17+
containers:
18+
- image: gcr.io/kubebuilder/book1.0
19+
imagePullPolicy: Always
20+
name: gitbook

build/gitbook/config/service_new.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
run: gitbook-1-0
6+
name: gitbook-1-0
7+
spec:
8+
ports:
9+
- port: 80
10+
protocol: TCP
11+
targetPort: 80
12+
selector:
13+
run: gitbook-1-0
14+
type: LoadBalancer

build/package.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
#!/bin/bash
2+
# Copyright 2018 The Kubernetes Authors.
23
#
3-
# Copyright 2018 The Kubernetes Authors.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
47
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
8+
# http://www.apache.org/licenses/LICENSE-2.0
89
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
1615

1716
set -e
1817
set -x
1918

2019
cd /workspace/_output/
21-
tar -czvf /workspace/kubebuilder-$VERSION-$GOOS-$GOARCH.tar.gz kubebuilder
20+
tar -czvf /workspace/kubebuilder-$VERSION-$GOOS-$GOARCH.tar.gz kubebuilder

0 commit comments

Comments
 (0)