Skip to content

Commit c6ff3fd

Browse files
sbueringerk8s-ci-robot
authored andcommitted
Pr refactor doc (#474)
* update release doc, fix manager image tag * update doc * fixed typo * review fixes * review * review * review fix * update Openstack support table
1 parent 55baf50 commit c6ff3fd

File tree

10 files changed

+416
-467
lines changed

10 files changed

+416
-467
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Sign the CLA
1414

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

1717
### Contributing A Patch
1818

Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ generate-examples: clean-examples ## Generate examples configurations to run a c
197197
.PHONY: docker-build
198198
docker-build: ## Build the docker image for controller-manager
199199
docker build --pull --build-arg ARCH=$(ARCH) . -t $(CONTROLLER_IMG)-$(ARCH):$(TAG)
200-
MANIFEST_IMG=$(CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) $(MAKE) set-manifest-image
201200

202201
.PHONY: docker-push
203202
docker-push: ## Push the docker image
@@ -226,12 +225,6 @@ docker-push-manifest: ## Push the fat manifest docker image.
226225
docker manifest create --amend $(CONTROLLER_IMG):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(CONTROLLER_IMG)\-&:$(TAG)~g")
227226
@for arch in $(ALL_ARCH); do docker manifest annotate --arch $${arch} ${CONTROLLER_IMG}:${TAG} ${CONTROLLER_IMG}-$${arch}:${TAG}; done
228227
docker manifest push --purge $(CONTROLLER_IMG):$(TAG)
229-
MANIFEST_IMG=$(CONTROLLER_IMG) MANIFEST_TAG=$(TAG) $(MAKE) set-manifest-image
230-
231-
.PHONY: set-manifest-image
232-
set-manifest-image:
233-
$(info Updating kustomize image patch file for manager resource)
234-
sed -i'' -e 's@image: .*@image: '"${MANIFEST_IMG}:$(MANIFEST_TAG)"'@' ./config/default/manager_image_patch.yaml
235228

236229
## --------------------------------------
237230
## Release
@@ -252,8 +245,7 @@ release: clean-release ## Builds and push container images using the latest git
252245
REGISTRY=$(STAGING_REGISTRY) TAG=$(RELEASE_TAG) \
253246
$(MAKE) docker-build-all docker-push-all
254247
# Set the manifest image to the production bucket.
255-
MANIFEST_IMG=$(PROD_REGISTRY)/$(IMAGE_NAME) MANIFEST_TAG=$(RELEASE_TAG) \
256-
$(MAKE) set-manifest-image
248+
MANIFEST_IMG=$(PROD_REGISTRY)/$(IMAGE_NAME) MANIFEST_TAG=$(RELEASE_TAG)
257249
$(MAKE) release-manifests
258250

259251
.PHONY: release-manifests

README.md

Lines changed: 95 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,192 +1,148 @@
1-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3-
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
1+
# Kubernetes Cluster API Provider OpenStack
42

5-
- [Kubernetes cluster-api-provider-openstack Project](#kubernetes-cluster-api-provider-openstack-project)
6-
- [Community, discussion, contribution, and support](#community-discussion-contribution-and-support)
7-
- [Code of conduct](#code-of-conduct)
8-
- [Compatibility with Cluster API, Kubernetes and OpenStack Versions](#compatibility-with-cluster-api-kubernetes-and-openstack-versions)
9-
- [Getting Started](#getting-started)
10-
- [Prerequisites](#prerequisites)
11-
- [Cluster Creation](#cluster-creation)
12-
- [Managed OpenStack Security Groups](#managed-openstack-security-groups)
13-
- [Interacting with your cluster](#interacting-with-your-cluster)
14-
- [Cluster Deletion](#cluster-deletion)
15-
- [Trouble shooting](#trouble-shooting)
16-
- [Contributing](#contributing)
3+
[![Go Report Card](https://goreportcard.com/badge/kubernetes-sigs/cluster-api-provider-openstack)](https://goreportcard.com/report/kubernetes-sigs/cluster-api-provider-openstack)
174

18-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
5+
------
196

20-
# Kubernetes cluster-api-provider-openstack Project
7+
Kubernetes-native declarative infrastructure for OpenStack.
218

22-
This repository hosts a concrete implementation of an OpenStack provider for the [cluster-api project](https://github.com/kubernetes-sigs/cluster-api).
9+
## What is the Cluster API Provider OpenStack
2310

24-
## Community, discussion, contribution, and support
11+
The [Cluster API][cluster_api] brings
12+
declarative, Kubernetes-style APIs to cluster creation, configuration and
13+
management.
2514

26-
Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
15+
The API itself is shared across multiple cloud providers allowing for true OpenStack
16+
hybrid deployments of Kubernetes. It is built atop the lessons learned from
17+
previous cluster managers such as [kops][kops] and
18+
[kubicorn][kubicorn].
2719

28-
You can reach the maintainers of this project at:
2920

30-
- [#cluster-api-openstack on Kubernetes Slack](https://kubernetes.slack.com/messages/cluster-api-openstack)
31-
- [SIG-Cluster-Lifecycle Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle)
21+
## Launching a Kubernetes cluster on OpenStack
3222

33-
### Code of conduct
23+
Check out the [getting started guide](./docs/getting-started.md) for launching a cluster on OpenStack.
3424

35-
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
25+
## Features
26+
27+
- Native Kubernetes manifests and API
28+
- Choice of Linux distribution (as long as a current cloud-init is available)
29+
- Support for single and multi-node control plane clusters
30+
- Deploy clusters with and without LBaaS available
31+
- Support for security groups
32+
- Doesn't use SSH for bootstrapping nodes
3633

3734
------
3835

39-
## Compatibility with Cluster API, Kubernetes and OpenStack Versions
36+
## Compatibility with Cluster API and Kubernetes Versions
4037

4138
This provider's versions are compatible with the following versions of Cluster API:
4239

43-
||Cluster API v1alpha1 (v0.1)|
44-
|-|-|
45-
|OpenStack Provider v1alpha1 (ea309e7f)||
40+
||Cluster API v1alpha1 (v0.1)|Cluster API v1alpha2 (v0.2)|
41+
|-|-|-|
42+
|OpenStack Provider v1alpha1 (release-0.1 branch)|||
43+
|OpenStack Provider v1alpha2 (v0.2)|||
4644

4745
This provider's versions are able to install and manage the following versions of Kubernetes:
4846

49-
||Kubernetes 1.13.5+|Kubernetes 1.14|Kubernetes 1.15|
47+
||Kubernetes 1.13|Kubernetes 1.14|Kubernetes 1.15|
5048
|-|-|-|-|
51-
|OpenStack Provider v1alpha1 (ea309e7f)||||
52-
53-
Kubernetes control plane and Kubelet versions are defined in `spec.versions.controlPlane` and `spec.versions.kubelet` of `cmd/clusterctl/examples/openstack/machines.yaml.template` respectively.
54-
You can generate `cmd/clusterctl/examples/openstack/out/machines.yaml` by running the `generate-yaml.sh` from the template and change the versions if you want.
55-
56-
**NOTE**: Because the user is able to customize any `user-data`, it is also possible to deploy older versions.
57-
But we won't provide any examples or working templates. See [user-data in the examples](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/tree/master/cmd/clusterctl/examples/openstack/provider-component/user-data).
49+
|OpenStack Provider v1alpha1 (release-0.1 branch)||||
50+
|OpenStack Provider v1alpha2 (v0.2)||||
5851

59-
This provider's versions are able to install kubernetes to the following versions of OpenStack:
52+
This provider's versions are able to install Kubernetes to the following versions of OpenStack:
6053

6154
||OpenStack Pike|OpenStack Queens|OpenStack Rocky|OpenStack Stein|
6255
|-|-|-|-|-|
63-
|OpenStack Provider v1alpha1 (ea309e7f)|||||
56+
|OpenStack Provider v1alpha1 (release-0.1 branch)|||||
57+
|OpenStack Provider v1alpha2 (v0.2)|+||+||
58+
59+
Key:
60+
* `` tested
61+
* `+` should work, but we weren't able to test it
6462

6563
Each version of Cluster API for OpenStack will attempt to support two Kubernetes versions.
6664

6765
**NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this
68-
policy may be made to more closely align with other providers in the Cluster API ecosystem.
66+
policy may be made to more closely aligned with other providers in the Cluster API ecosystem.
6967

7068
------
7169

72-
## Getting Started
73-
74-
### Notice
75-
Currently `cluster-api-provider-openstack` project is evolving into `cluster-api v1alpha2`, please use `release-0.1` branch for `cluster-api v1alpha1` development as it provides function workable code and configurations.
76-
77-
For more information, please refer to [v1alpha2](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/380)
78-
79-
### Prerequisites
70+
## Operating system images
8071

81-
1. Install `kustomize` v3.1.0+ (see [here](https://github.com/kubernetes-sigs/kustomize/releases).
82-
2. You can use either VM, container or existing Kubernetes cluster act as bootstrap cluster.
83-
- If you want to use VM, install [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/), version 0.30.0 or greater.
84-
- If you want to use container, install [kind](https://github.com/kubernetes-sigs/kind#installation-and-usage).
85-
- If you want to use existing Kubernetes cluster, prepare your kubeconfig.
86-
3. Install a [driver](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md) **if you are using Minikube**. For Linux, we recommend kvm2. For MacOS, we recommend VirtualBox.
87-
4. An appropriately configured [Go development environment](https://golang.org/doc/install)
88-
5. Build the `clusterctl` tool and make it available in your `PATH`
72+
Note: Cluster API Provider OpenStack relies on a few prerequisites which have to be already
73+
installed in the used operating system images, e.g. a container runtime, kubelet, kubeadm,.. .
74+
Reference images can be found in [kubernetes-sigs/image-builder](https://github.com/kubernetes-sigs/image-builder/tree/master/images/capi). If it isn't possible to pre-install those
75+
prerequisites in the image, you can always deploy and execute some custom scripts
76+
through the [KubeadmConfig](https://github.com/kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm).
8977

90-
```bash
91-
git clone https://github.com/kubernetes-sigs/cluster-api ${GOPATH}/src/sigs.k8s.io/cluster-api
92-
cd ${GOPATH}/src/sigs.k8s.io/cluster-api/
93-
make clusterctl
94-
```
95-
96-
### Cluster Creation
97-
98-
1. Create the YAML files if needed. You can use the `examples/generate.sh` script as documented [here](examples/README.md).
99-
100-
2. Create a cluster:
101-
- If you are using Minikube:
102-
103-
```bash
104-
clusterctl create cluster \
105-
--bootstrap-type minikube --bootstrap-flags kubernetes-version=v1.15.0 \
106-
-c examples/_out/cluster.yaml \
107-
-m examples/_out/machines.yaml \
108-
-p examples/_out/provider-components.yaml \
109-
-a examples/addons.yaml
110-
```
111-
112-
To choose a specific Minikube driver, please use the `--bootstrap-flags vm-driver=xxx` command line parameter. For example to use the kvm2 driver with clusterctl you would add `--bootstrap-flags vm-driver=kvm2`, for linux, if you haven't installed any driver, you can add `--bootstrap-flags vm-driver=none`.
113-
114-
- If you are using Kind:
115-
116-
```bash
117-
clusterctl create cluster \
118-
--bootstrap-type kind --bootstrap-cluster-cleanup=false \
119-
-c examples/_out/cluster.yaml \
120-
-m examples/_out/machines.yaml \
121-
-p examples/_out/provider-components.yaml \
122-
-a examples/addons.yaml
123-
# Alternatively
124-
make create-cluster
125-
```
78+
------
12679

127-
- If you are using an existing Kubernetes cluster:
80+
## Documentation
12881

129-
```bash
130-
clusterctl create cluster \
131-
--bootstrap-cluster-kubeconfig ~/.kube/config \
132-
-c examples/_out/cluster.yaml \
133-
-m examples/_out/machines.yaml \
134-
-p examples/_out/provider-components.yaml \
135-
-a examples/addons.yaml
136-
```
82+
Documentation is in the `/docs` directory
13783

138-
### Interacting with your cluster
84+
## Getting involved and contributing
13985

140-
Once you have created a cluster, you can interact with the cluster and machine resources using kubectl:
86+
Are you interested in contributing to cluster-api-provider-openstack? We, the
87+
maintainers and community, would love your suggestions, contributions, and help!
88+
Also, the maintainers can be contacted at any time to learn more about how to get
89+
involved via the [cluster-api-openstack channel on Kubernetes Slack][slack] or the
90+
[SIG-Cluster-Lifecycle Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle).
14191

142-
```bash
143-
kubectl --kubeconfig=kubeconfig get clusters
144-
kubectl --kubeconfig=kubeconfig get machines
145-
kubectl --kubeconfig=kubeconfig get machines -o yaml
146-
```
92+
In the interest of getting more new people involved we try to tag issues with
93+
[`good first issue`][good_first_issue].
94+
These are typically issues that have smaller scope but are good ways to start
95+
to get acquainted with the codebase.
14796

148-
### Cluster Deletion
97+
We also encourage ALL active community participants to act as if they are
98+
maintainers, even if you don't have "official" write permissions. This is a
99+
community effort, we are here to serve the Kubernetes community. If you have an
100+
active interest and you want to get involved, you have real power! Don't assume
101+
that the only people who can get things done around here are the "maintainers".
149102

150-
Use following command to delete a cluster and all resources it created.
151-
```bash
152-
clusterctl delete cluster --cluster <cluster-name> --bootstrap-type kind --kubeconfig kubeconfig --provider-components examples/_out/provider-components.yaml
153-
```
103+
We also would love to add more "official" maintainers, so show us what you can
104+
do!
154105

155-
Or you can manually delete all resources that were created as part of
156-
your openstack Cluster API Kubernetes cluster.
106+
This repository uses the Kubernetes bots. See a full list of the commands [here][prow].
107+
Please also refer to the [Contribution Guide](CONTRIBUTING.md) and the [Development Guide](docs/development.md) for this project.
157108

158-
1. Delete all of the node Machines in the cluster. Make sure to wait for the
159-
corresponding Nodes to be deleted before moving onto the next step. After this
160-
step, the master node will be the only remaining node.
109+
## Code of conduct
161110

162-
```bash
163-
kubectl --kubeconfig=kubeconfig delete machines -l set=node
164-
kubectl --kubeconfig=kubeconfig get nodes
165-
```
111+
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
166112

167-
2. Delete the master machine.
168-
```bash
169-
kubectl --kubeconfig=kubeconfig delete machines -l set=master
170-
```
113+
## Github issues
171114

172-
3. (optional) Delete the load balancer in your OpenStack cloud if you created them.
115+
### Bugs
173116

174-
4. Delete the kubeconfig file that were created for your cluster.
117+
If you think you have found a bug please follow the instructions below.
175118

176-
```bash
177-
rm kubeconfig
178-
```
119+
- Please spend a small amount of time giving due diligence to the issue tracker. Your issue might be a duplicate.
120+
- Get the logs from the cluster controllers. Please paste this into your issue.
121+
- Open a [new issue][new_issue].
122+
- Remember that users might be searching for your issue in the future, so please give it a meaningful title to help others.
123+
- Feel free to reach out to the Cluster API community on the [Kubernetes Slack][slack].
179124

180-
5. Delete the ssh keypair that were created for your cluster machine.
125+
### Tracking new features
181126

182-
```bash
183-
rm -rf $HOME/.ssh/openstack_tmp*
184-
```
127+
We also use the issue tracker to track features. If you have an idea for a feature, or think you can help Cluster API Provider OpenStack become even more awesome follow the steps below.
185128

186-
### Troubleshooting
129+
- Open a [new issue][new_issue].
130+
- Remember that users might be searching for your issue in the future, so please
131+
give it a meaningful title to help others.
132+
- Clearly define the use case, using concrete examples.
133+
- Some of our larger features will require some design. If you would like to
134+
include a technical design for your feature, please include it in the issue.
135+
- After the new feature is well understood, and the design agreed upon, we can
136+
start coding the feature. We would love for you to code it. So please open
137+
up a **WIP** *(work in progress)* pull request, and happy coding.
187138

188-
Please refer to [Trouble shooting documentation](docs/trouble_shooting.md) for further info.
189139

190-
## Contributing
140+
<!-- References -->
191141

192-
Please refer to the [Contribution Guide](CONTRIBUTING.md) and [Development Guide](docs/development.md) for this project.
142+
[cluster_api]: https://github.com/kubernetes-sigs/cluster-api
143+
[kops]: https://github.com/kubernetes/kops
144+
[kubicorn]: http://kubicorn.io/
145+
[slack]: https://kubernetes.slack.com/messages/cluster-api-openstack
146+
[good_first_issue]: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22
147+
[prow]: https://go.k8s.io/bot-commands
148+
[new_issue]: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/new

RELEASE.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
1-
# Release Process
21

3-
The Kubernetes cluster-api-provider-openstack is released on an as-needed basis. The process is as follows:
2+
# Releasing
3+
4+
## Output
5+
6+
### Expected artifacts
7+
8+
1. A container image of the `cluster-api-provider-openstack` controller manager
9+
10+
### Artifact locations
11+
12+
1. The container image is found in the registry `us.gcr.io/k8s-artifacts-prod/capi-openstack/` with an image
13+
name of `capi-openstack-controller` and a tag that matches the release version. For
14+
example, in the `v0.2.0` release, the container image location is
15+
`us.gcr.io/k8s-artifacts-prod/capi-openstack/capi-openstack-controller:v0.2.0`
16+
17+
18+
## Process
19+
20+
For version v0.x.y:
421

522
1. An issue is proposing a new release with a changelog since the last release
6-
1. All [OWNERS](OWNERS) must LGTM this release
7-
1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION`
23+
1. Create an annotated tag `git tag -a v0.x.y -m v0.x.y`
24+
1. To use your GPG signature when pushing the tag, use `git tag -s [...]` instead
25+
1. Push the tag to the GitHub repository `git push origin v0.x.y`
26+
1. Note: `origin` should be the name of the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-openstack`
27+
1. Run `make release` to build artifacts and push the images to the staging bucket
28+
1. Follow the [Image Promotion process](https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io#image-promoter) to promote the image from the staging repo to `us.gcr.io/k8s-artifacts-prod/capi-openstack`
29+
1. Create a release (with the above mentioned release notes) in GitHub based on the tag created above
830
1. The release issue is closed
931
1. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] cluster-api-provider-openstack $VERSION is released`
32+
33+
<!-- TODO add link to image promote PR after the first release -->
34+
35+
### Permissions
36+
37+
Releasing requires a particular set of permissions.
38+
39+
* Push access to the staging gcr bucket ([kubernetes/k8s.io/k8s.gcr.io/k8s-staging-capi-openstack/OWNERS](https://github.com/kubernetes/k8s.io/blob/master/k8s.gcr.io/k8s-staging-capi-openstack/OWNERS)
40+
* Tag push access to the GitHub repository ([kubernetes/org/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml](https://github.com/kubernetes/org/blob/master/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml#L136-L137))
41+
* GitHub release creation access ([kubernetes/org/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml](https://github.com/kubernetes/org/blob/master/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml#L136-L137))
42+
43+
## Staging
44+
45+
There is a post-submit Prow job running after each commit on master which pushes a new image to the staging repo (`gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:latest`). Following configuration is involved:
46+
* staging gcr bucket: [kubernetes/k8s.io/k8s.gcr.io/k8s-staging-capi-openstack/manifest.yaml](https://github.com/kubernetes/k8s.io/blob/master/k8s.gcr.io/k8s-staging-capi-openstack/manifest.yaml)
47+
* post-submit `post-capi-openstack-push-images` Prow job: [kubernetes/test-infra/config/jobs/image-pushing/k8s-staging-capi-openstack.yaml](https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/k8s-staging-capi-openstack.yaml)) (corresponding dashboard is located at [https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-capi-openstack-push-images](https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-capi-openstack-push-images))
48+
* Google Cloud Build configuration which is used by the Prow job: [kubernetes-sigs/cluster-api-provider-openstack/cloudbuild.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/master/cloudbuild.yaml)

0 commit comments

Comments
 (0)