Skip to content

Commit

Permalink
Add cluster-api-provider-openstack assets
Browse files Browse the repository at this point in the history
Includes CAPO assets and adds them to the Hypershift
API scheme.
  • Loading branch information
MaysaMacedo committed Jul 11, 2024
1 parent 1669c7c commit 4f35a1d
Show file tree
Hide file tree
Showing 9 changed files with 12,780 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ product-cli:
# Run this when updating any of the types in the api package to regenerate the
# deepcopy code and CRD manifest files.
.PHONY: api
api: hypershift-api cluster-api cluster-api-provider-aws cluster-api-provider-ibmcloud cluster-api-provider-kubevirt cluster-api-provider-agent cluster-api-provider-azure api-docs
api: hypershift-api cluster-api cluster-api-provider-aws cluster-api-provider-ibmcloud cluster-api-provider-kubevirt cluster-api-provider-agent cluster-api-provider-azure cluster-api-provider-openstack api-docs

.PHONY: hypershift-api
hypershift-api: $(CONTROLLER_GEN)
Expand Down Expand Up @@ -141,6 +141,11 @@ cluster-api-provider-azure: $(CONTROLLER_GEN)
rm -rf cmd/install/assets/cluster-api-provider-azure/*.yaml
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./vendor/sigs.k8s.io/cluster-api-provider-azure/api/..." output:crd:artifacts:config=cmd/install/assets/cluster-api-provider-azure

.PHONY: cluster-api-provider-openstack
cluster-api-provider-openstack: $(CONTROLLER_GEN)
rm -rf cmd/install/assets/cluster-api-provider-openstack/*.yaml
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./vendor/sigs.k8s.io/cluster-api-provider-openstack/api/..." output:crd:artifacts:config=cmd/install/assets/cluster-api-provider-openstack

.PHONY: api-docs
api-docs: $(GENAPIDOCS)
hack/gen-api-docs.sh $(GENAPIDOCS) $(DIR)
Expand Down
6 changes: 6 additions & 0 deletions cmd/install/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
//go:embed cluster-api-provider-kubevirt/*
//go:embed cluster-api-provider-agent/*
//go:embed cluster-api-provider-azure/*
//go:embed cluster-api-provider-openstack/*
var crds embed.FS

//go:embed recordingrules/*
Expand Down Expand Up @@ -49,6 +50,11 @@ var capiResources = map[string]string{
"cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureclusters.yaml": "v1beta1",
"cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azuremachines.yaml": "v1beta1",
"cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml": "v1beta1",
"cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml": "v1beta1",
"cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusters.yaml": "v1beta1",
"cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachines.yaml": "v1beta1",
"cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml": "v1beta1",
"cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml": "v1alpha1",
}

func getContents(fs embed.FS, file string) []byte {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
name: openstackfloatingippools.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
kind: OpenStackFloatingIPPool
listKind: OpenStackFloatingIPPoolList
plural: openstackfloatingippools
singular: openstackfloatingippool
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OpenStackFloatingIPPool is the Schema for the openstackfloatingippools
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: OpenStackFloatingIPPoolSpec defines the desired state of
OpenStackFloatingIPPool.
properties:
floatingIPNetwork:
description: FloatingIPNetwork is the external network to use for
floating ips, if there's only one external network it will be used
by default
maxProperties: 1
minProperties: 1
properties:
filter:
description: Filter specifies a filter to select an OpenStack
network. If provided, cannot be empty.
minProperties: 1
properties:
description:
type: string
name:
type: string
notTags:
description: |-
NotTags is a list of tags to filter by. If specified, resources which
contain all of the given tags will be excluded from the result.
items:
description: |-
NeutronTag represents a tag on a Neutron resource.
It may not be empty and may not contain commas.
minLength: 1
pattern: ^[^,]+$
type: string
type: array
x-kubernetes-list-type: set
notTagsAny:
description: |-
NotTagsAny is a list of tags to filter by. If specified, resources
which contain any of the given tags will be excluded from the result.
items:
description: |-
NeutronTag represents a tag on a Neutron resource.
It may not be empty and may not contain commas.
minLength: 1
pattern: ^[^,]+$
type: string
type: array
x-kubernetes-list-type: set
projectID:
type: string
tags:
description: |-
Tags is a list of tags to filter by. If specified, the resource must
have all of the tags specified to be included in the result.
items:
description: |-
NeutronTag represents a tag on a Neutron resource.
It may not be empty and may not contain commas.
minLength: 1
pattern: ^[^,]+$
type: string
type: array
x-kubernetes-list-type: set
tagsAny:
description: |-
TagsAny is a list of tags to filter by. If specified, the resource
must have at least one of the tags specified to be included in the
result.
items:
description: |-
NeutronTag represents a tag on a Neutron resource.
It may not be empty and may not contain commas.
minLength: 1
pattern: ^[^,]+$
type: string
type: array
x-kubernetes-list-type: set
type: object
id:
description: ID is the ID of the network to use. If ID is provided,
the other filters cannot be provided. Must be in UUID format.
format: uuid
type: string
type: object
identityRef:
description: IdentityRef is a reference to a identity to be used when
reconciling this pool.
properties:
cloudName:
description: CloudName specifies the name of the entry in the
clouds.yaml file to use.
type: string
name:
description: |-
Name is the name of a secret in the same namespace as the resource being provisioned.
The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file.
The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate.
type: string
required:
- cloudName
- name
type: object
maxIPs:
description: |-
MaxIPs is the maximum number of floating ips that can be allocated from this pool, if nil there is no limit.
If set, the pool will stop allocating floating ips when it reaches this number of ClaimedIPs.
type: integer
preAllocatedFloatingIPs:
description: |-
PreAllocatedFloatingIPs is a list of floating IPs precreated in OpenStack that should be used by this pool.
These are used before allocating new ones and are not deleted from OpenStack when the pool is deleted.
items:
type: string
type: array
reclaimPolicy:
description: The stratergy to use for reclaiming floating ips when
they are released from a machine
enum:
- Retain
- Delete
type: string
required:
- identityRef
- reclaimPolicy
type: object
status:
description: OpenStackFloatingIPPoolStatus defines the observed state
of OpenStackFloatingIPPool.
properties:
availableIPs:
default: []
items:
type: string
type: array
claimedIPs:
default: []
items:
type: string
type: array
conditions:
description: Conditions provide observations of the operational state
of a Cluster API resource.
items:
description: Condition defines an observation of a Cluster API resource
operational state.
properties:
lastTransitionTime:
description: |-
Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
A human readable message indicating details about the transition.
This field may be empty.
type: string
reason:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may not be empty.
type: string
severity:
description: |-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: |-
Type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
failedIPs:
description: FailedIPs contains a list of floating ips that failed
to be allocated
items:
type: string
type: array
floatingIPNetwork:
description: floatingIPNetwork contains information about the network
used for floating ips
properties:
id:
type: string
name:
type: string
tags:
items:
type: string
type: array
required:
- id
- name
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit 4f35a1d

Please sign in to comment.