-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ionos-cloud:main' into ipam
- Loading branch information
Showing
22 changed files
with
1,385 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
Copyright 2024 IONOS Cloud. | ||
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 v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// IonosCloudClusterTemplateSpec defines the desired state of IonosCloudClusterTemplate. | ||
type IonosCloudClusterTemplateSpec struct { | ||
Template IonosCloudClusterTemplateResource `json:"template"` | ||
} | ||
|
||
// IonosCloudClusterTemplateResource describes the data for creating a IonosCloudCluster from a template. | ||
type IonosCloudClusterTemplateResource struct { | ||
Spec IonosCloudClusterSpec `json:"spec"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// IonosCloudClusterTemplate is the Schema for the ionoscloudclustertemplates API. | ||
type IonosCloudClusterTemplate struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec IonosCloudClusterTemplateSpec `json:"spec,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// IonosCloudClusterTemplateList contains a list of IonosCloudClusterTemplate. | ||
type IonosCloudClusterTemplateList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []IonosCloudCluster `json:"items"` | ||
} | ||
|
||
func init() { | ||
objectTypes = append(objectTypes, &IonosCloudClusterTemplate{}, &IonosCloudClusterTemplateList{}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
112 changes: 112 additions & 0 deletions
112
config/crd/bases/infrastructure.cluster.x-k8s.io_ionoscloudclustertemplates.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: ionoscloudclustertemplates.infrastructure.cluster.x-k8s.io | ||
spec: | ||
group: infrastructure.cluster.x-k8s.io | ||
names: | ||
kind: IonosCloudClusterTemplate | ||
listKind: IonosCloudClusterTemplateList | ||
plural: ionoscloudclustertemplates | ||
singular: ionoscloudclustertemplate | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: IonosCloudClusterTemplate is the Schema for the ionoscloudclustertemplates | ||
API. | ||
properties: | ||
apiVersion: | ||
description: |- | ||
APIVersion defines the versioned schema of this representation of an object. | ||
Servers should convert recognized schemas to the latest internal value, and | ||
may reject unrecognized values. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
type: string | ||
kind: | ||
description: |- | ||
Kind is a string value representing the REST resource this object represents. | ||
Servers may infer this from the endpoint the client submits requests to. | ||
Cannot be updated. | ||
In CamelCase. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: IonosCloudClusterTemplateSpec defines the desired state of | ||
IonosCloudClusterTemplate. | ||
properties: | ||
template: | ||
description: IonosCloudClusterTemplateResource describes the data | ||
for creating a IonosCloudCluster from a template. | ||
properties: | ||
spec: | ||
description: IonosCloudClusterSpec defines the desired state of | ||
IonosCloudCluster. | ||
properties: | ||
controlPlaneEndpoint: | ||
description: |- | ||
ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. | ||
TODO(gfariasalves): as of now, IP must be provided by the user as we still don't insert the | ||
provider-provided block IP into the kube-vip manifest. | ||
properties: | ||
host: | ||
description: The hostname on which the API server is serving. | ||
type: string | ||
port: | ||
description: The port on which the API server is serving. | ||
format: int32 | ||
type: integer | ||
required: | ||
- host | ||
- port | ||
type: object | ||
x-kubernetes-validations: | ||
- message: control plane endpoint host cannot be updated | ||
rule: self.host == oldSelf.host || oldSelf.host == '' | ||
- message: control plane endpoint port cannot be updated | ||
rule: self.port == oldSelf.port || oldSelf.port == 0 | ||
credentialsRef: | ||
description: CredentialsRef is a reference to the secret containing | ||
the credentials to access the IONOS Cloud API. | ||
properties: | ||
name: | ||
description: |- | ||
Name of the referent. | ||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | ||
TODO: Add other useful fields. apiVersion, kind, uid? | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
x-kubernetes-validations: | ||
- message: credentialsRef.name must be provided | ||
rule: has(self.name) && self.name != '' | ||
location: | ||
description: Location is the location where the data centers | ||
should be located. | ||
example: de/txl | ||
minLength: 1 | ||
type: string | ||
x-kubernetes-validations: | ||
- message: location is immutable | ||
rule: self == oldSelf | ||
required: | ||
- credentialsRef | ||
- location | ||
type: object | ||
required: | ||
- spec | ||
type: object | ||
required: | ||
- template | ||
type: object | ||
type: object | ||
served: true | ||
storage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Release | ||
|
||
> [!NOTE] | ||
> This document is based on the initial learnings from the release process and is therefore subject to change. | ||
## Preparing the release | ||
|
||
For each release, a milestone needs to be in place. All PRs that are part of the release need to be assigned to | ||
the milestone. | ||
|
||
This will also make it easier to filter for the correct commits, that should be cherry-picked later. | ||
|
||
### Create an issue | ||
|
||
To track the progress of the release, we need to create an issue. Make use of the `Release` issue template. | ||
|
||
### Patch release | ||
|
||
A patch release can only include bug fixes, documentation updates, and other trivial changes. | ||
|
||
New features and breaking changes must be part of a minor release. | ||
|
||
### Minor release | ||
|
||
A minor release includes all changes from the last minor version to the next one. | ||
This also includes new features and breaking changes. | ||
|
||
The following tasks need to be done before creating a new release: | ||
|
||
- Update metadata & clusterctl-settings. | ||
- Update version in e2e config. | ||
- Update docs (compatibility table; usage etc). | ||
|
||
### Milestones | ||
|
||
With `Milestones` we want to make it easier to track the progress of a release. | ||
|
||
### Cherry-Picking | ||
|
||
> [!NOTE] | ||
> As we do not yet have `Prow`, we need to do the cherry-picking manually. | ||
> Refer to the [git cherry-pick docs](https://git-scm.com/docs/git-cherry-pick) | ||
#### Patch release | ||
|
||
For each release, we need to cherry-pick all the relevant changes. For patch releases, we already | ||
have a release branch in place. All changes, that should go into the next patch version, need to be merged into | ||
the corresponding release branch. | ||
|
||
After this is done, we need to create a new tag for the release. | ||
|
||
#### Minor release | ||
|
||
A minor release requires the creation of a new release branch. We will include all changes from the mainline | ||
into the release branch. This includes new features and breaking changes. | ||
|
||
In this case we do not have to `cherry-pick` the changes. | ||
|
||
### Generate release notes | ||
|
||
Cluster API provides a tool to generate release notes. The tool can be found in the `hack/tools/release/notes` directory | ||
within the Cluster API repository. | ||
|
||
An example for creating release notes with the tool could be: | ||
```bash | ||
# make sure you are in the cluster-api repository | ||
cd ../cluster-api | ||
# run the release notes tool and provide correct Github repository | ||
go run -tags=tools sigs.k8s.io/cluster-api/hack/tools/release/notes \ | ||
--from tags/v0.Y.Z \ | ||
--to tags/v0.X.0 \ | ||
--branch release-0.X \ | ||
--repository ionos-cloud/cluster-api-provider-ionoscloud | ||
``` | ||
|
||
The terminal output can then be copied into the draft release notes. There might be some manual work left to do. | ||
|
Oops, something went wrong.