Skip to content

Commit

Permalink
Move embedded ObjectMeta to machine api to provide open api schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelSpeed committed Apr 3, 2020
1 parent a52b81d commit 7aa1a64
Show file tree
Hide file tree
Showing 9 changed files with 446 additions and 7 deletions.
90 changes: 90 additions & 0 deletions install/0000_30_machine-api-operator_02_machine.crd.yaml
Expand Up @@ -76,6 +76,96 @@ spec:
description: ObjectMeta will autopopulate the Node created. Use this
to indicate what labels, annotations, name prefix, etc., should be
used when creating the Node.
properties:
annotations:
additionalProperties:
type: string
description: 'Annotations is an unstructured key value map stored
with a resource that may be set by external tools to store and
retrieve arbitrary metadata. They are not queryable and should
be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
type: object
generateName:
description: "GenerateName is an optional prefix, used by the server,
to generate a unique name ONLY IF the Name field has not been
provided. If this field is used, the name returned to the client
will be different than the name passed. This value will also be
combined with a unique suffix. The provided value has the same
validation rules as the Name field, and may be truncated by the
length of the suffix required to make the value unique on the
server. \n If this field is specified and the generated name exists,
the server will NOT return a 409 - instead, it will either return
201 Created or 500 with Reason ServerTimeout indicating a unique
name could not be found in the time allotted, and the client should
retry (optionally after the time indicated in the Retry-After
header). \n Applied only if Name is not specified. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"
type: string
labels:
additionalProperties:
type: string
description: 'Map of string keys and values that can be used to
organize and categorize (scope and select) objects. May match
selectors of replication controllers and services. More info:
http://kubernetes.io/docs/user-guide/labels'
type: object
name:
description: 'Name must be unique within a namespace. Is required
when creating resources, although some resources may allow a client
to request the generation of an appropriate name automatically.
Name is primarily intended for creation idempotence and configuration
definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
namespace:
description: "Namespace defines the space within each name must
be unique. An empty namespace is equivalent to the \"default\"
namespace, but \"default\" is the canonical representation. Not
all objects are required to be scoped to a namespace - the value
of this field for those objects will be empty. \n Must be a DNS_LABEL.
Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"
type: string
ownerReferences:
description: List of objects depended by this object. If ALL objects
in the list have been deleted, this object will be garbage collected.
If this object is managed by a controller, then an entry in this
list will point to this controller, with the controller field
set to true. There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information to let
you identify an owning object. An owning object must be in the
same namespace as the dependent, or be cluster-scoped, so there
is no namespace field.
properties:
apiVersion:
description: API version of the referent.
type: string
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from the key-value
store until this reference is removed. Defaults to false.
To set this field, a user needs "delete" permission of the
owner, otherwise 422 (Unprocessable Entity) will be returned.
type: boolean
controller:
description: If true, this reference points to the managing
controller.
type: boolean
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
uid:
description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
type: string
required:
- apiVersion
- kind
- name
- uid
type: object
type: array
type: object
providerID:
description: ProviderID is the identification ID of the machine provided
Expand Down
189 changes: 189 additions & 0 deletions install/0000_30_machine-api-operator_03_machineset.crd.yaml
Expand Up @@ -136,6 +136,99 @@ spec:
properties:
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
properties:
annotations:
additionalProperties:
type: string
description: 'Annotations is an unstructured key value map stored
with a resource that may be set by external tools to store
and retrieve arbitrary metadata. They are not queryable and
should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
type: object
generateName:
description: "GenerateName is an optional prefix, used by the
server, to generate a unique name ONLY IF the Name field has
not been provided. If this field is used, the name returned
to the client will be different than the name passed. This
value will also be combined with a unique suffix. The provided
value has the same validation rules as the Name field, and
may be truncated by the length of the suffix required to make
the value unique on the server. \n If this field is specified
and the generated name exists, the server will NOT return
a 409 - instead, it will either return 201 Created or 500
with Reason ServerTimeout indicating a unique name could not
be found in the time allotted, and the client should retry
(optionally after the time indicated in the Retry-After header).
\n Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"
type: string
labels:
additionalProperties:
type: string
description: 'Map of string keys and values that can be used
to organize and categorize (scope and select) objects. May
match selectors of replication controllers and services. More
info: http://kubernetes.io/docs/user-guide/labels'
type: object
name:
description: 'Name must be unique within a namespace. Is required
when creating resources, although some resources may allow
a client to request the generation of an appropriate name
automatically. Name is primarily intended for creation idempotence
and configuration definition. Cannot be updated. More info:
http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
namespace:
description: "Namespace defines the space within each name must
be unique. An empty namespace is equivalent to the \"default\"
namespace, but \"default\" is the canonical representation.
Not all objects are required to be scoped to a namespace -
the value of this field for those objects will be empty. \n
Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"
type: string
ownerReferences:
description: List of objects depended by this object. If ALL
objects in the list have been deleted, this object will be
garbage collected. If this object is managed by a controller,
then an entry in this list will point to this controller,
with the controller field set to true. There cannot be more
than one managing controller.
items:
description: OwnerReference contains enough information to
let you identify an owning object. An owning object must
be in the same namespace as the dependent, or be cluster-scoped,
so there is no namespace field.
properties:
apiVersion:
description: API version of the referent.
type: string
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from the
key-value store until this reference is removed. Defaults
to false. To set this field, a user needs "delete" permission
of the owner, otherwise 422 (Unprocessable Entity) will
be returned.
type: boolean
controller:
description: If true, this reference points to the managing
controller.
type: boolean
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
uid:
description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
type: string
required:
- apiVersion
- kind
- name
- uid
type: object
type: array
type: object
spec:
description: 'Specification of the desired behavior of the machine.
Expand All @@ -145,6 +238,102 @@ spec:
description: ObjectMeta will autopopulate the Node created.
Use this to indicate what labels, annotations, name prefix,
etc., should be used when creating the Node.
properties:
annotations:
additionalProperties:
type: string
description: 'Annotations is an unstructured key value map
stored with a resource that may be set by external tools
to store and retrieve arbitrary metadata. They are not
queryable and should be preserved when modifying objects.
More info: http://kubernetes.io/docs/user-guide/annotations'
type: object
generateName:
description: "GenerateName is an optional prefix, used by
the server, to generate a unique name ONLY IF the Name
field has not been provided. If this field is used, the
name returned to the client will be different than the
name passed. This value will also be combined with a unique
suffix. The provided value has the same validation rules
as the Name field, and may be truncated by the length
of the suffix required to make the value unique on the
server. \n If this field is specified and the generated
name exists, the server will NOT return a 409 - instead,
it will either return 201 Created or 500 with Reason ServerTimeout
indicating a unique name could not be found in the time
allotted, and the client should retry (optionally after
the time indicated in the Retry-After header). \n Applied
only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"
type: string
labels:
additionalProperties:
type: string
description: 'Map of string keys and values that can be
used to organize and categorize (scope and select) objects.
May match selectors of replication controllers and services.
More info: http://kubernetes.io/docs/user-guide/labels'
type: object
name:
description: 'Name must be unique within a namespace. Is
required when creating resources, although some resources
may allow a client to request the generation of an appropriate
name automatically. Name is primarily intended for creation
idempotence and configuration definition. Cannot be updated.
More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
namespace:
description: "Namespace defines the space within each name
must be unique. An empty namespace is equivalent to the
\"default\" namespace, but \"default\" is the canonical
representation. Not all objects are required to be scoped
to a namespace - the value of this field for those objects
will be empty. \n Must be a DNS_LABEL. Cannot be updated.
More info: http://kubernetes.io/docs/user-guide/namespaces"
type: string
ownerReferences:
description: List of objects depended by this object. If
ALL objects in the list have been deleted, this object
will be garbage collected. If this object is managed by
a controller, then an entry in this list will point to
this controller, with the controller field set to true.
There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information
to let you identify an owning object. An owning object
must be in the same namespace as the dependent, or be
cluster-scoped, so there is no namespace field.
properties:
apiVersion:
description: API version of the referent.
type: string
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from
the key-value store until this reference is removed.
Defaults to false. To set this field, a user needs
"delete" permission of the owner, otherwise 422
(Unprocessable Entity) will be returned.
type: boolean
controller:
description: If true, this reference points to the
managing controller.
type: boolean
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
uid:
description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
type: string
required:
- apiVersion
- kind
- name
- uid
type: object
type: array
type: object
providerID:
description: ProviderID is the identification ID of the machine
Expand Down

0 comments on commit 7aa1a64

Please sign in to comment.