mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-27 05:43:02 +00:00
update modules
This commit is contained in:
@@ -124,7 +124,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -231,6 +231,150 @@ binding:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -266,6 +410,14 @@ binding:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -87,7 +87,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -218,6 +218,150 @@ component_status:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -253,6 +397,14 @@ component_status:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -65,7 +61,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ component_status_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ component_status_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -29,8 +29,8 @@ options:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
data:
|
||||
description:
|
||||
- Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN
|
||||
with an optional leading dot.
|
||||
- Data contains the configuration data. Each key must consist of alphanumeric
|
||||
characters, '-', '_' or '.'.
|
||||
type: dict
|
||||
debug:
|
||||
description:
|
||||
@@ -112,7 +112,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -134,8 +134,8 @@ config_map:
|
||||
type: str
|
||||
data:
|
||||
description:
|
||||
- Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN
|
||||
with an optional leading dot.
|
||||
- Data contains the configuration data. Each key must consist of alphanumeric
|
||||
characters, '-', '_' or '.'.
|
||||
type: complex
|
||||
contains: str, str
|
||||
kind:
|
||||
@@ -225,6 +225,150 @@ config_map:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -260,6 +404,14 @@ config_map:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -122,8 +118,8 @@ config_map_list:
|
||||
type: str
|
||||
data:
|
||||
description:
|
||||
- Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN
|
||||
with an optional leading dot.
|
||||
- Data contains the configuration data. Each key must consist of alphanumeric
|
||||
characters, '-', '_' or '.'.
|
||||
type: complex
|
||||
contains: str, str
|
||||
kind:
|
||||
@@ -216,6 +212,153 @@ config_map_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -252,6 +395,14 @@ config_map_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -116,7 +116,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -223,6 +223,150 @@ endpoints:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -258,6 +402,14 @@ endpoints:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ endpoints_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ endpoints_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -36,6 +36,10 @@ options:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
first_timestamp:
|
||||
description:
|
||||
- The time at which the event was first recorded. (Time of server receipt is in
|
||||
TypeMeta.)
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
@@ -101,6 +105,9 @@ options:
|
||||
- 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.
|
||||
type: dict
|
||||
last_timestamp:
|
||||
description:
|
||||
- The time at which the most recent occurrence of this event was recorded.
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
@@ -172,7 +179,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -338,6 +345,150 @@ event:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -373,6 +524,14 @@ event:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -270,6 +266,153 @@ event_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -306,6 +449,14 @@ event_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -143,7 +143,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -259,6 +259,150 @@ horizontal_pod_autoscaler:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -294,6 +438,14 @@ horizontal_pod_autoscaler:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ horizontal_pod_autoscaler_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ horizontal_pod_autoscaler_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -113,7 +113,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -220,6 +220,150 @@ limit_range:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -255,6 +399,14 @@ limit_range:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -306,18 +458,18 @@ limit_range:
|
||||
- Default resource requirement limit value by resource name if resource
|
||||
limit is omitted.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
default_request:
|
||||
description:
|
||||
- DefaultRequest is the default resource requirement request value by
|
||||
resource name if resource request is omitted.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
max:
|
||||
description:
|
||||
- Max usage constraints on this kind by resource name.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
max_limit_request_ratio:
|
||||
description:
|
||||
- MaxLimitRequestRatio if specified, the named resource must have a
|
||||
@@ -325,12 +477,12 @@ limit_range:
|
||||
is less than or equal to the enumerated value; this represents the
|
||||
max burst for the named resource.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
min:
|
||||
description:
|
||||
- Min usage constraints on this kind by resource name.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
type:
|
||||
description:
|
||||
- Type of resource that this limit applies to.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ limit_range_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ limit_range_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -300,18 +451,18 @@ limit_range_list:
|
||||
- Default resource requirement limit value by resource name if resource
|
||||
limit is omitted.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
default_request:
|
||||
description:
|
||||
- DefaultRequest is the default resource requirement request value
|
||||
by resource name if resource request is omitted.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
max:
|
||||
description:
|
||||
- Max usage constraints on this kind by resource name.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
max_limit_request_ratio:
|
||||
description:
|
||||
- MaxLimitRequestRatio if specified, the named resource must have
|
||||
@@ -319,12 +470,12 @@ limit_range_list:
|
||||
by request is less than or equal to the enumerated value; this
|
||||
represents the max burst for the named resource.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
min:
|
||||
description:
|
||||
- Min usage constraints on this kind by resource name.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
type:
|
||||
description:
|
||||
- Type of resource that this limit applies to.
|
||||
|
||||
600
library/k8s_v1_local_subject_access_review.py
Normal file
600
library/k8s_v1_local_subject_access_review.py
Normal file
@@ -0,0 +1,600 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_local_subject_access_review
|
||||
short_description: Kubernetes LocalSubjectAccessReview
|
||||
description:
|
||||
- Manage the lifecycle of a local_subject_access_review object. Supports check mode,
|
||||
and attempts to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
spec_extra:
|
||||
description:
|
||||
- Extra corresponds to the user.Info.GetExtra() method from the authenticator.
|
||||
Since that is input to the authorizer it needs a reflection here.
|
||||
aliases:
|
||||
- extra
|
||||
type: dict
|
||||
spec_groups:
|
||||
description:
|
||||
- Groups is the groups you're testing for.
|
||||
aliases:
|
||||
- groups
|
||||
type: list
|
||||
spec_non_resource_attributes_path:
|
||||
description:
|
||||
- Path is the URL path of the request
|
||||
aliases:
|
||||
- non_resource_attributes_path
|
||||
spec_non_resource_attributes_verb:
|
||||
description:
|
||||
- Verb is the standard HTTP verb
|
||||
aliases:
|
||||
- non_resource_attributes_verb
|
||||
spec_resource_attributes_group:
|
||||
description:
|
||||
- Group is the API Group of the Resource. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_group
|
||||
spec_resource_attributes_name:
|
||||
description:
|
||||
- Name is the name of the resource being requested for a "get" or deleted for
|
||||
a "delete". "" (empty) means all.
|
||||
aliases:
|
||||
- resource_attributes_name
|
||||
spec_resource_attributes_namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the action being requested. Currently, there is
|
||||
no distinction between no namespace and all namespaces "" (empty) is defaulted
|
||||
for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources
|
||||
"" (empty) means "all" for namespace scoped resources from a SubjectAccessReview
|
||||
or SelfSubjectAccessReview
|
||||
aliases:
|
||||
- resource_attributes_namespace
|
||||
spec_resource_attributes_resource:
|
||||
description:
|
||||
- Resource is one of the existing resource types. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_resource
|
||||
spec_resource_attributes_subresource:
|
||||
description:
|
||||
- Subresource is one of the existing resource types. "" means none.
|
||||
aliases:
|
||||
- resource_attributes_subresource
|
||||
spec_resource_attributes_verb:
|
||||
description:
|
||||
- 'Verb is a kubernetes resource API verb, like: get, list, watch, create, update,
|
||||
delete, proxy. "*" means all.'
|
||||
aliases:
|
||||
- resource_attributes_verb
|
||||
spec_resource_attributes_version:
|
||||
description:
|
||||
- Version is the API Version of the Resource. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_version
|
||||
spec_user:
|
||||
description:
|
||||
- User is the user you're testing for. If you specify "User" but not "Groups",
|
||||
then is it interpreted as "What if User were not a member of any groups
|
||||
aliases:
|
||||
- user
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
local_subject_access_review:
|
||||
type: complex
|
||||
returned: on success
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec holds information about the request being evaluated. spec.namespace must
|
||||
be equal to the namespace you made the request against. If empty, it is defaulted.
|
||||
type: complex
|
||||
contains:
|
||||
extra:
|
||||
description:
|
||||
- Extra corresponds to the user.Info.GetExtra() method from the authenticator.
|
||||
Since that is input to the authorizer it needs a reflection here.
|
||||
type: complex
|
||||
contains: str, list[str]
|
||||
groups:
|
||||
description:
|
||||
- Groups is the groups you're testing for.
|
||||
type: list
|
||||
contains: str
|
||||
non_resource_attributes:
|
||||
description:
|
||||
- NonResourceAttributes describes information for a non-resource access
|
||||
request
|
||||
type: complex
|
||||
contains:
|
||||
path:
|
||||
description:
|
||||
- Path is the URL path of the request
|
||||
type: str
|
||||
verb:
|
||||
description:
|
||||
- Verb is the standard HTTP verb
|
||||
type: str
|
||||
resource_attributes:
|
||||
description:
|
||||
- ResourceAuthorizationAttributes describes information for a resource access
|
||||
request
|
||||
type: complex
|
||||
contains:
|
||||
group:
|
||||
description:
|
||||
- Group is the API Group of the Resource. "*" means all.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the resource being requested for a "get" or deleted
|
||||
for a "delete". "" (empty) means all.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the action being requested. Currently,
|
||||
there is no distinction between no namespace and all namespaces ""
|
||||
(empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty
|
||||
for cluster-scoped resources "" (empty) means "all" for namespace
|
||||
scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||
type: str
|
||||
resource:
|
||||
description:
|
||||
- Resource is one of the existing resource types. "*" means all.
|
||||
type: str
|
||||
subresource:
|
||||
description:
|
||||
- Subresource is one of the existing resource types. "" means none.
|
||||
type: str
|
||||
verb:
|
||||
description:
|
||||
- 'Verb is a kubernetes resource API verb, like: get, list, watch, create,
|
||||
update, delete, proxy. "*" means all.'
|
||||
type: str
|
||||
version:
|
||||
description:
|
||||
- Version is the API Version of the Resource. "*" means all.
|
||||
type: str
|
||||
user:
|
||||
description:
|
||||
- User is the user you're testing for. If you specify "User" but not "Groups",
|
||||
then is it interpreted as "What if User were not a member of any groups
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- Status is filled in by the server and indicates whether the request is allowed
|
||||
or not
|
||||
type: complex
|
||||
contains:
|
||||
allowed:
|
||||
description:
|
||||
- Allowed is required. True if the action would be allowed, false otherwise.
|
||||
type: bool
|
||||
evaluation_error:
|
||||
description:
|
||||
- EvaluationError is an indication that some error occurred during the authorization
|
||||
check. It is entirely possible to get an error and be able to continue
|
||||
determine authorization status in spite of it. For instance, RBAC can
|
||||
be missing a role, but enough roles are still present and bound to reason
|
||||
about the request.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- Reason is optional. It indicates why a request was allowed or denied.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('local_subject_access_review', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -114,7 +114,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -272,6 +272,150 @@ namespace:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -307,6 +451,14 @@ namespace:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ namespace_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ namespace_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
653
library/k8s_v1_network_policy.py
Normal file
653
library/k8s_v1_network_policy.py
Normal file
@@ -0,0 +1,653 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_network_policy
|
||||
short_description: Kubernetes NetworkPolicy
|
||||
description:
|
||||
- Manage the lifecycle of a network_policy object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
spec_ingress:
|
||||
description:
|
||||
- List of ingress rules to be applied to the selected pods. Traffic is allowed
|
||||
to a pod if there are no NetworkPolicies selecting the pod (and cluster policy
|
||||
otherwise allows the traffic), OR if the traffic source is the pod's local node,
|
||||
OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
|
||||
objects whose podSelector matches the pod. If this field is empty then this
|
||||
NetworkPolicy does not allow any traffic (and serves solely to ensure that the
|
||||
pods it selects are isolated by default)
|
||||
aliases:
|
||||
- ingress
|
||||
type: list
|
||||
spec_pod_selector_match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements. The requirements
|
||||
are ANDed.
|
||||
aliases:
|
||||
- pod_selector_match_expressions
|
||||
type: list
|
||||
spec_pod_selector_match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key",
|
||||
the operator is "In", and the values array contains only "value". The requirements
|
||||
are ANDed.
|
||||
aliases:
|
||||
- pod_selector_match_labels
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
network_policy:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Specification of the desired behavior for this NetworkPolicy.
|
||||
type: complex
|
||||
contains:
|
||||
ingress:
|
||||
description:
|
||||
- List of ingress rules to be applied to the selected pods. Traffic is allowed
|
||||
to a pod if there are no NetworkPolicies selecting the pod (and cluster
|
||||
policy otherwise allows the traffic), OR if the traffic source is the
|
||||
pod's local node, OR if the traffic matches at least one ingress rule
|
||||
across all of the NetworkPolicy objects whose podSelector matches the
|
||||
pod. If this field is empty then this NetworkPolicy does not allow any
|
||||
traffic (and serves solely to ensure that the pods it selects are isolated
|
||||
by default)
|
||||
type: list
|
||||
contains:
|
||||
_from:
|
||||
description:
|
||||
- List of sources which should be able to access the pods selected for
|
||||
this rule. Items in this list are combined using a logical OR operation.
|
||||
If this field is empty or missing, this rule matches all sources (traffic
|
||||
not restricted by source). If this field is present and contains at
|
||||
least on item, this rule allows traffic only if the traffic matches
|
||||
at least one item in the from list.
|
||||
type: list
|
||||
contains:
|
||||
namespace_selector:
|
||||
description:
|
||||
- Selects Namespaces using cluster scoped-labels. This matches all
|
||||
pods in all namespaces selected by this label selector. This field
|
||||
follows standard label selector semantics. If present but empty,
|
||||
this selector selects all namespaces.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
type: list
|
||||
contains:
|
||||
key:
|
||||
description:
|
||||
- key is the label key that the selector applies to.
|
||||
type: str
|
||||
operator:
|
||||
description:
|
||||
- operator represents a key's relationship to a set of values.
|
||||
Valid operators ard In, NotIn, Exists and DoesNotExist.
|
||||
type: str
|
||||
values:
|
||||
description:
|
||||
- values is an array of string values. If the operator is
|
||||
In or NotIn, the values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist, the values array must
|
||||
be empty. This array is replaced during a strategic merge
|
||||
patch.
|
||||
type: list
|
||||
contains: str
|
||||
match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
in the matchLabels map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In", and the values
|
||||
array contains only "value". The requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
pod_selector:
|
||||
description:
|
||||
- This is a label selector which selects Pods in this namespace.
|
||||
This field follows standard label selector semantics. If present
|
||||
but empty, this selector selects all pods in this namespace.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
type: list
|
||||
contains:
|
||||
key:
|
||||
description:
|
||||
- key is the label key that the selector applies to.
|
||||
type: str
|
||||
operator:
|
||||
description:
|
||||
- operator represents a key's relationship to a set of values.
|
||||
Valid operators ard In, NotIn, Exists and DoesNotExist.
|
||||
type: str
|
||||
values:
|
||||
description:
|
||||
- values is an array of string values. If the operator is
|
||||
In or NotIn, the values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist, the values array must
|
||||
be empty. This array is replaced during a strategic merge
|
||||
patch.
|
||||
type: list
|
||||
contains: str
|
||||
match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
in the matchLabels map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In", and the values
|
||||
array contains only "value". The requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
ports:
|
||||
description:
|
||||
- List of ports which should be made accessible on the pods selected
|
||||
for this rule. Each item in this list is combined using a logical
|
||||
OR. If this field is empty or missing, this rule matches all ports
|
||||
(traffic not restricted by port). If this field is present and contains
|
||||
at least one item, then this rule allows traffic only if the traffic
|
||||
matches at least one port in the list.
|
||||
type: list
|
||||
contains:
|
||||
port:
|
||||
description:
|
||||
- The port on the given protocol. This can either be a numerical
|
||||
or named port on a pod. If this field is not provided, this matches
|
||||
all port names and numbers.
|
||||
type: str
|
||||
protocol:
|
||||
description:
|
||||
- The protocol (TCP or UDP) which traffic must match. If not specified,
|
||||
this field defaults to TCP.
|
||||
type: str
|
||||
pod_selector:
|
||||
description:
|
||||
- Selects the pods to which this NetworkPolicy object applies. The array
|
||||
of ingress rules is applied to any pods selected by this field. Multiple
|
||||
network policies can select the same set of pods. In this case, the ingress
|
||||
rules for each are combined additively. This field is NOT optional and
|
||||
follows standard label selector semantics. An empty podSelector matches
|
||||
all pods in this namespace.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements. The requirements
|
||||
are ANDed.
|
||||
type: list
|
||||
contains:
|
||||
key:
|
||||
description:
|
||||
- key is the label key that the selector applies to.
|
||||
type: str
|
||||
operator:
|
||||
description:
|
||||
- operator represents a key's relationship to a set of values. Valid
|
||||
operators ard In, NotIn, Exists and DoesNotExist.
|
||||
type: str
|
||||
values:
|
||||
description:
|
||||
- values is an array of string values. If the operator is In or
|
||||
NotIn, the values array must be non-empty. If the operator is
|
||||
Exists or DoesNotExist, the values array must be empty. This array
|
||||
is replaced during a strategic merge patch.
|
||||
type: list
|
||||
contains: str
|
||||
match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value} in
|
||||
the matchLabels map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In", and the values array
|
||||
contains only "value". The requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('network_policy', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
650
library/k8s_v1_network_policy_list.py
Normal file
650
library/k8s_v1_network_policy_list.py
Normal file
@@ -0,0 +1,650 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_network_policy_list
|
||||
short_description: Kubernetes NetworkPolicyList
|
||||
description:
|
||||
- Retrieve a list of network_policys. List operations provide a snapshot read of the
|
||||
underlying objects, returning a resource_version representing a consistent version
|
||||
of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
network_policy_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- Items is a list of schema objects.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Specification of the desired behavior for this NetworkPolicy.
|
||||
type: complex
|
||||
contains:
|
||||
ingress:
|
||||
description:
|
||||
- List of ingress rules to be applied to the selected pods. Traffic
|
||||
is allowed to a pod if there are no NetworkPolicies selecting the
|
||||
pod (and cluster policy otherwise allows the traffic), OR if the traffic
|
||||
source is the pod's local node, OR if the traffic matches at least
|
||||
one ingress rule across all of the NetworkPolicy objects whose podSelector
|
||||
matches the pod. If this field is empty then this NetworkPolicy does
|
||||
not allow any traffic (and serves solely to ensure that the pods it
|
||||
selects are isolated by default)
|
||||
type: list
|
||||
contains:
|
||||
_from:
|
||||
description:
|
||||
- List of sources which should be able to access the pods selected
|
||||
for this rule. Items in this list are combined using a logical
|
||||
OR operation. If this field is empty or missing, this rule matches
|
||||
all sources (traffic not restricted by source). If this field
|
||||
is present and contains at least on item, this rule allows traffic
|
||||
only if the traffic matches at least one item in the from list.
|
||||
type: list
|
||||
contains:
|
||||
namespace_selector:
|
||||
description:
|
||||
- Selects Namespaces using cluster scoped-labels. This matches
|
||||
all pods in all namespaces selected by this label selector.
|
||||
This field follows standard label selector semantics. If present
|
||||
but empty, this selector selects all namespaces.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
type: list
|
||||
contains:
|
||||
key:
|
||||
description:
|
||||
- key is the label key that the selector applies to.
|
||||
type: str
|
||||
operator:
|
||||
description:
|
||||
- operator represents a key's relationship to a set
|
||||
of values. Valid operators ard In, NotIn, Exists and
|
||||
DoesNotExist.
|
||||
type: str
|
||||
values:
|
||||
description:
|
||||
- values is an array of string values. If the operator
|
||||
is In or NotIn, the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist, the values
|
||||
array must be empty. This array is replaced during
|
||||
a strategic merge patch.
|
||||
type: list
|
||||
contains: str
|
||||
match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
in the matchLabels map is equivalent to an element of
|
||||
matchExpressions, whose key field is "key", the operator
|
||||
is "In", and the values array contains only "value". The
|
||||
requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
pod_selector:
|
||||
description:
|
||||
- This is a label selector which selects Pods in this namespace.
|
||||
This field follows standard label selector semantics. If present
|
||||
but empty, this selector selects all pods in this namespace.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
type: list
|
||||
contains:
|
||||
key:
|
||||
description:
|
||||
- key is the label key that the selector applies to.
|
||||
type: str
|
||||
operator:
|
||||
description:
|
||||
- operator represents a key's relationship to a set
|
||||
of values. Valid operators ard In, NotIn, Exists and
|
||||
DoesNotExist.
|
||||
type: str
|
||||
values:
|
||||
description:
|
||||
- values is an array of string values. If the operator
|
||||
is In or NotIn, the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist, the values
|
||||
array must be empty. This array is replaced during
|
||||
a strategic merge patch.
|
||||
type: list
|
||||
contains: str
|
||||
match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
in the matchLabels map is equivalent to an element of
|
||||
matchExpressions, whose key field is "key", the operator
|
||||
is "In", and the values array contains only "value". The
|
||||
requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
ports:
|
||||
description:
|
||||
- List of ports which should be made accessible on the pods selected
|
||||
for this rule. Each item in this list is combined using a logical
|
||||
OR. If this field is empty or missing, this rule matches all ports
|
||||
(traffic not restricted by port). If this field is present and
|
||||
contains at least one item, then this rule allows traffic only
|
||||
if the traffic matches at least one port in the list.
|
||||
type: list
|
||||
contains:
|
||||
port:
|
||||
description:
|
||||
- The port on the given protocol. This can either be a numerical
|
||||
or named port on a pod. If this field is not provided, this
|
||||
matches all port names and numbers.
|
||||
type: str
|
||||
protocol:
|
||||
description:
|
||||
- The protocol (TCP or UDP) which traffic must match. If not
|
||||
specified, this field defaults to TCP.
|
||||
type: str
|
||||
pod_selector:
|
||||
description:
|
||||
- Selects the pods to which this NetworkPolicy object applies. The array
|
||||
of ingress rules is applied to any pods selected by this field. Multiple
|
||||
network policies can select the same set of pods. In this case, the
|
||||
ingress rules for each are combined additively. This field is NOT
|
||||
optional and follows standard label selector semantics. An empty podSelector
|
||||
matches all pods in this namespace.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
description:
|
||||
- matchExpressions is a list of label selector requirements. The
|
||||
requirements are ANDed.
|
||||
type: list
|
||||
contains:
|
||||
key:
|
||||
description:
|
||||
- key is the label key that the selector applies to.
|
||||
type: str
|
||||
operator:
|
||||
description:
|
||||
- operator represents a key's relationship to a set of values.
|
||||
Valid operators ard In, NotIn, Exists and DoesNotExist.
|
||||
type: str
|
||||
values:
|
||||
description:
|
||||
- values is an array of string values. If the operator is In
|
||||
or NotIn, the values array must be non-empty. If the operator
|
||||
is Exists or DoesNotExist, the values array must be empty.
|
||||
This array is replaced during a strategic merge patch.
|
||||
type: list
|
||||
contains: str
|
||||
match_labels:
|
||||
description:
|
||||
- matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
in the matchLabels map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In", and the values
|
||||
array contains only "value". The requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('network_policy_list', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -92,6 +92,12 @@ options:
|
||||
- 'ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>'
|
||||
aliases:
|
||||
- provider_id
|
||||
spec_taints:
|
||||
description:
|
||||
- If specified, the node's taints.
|
||||
aliases:
|
||||
- taints
|
||||
type: list
|
||||
spec_unschedulable:
|
||||
description:
|
||||
- Unschedulable controls node schedulability of new pods. By default, node is
|
||||
@@ -130,7 +136,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -237,6 +243,150 @@ node:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -272,6 +422,14 @@ node:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -310,7 +468,7 @@ node:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec defines the behavior of a node. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Spec defines the behavior of a node.
|
||||
type: complex
|
||||
contains:
|
||||
external_id:
|
||||
@@ -326,6 +484,30 @@ node:
|
||||
description:
|
||||
- 'ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>'
|
||||
type: str
|
||||
taints:
|
||||
description:
|
||||
- If specified, the node's taints.
|
||||
type: list
|
||||
contains:
|
||||
effect:
|
||||
description:
|
||||
- Required. The effect of the taint on pods that do not tolerate the
|
||||
taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
|
||||
type: str
|
||||
key:
|
||||
description:
|
||||
- Required. The taint key to be applied to a node.
|
||||
type: str
|
||||
time_added:
|
||||
description:
|
||||
- TimeAdded represents the time at which the taint was added. It is
|
||||
only written for NoExecute taints.
|
||||
type: complex
|
||||
contains: {}
|
||||
value:
|
||||
description:
|
||||
- Required. The taint value corresponding to the taint key.
|
||||
type: str
|
||||
unschedulable:
|
||||
description:
|
||||
- Unschedulable controls node schedulability of new pods. By default, node
|
||||
@@ -355,12 +537,12 @@ node:
|
||||
- Allocatable represents the resources of a node that are available for
|
||||
scheduling. Defaults to Capacity.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
capacity:
|
||||
description:
|
||||
- Capacity represents the total resources of a node.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
conditions:
|
||||
description:
|
||||
- Conditions is an array of current observed node conditions.
|
||||
@@ -454,7 +636,7 @@ node:
|
||||
machine_id:
|
||||
description:
|
||||
- 'MachineID reported by the node. For unique machine identification
|
||||
in the cluster this field is prefered. Learn more from man(5) machine-id:
|
||||
in the cluster this field is preferred. Learn more from man(5) machine-id:
|
||||
http://man7.org/linux/man-pages/man5/machine-id.5.html'
|
||||
type: str
|
||||
operating_system:
|
||||
@@ -469,7 +651,7 @@ node:
|
||||
system_uuid:
|
||||
description:
|
||||
- SystemUUID reported by the node. For unique machine identification
|
||||
MachineID is prefered. This field is specific to Red Hat hosts
|
||||
MachineID is preferred. This field is specific to Red Hat hosts
|
||||
type: str
|
||||
phase:
|
||||
description:
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ node_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ node_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -287,7 +438,7 @@ node_list:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec defines the behavior of a node. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Spec defines the behavior of a node.
|
||||
type: complex
|
||||
contains:
|
||||
external_id:
|
||||
@@ -303,6 +454,31 @@ node_list:
|
||||
description:
|
||||
- 'ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>'
|
||||
type: str
|
||||
taints:
|
||||
description:
|
||||
- If specified, the node's taints.
|
||||
type: list
|
||||
contains:
|
||||
effect:
|
||||
description:
|
||||
- Required. The effect of the taint on pods that do not tolerate
|
||||
the taint. Valid effects are NoSchedule, PreferNoSchedule and
|
||||
NoExecute.
|
||||
type: str
|
||||
key:
|
||||
description:
|
||||
- Required. The taint key to be applied to a node.
|
||||
type: str
|
||||
time_added:
|
||||
description:
|
||||
- TimeAdded represents the time at which the taint was added. It
|
||||
is only written for NoExecute taints.
|
||||
type: complex
|
||||
contains: {}
|
||||
value:
|
||||
description:
|
||||
- Required. The taint value corresponding to the taint key.
|
||||
type: str
|
||||
unschedulable:
|
||||
description:
|
||||
- Unschedulable controls node schedulability of new pods. By default,
|
||||
@@ -332,12 +508,12 @@ node_list:
|
||||
- Allocatable represents the resources of a node that are available
|
||||
for scheduling. Defaults to Capacity.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
capacity:
|
||||
description:
|
||||
- Capacity represents the total resources of a node.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
conditions:
|
||||
description:
|
||||
- Conditions is an array of current observed node conditions.
|
||||
@@ -431,7 +607,7 @@ node_list:
|
||||
machine_id:
|
||||
description:
|
||||
- 'MachineID reported by the node. For unique machine identification
|
||||
in the cluster this field is prefered. Learn more from man(5)
|
||||
in the cluster this field is preferred. Learn more from man(5)
|
||||
machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html'
|
||||
type: str
|
||||
operating_system:
|
||||
@@ -446,7 +622,7 @@ node_list:
|
||||
system_uuid:
|
||||
description:
|
||||
- SystemUUID reported by the node. For unique machine identification
|
||||
MachineID is prefered. This field is specific to Red Hat hosts
|
||||
MachineID is preferred. This field is specific to Red Hat hosts
|
||||
type: str
|
||||
phase:
|
||||
description:
|
||||
|
||||
@@ -131,6 +131,13 @@ options:
|
||||
system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||
aliases:
|
||||
- azure_disk_fs_type
|
||||
spec_azure_disk_kind:
|
||||
description:
|
||||
- 'Expected values Shared: mulitple blob disks per storage account Dedicated:
|
||||
single blob disk per storage account Managed: azure managed data disk (only
|
||||
in managed availability set). defaults to shared'
|
||||
aliases:
|
||||
- azure_disk_kind
|
||||
spec_azure_disk_read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly setting
|
||||
@@ -370,6 +377,18 @@ options:
|
||||
- Path of the directory on the host.
|
||||
aliases:
|
||||
- host_path_path
|
||||
spec_iscsi_chap_auth_discovery:
|
||||
description:
|
||||
- whether support iSCSI Discovery CHAP authentication
|
||||
aliases:
|
||||
- iscsi_chap_auth_discovery
|
||||
type: bool
|
||||
spec_iscsi_chap_auth_session:
|
||||
description:
|
||||
- whether support iSCSI Session CHAP authentication
|
||||
aliases:
|
||||
- iscsi_chap_auth_session
|
||||
type: bool
|
||||
spec_iscsi_fs_type:
|
||||
description:
|
||||
- 'Filesystem type of the volume that you want to mount. Tip: Ensure that the
|
||||
@@ -394,18 +413,36 @@ options:
|
||||
aliases:
|
||||
- iscsi_lun
|
||||
type: int
|
||||
spec_iscsi_portals:
|
||||
description:
|
||||
- iSCSI target portal List. The portal is either an IP or ip_addr:port if the
|
||||
port is other than default (typically TCP ports 860 and 3260).
|
||||
aliases:
|
||||
- iscsi_portals
|
||||
type: list
|
||||
spec_iscsi_read_only:
|
||||
description:
|
||||
- ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
|
||||
aliases:
|
||||
- iscsi_read_only
|
||||
type: bool
|
||||
spec_iscsi_secret_ref_name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
aliases:
|
||||
- iscsi_secret_ref_name
|
||||
spec_iscsi_target_portal:
|
||||
description:
|
||||
- iSCSI target portal. The portal is either an IP or ip_addr:port if the port
|
||||
is other than default (typically TCP ports 860 and 3260).
|
||||
aliases:
|
||||
- iscsi_target_portal
|
||||
spec_local_path:
|
||||
description:
|
||||
- The full path to the volume on the node For alpha, this path must be a directory
|
||||
Once block as a source is supported, then this path can point to a block device
|
||||
aliases:
|
||||
- local_path
|
||||
spec_nfs_path:
|
||||
description:
|
||||
- Path that is exported by the NFS server.
|
||||
@@ -441,6 +478,25 @@ options:
|
||||
- ID that identifies Photon Controller persistent disk
|
||||
aliases:
|
||||
- photon_persistent_disk_pd_id
|
||||
spec_portworx_volume_fs_type:
|
||||
description:
|
||||
- FSType represents the filesystem type to mount Must be a filesystem type supported
|
||||
by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
|
||||
if unspecified.
|
||||
aliases:
|
||||
- portworx_volume_fs_type
|
||||
spec_portworx_volume_read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly setting
|
||||
in VolumeMounts.
|
||||
aliases:
|
||||
- portworx_volume_read_only
|
||||
type: bool
|
||||
spec_portworx_volume_volume_id:
|
||||
description:
|
||||
- VolumeID uniquely identifies a Portworx volume
|
||||
aliases:
|
||||
- portworx_volume_volume_id
|
||||
spec_quobyte_group:
|
||||
description:
|
||||
- Group to map volume access to Default is no group
|
||||
@@ -514,12 +570,154 @@ options:
|
||||
- The rados user name. Default is admin.
|
||||
aliases:
|
||||
- rbd_user
|
||||
spec_scale_io_fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported by the host operating
|
||||
system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||
aliases:
|
||||
- scale_io_fs_type
|
||||
spec_scale_io_gateway:
|
||||
description:
|
||||
- The host address of the ScaleIO API Gateway.
|
||||
aliases:
|
||||
- scale_io_gateway
|
||||
spec_scale_io_protection_domain:
|
||||
description:
|
||||
- The name of the Protection Domain for the configured storage (defaults to "default").
|
||||
aliases:
|
||||
- scale_io_protection_domain
|
||||
spec_scale_io_read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly setting
|
||||
in VolumeMounts.
|
||||
aliases:
|
||||
- scale_io_read_only
|
||||
type: bool
|
||||
spec_scale_io_secret_ref_name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
aliases:
|
||||
- scale_io_secret_ref_name
|
||||
spec_scale_io_ssl_enabled:
|
||||
description:
|
||||
- Flag to enable/disable SSL communication with Gateway, default false
|
||||
aliases:
|
||||
- scale_io_ssl_enabled
|
||||
type: bool
|
||||
spec_scale_io_storage_mode:
|
||||
description:
|
||||
- Indicates whether the storage for a volume should be thick or thin (defaults
|
||||
to "thin").
|
||||
aliases:
|
||||
- scale_io_storage_mode
|
||||
spec_scale_io_storage_pool:
|
||||
description:
|
||||
- The Storage Pool associated with the protection domain (defaults to "default").
|
||||
aliases:
|
||||
- scale_io_storage_pool
|
||||
spec_scale_io_system:
|
||||
description:
|
||||
- The name of the storage system as configured in ScaleIO.
|
||||
aliases:
|
||||
- scale_io_system
|
||||
spec_scale_io_volume_name:
|
||||
description:
|
||||
- The name of a volume already created in the ScaleIO system that is associated
|
||||
with this volume source.
|
||||
aliases:
|
||||
- scale_io_volume_name
|
||||
spec_storage_class_name:
|
||||
description:
|
||||
- Name of StorageClass to which this persistent volume belongs. Empty value means
|
||||
that this volume does not belong to any StorageClass.
|
||||
aliases:
|
||||
- storage_class_name
|
||||
spec_storageos_fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported by the host operating
|
||||
system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||
aliases:
|
||||
- storageos_fs_type
|
||||
spec_storageos_read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly setting
|
||||
in VolumeMounts.
|
||||
aliases:
|
||||
- storageos_read_only
|
||||
type: bool
|
||||
spec_storageos_secret_ref_api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
aliases:
|
||||
- storageos_secret_ref_api_version
|
||||
spec_storageos_secret_ref_field_path:
|
||||
description:
|
||||
- 'If referring to a piece of an object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within a pod, this would
|
||||
take on a value like: "spec.containers{name}" (where "name" refers to the name
|
||||
of the container that triggered the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of an object.'
|
||||
aliases:
|
||||
- storageos_secret_ref_field_path
|
||||
spec_storageos_secret_ref_kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
aliases:
|
||||
- storageos_secret_ref_kind
|
||||
spec_storageos_secret_ref_name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
aliases:
|
||||
- storageos_secret_ref_name
|
||||
spec_storageos_secret_ref_namespace:
|
||||
description:
|
||||
- Namespace of the referent.
|
||||
aliases:
|
||||
- storageos_secret_ref_namespace
|
||||
spec_storageos_secret_ref_resource_version:
|
||||
description:
|
||||
- Specific resourceVersion to which this reference is made, if any.
|
||||
aliases:
|
||||
- storageos_secret_ref_resource_version
|
||||
spec_storageos_secret_ref_uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
aliases:
|
||||
- storageos_secret_ref_uid
|
||||
spec_storageos_volume_name:
|
||||
description:
|
||||
- VolumeName is the human-readable name of the StorageOS volume. Volume names
|
||||
are only unique within a namespace.
|
||||
aliases:
|
||||
- storageos_volume_name
|
||||
spec_storageos_volume_namespace:
|
||||
description:
|
||||
- VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace
|
||||
is specified then the Pod's namespace will be used. This allows the Kubernetes
|
||||
name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName
|
||||
to any name to override the default behaviour. Set to "default" if you are not
|
||||
using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS
|
||||
will be created.
|
||||
aliases:
|
||||
- storageos_volume_namespace
|
||||
spec_vsphere_volume_fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported by the host operating
|
||||
system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||
aliases:
|
||||
- vsphere_volume_fs_type
|
||||
spec_vsphere_volume_storage_policy_id:
|
||||
description:
|
||||
- Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
|
||||
aliases:
|
||||
- vsphere_volume_storage_policy_id
|
||||
spec_vsphere_volume_storage_policy_name:
|
||||
description:
|
||||
- Storage Policy Based Management (SPBM) profile name.
|
||||
aliases:
|
||||
- vsphere_volume_storage_policy_name
|
||||
spec_vsphere_volume_volume_path:
|
||||
description:
|
||||
- Path that identifies vSphere volume vmdk
|
||||
@@ -556,7 +754,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -673,6 +871,150 @@ persistent_volume:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -708,6 +1050,14 @@ persistent_volume:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -808,6 +1158,12 @@ persistent_volume:
|
||||
host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred
|
||||
to be "ext4" if unspecified.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- 'Expected values Shared: mulitple blob disks per storage account Dedicated:
|
||||
single blob disk per storage account Managed: azure managed data disk
|
||||
(only in managed availability set). defaults to shared'
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
@@ -836,7 +1192,7 @@ persistent_volume:
|
||||
description:
|
||||
- A description of the persistent volume's resources and capacity.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
cephfs:
|
||||
description:
|
||||
- CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
|
||||
@@ -1089,6 +1445,14 @@ persistent_volume:
|
||||
host machine and then exposed to the pod. Provisioned by an admin.
|
||||
type: complex
|
||||
contains:
|
||||
chap_auth_discovery:
|
||||
description:
|
||||
- whether support iSCSI Discovery CHAP authentication
|
||||
type: bool
|
||||
chap_auth_session:
|
||||
description:
|
||||
- whether support iSCSI Session CHAP authentication
|
||||
type: bool
|
||||
fs_type:
|
||||
description:
|
||||
- 'Filesystem type of the volume that you want to mount. Tip: Ensure
|
||||
@@ -1109,16 +1473,42 @@ persistent_volume:
|
||||
description:
|
||||
- iSCSI target lun number.
|
||||
type: int
|
||||
portals:
|
||||
description:
|
||||
- iSCSI target portal List. The portal is either an IP or ip_addr:port
|
||||
if the port is other than default (typically TCP ports 860 and 3260).
|
||||
type: list
|
||||
contains: str
|
||||
read_only:
|
||||
description:
|
||||
- ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults
|
||||
to false.
|
||||
type: bool
|
||||
secret_ref:
|
||||
description:
|
||||
- CHAP secret for iSCSI target and initiator authentication
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
target_portal:
|
||||
description:
|
||||
- iSCSI target portal. The portal is either an IP or ip_addr:port if
|
||||
the port is other than default (typically TCP ports 860 and 3260).
|
||||
type: str
|
||||
local:
|
||||
description:
|
||||
- Local represents directly-attached storage with node affinity
|
||||
type: complex
|
||||
contains:
|
||||
path:
|
||||
description:
|
||||
- The full path to the volume on the node For alpha, this path must
|
||||
be a directory Once block as a source is supported, then this path
|
||||
can point to a block device
|
||||
type: str
|
||||
nfs:
|
||||
description:
|
||||
- NFS represents an NFS mount on the host. Provisioned by an admin.
|
||||
@@ -1159,6 +1549,27 @@ persistent_volume:
|
||||
description:
|
||||
- ID that identifies Photon Controller persistent disk
|
||||
type: str
|
||||
portworx_volume:
|
||||
description:
|
||||
- PortworxVolume represents a portworx volume attached and mounted on kubelets
|
||||
host machine
|
||||
type: complex
|
||||
contains:
|
||||
fs_type:
|
||||
description:
|
||||
- FSType represents the filesystem type to mount Must be a filesystem
|
||||
type supported by the host operating system. Ex. "ext4", "xfs". Implicitly
|
||||
inferred to be "ext4" if unspecified.
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
setting in VolumeMounts.
|
||||
type: bool
|
||||
volume_id:
|
||||
description:
|
||||
- VolumeID uniquely identifies a Portworx volume
|
||||
type: str
|
||||
quobyte:
|
||||
description:
|
||||
- Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||
@@ -1237,6 +1648,144 @@ persistent_volume:
|
||||
description:
|
||||
- The rados user name. Default is admin.
|
||||
type: str
|
||||
scale_io:
|
||||
description:
|
||||
- ScaleIO represents a ScaleIO persistent volume attached and mounted on
|
||||
Kubernetes nodes.
|
||||
type: complex
|
||||
contains:
|
||||
fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported by the
|
||||
host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred
|
||||
to be "ext4" if unspecified.
|
||||
type: str
|
||||
gateway:
|
||||
description:
|
||||
- The host address of the ScaleIO API Gateway.
|
||||
type: str
|
||||
protection_domain:
|
||||
description:
|
||||
- The name of the Protection Domain for the configured storage (defaults
|
||||
to "default").
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
setting in VolumeMounts.
|
||||
type: bool
|
||||
secret_ref:
|
||||
description:
|
||||
- SecretRef references to the secret for ScaleIO user and other sensitive
|
||||
information. If this is not provided, Login operation will fail.
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
ssl_enabled:
|
||||
description:
|
||||
- Flag to enable/disable SSL communication with Gateway, default false
|
||||
type: bool
|
||||
storage_mode:
|
||||
description:
|
||||
- Indicates whether the storage for a volume should be thick or thin
|
||||
(defaults to "thin").
|
||||
type: str
|
||||
storage_pool:
|
||||
description:
|
||||
- The Storage Pool associated with the protection domain (defaults to
|
||||
"default").
|
||||
type: str
|
||||
system:
|
||||
description:
|
||||
- The name of the storage system as configured in ScaleIO.
|
||||
type: str
|
||||
volume_name:
|
||||
description:
|
||||
- The name of a volume already created in the ScaleIO system that is
|
||||
associated with this volume source.
|
||||
type: str
|
||||
storage_class_name:
|
||||
description:
|
||||
- Name of StorageClass to which this persistent volume belongs. Empty value
|
||||
means that this volume does not belong to any StorageClass.
|
||||
type: str
|
||||
storageos:
|
||||
description:
|
||||
- StorageOS represents a StorageOS volume that is attached to the kubelet's
|
||||
host machine and mounted into the pod
|
||||
type: complex
|
||||
contains:
|
||||
fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported by the
|
||||
host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred
|
||||
to be "ext4" if unspecified.
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
setting in VolumeMounts.
|
||||
type: bool
|
||||
secret_ref:
|
||||
description:
|
||||
- SecretRef specifies the secret to use for obtaining the StorageOS
|
||||
API credentials. If not specified, default values will be attempted.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
field_path:
|
||||
description:
|
||||
- 'If referring to a piece of an object instead of an entire object,
|
||||
this string should contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For example, if the
|
||||
object reference is to a container within a pod, this would take
|
||||
on a value like: "spec.containers{name}" (where "name" refers
|
||||
to the name of the container that triggered the event) or if no
|
||||
container name is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to have some
|
||||
well-defined way of referencing a part of an object.'
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- Specific resourceVersion to which this reference is made, if any.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
volume_name:
|
||||
description:
|
||||
- VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
names are only unique within a namespace.
|
||||
type: str
|
||||
volume_namespace:
|
||||
description:
|
||||
- VolumeNamespace specifies the scope of the volume within StorageOS.
|
||||
If no namespace is specified then the Pod's namespace will be used.
|
||||
This allows the Kubernetes name scoping to be mirrored within StorageOS
|
||||
for tighter integration. Set VolumeName to any name to override the
|
||||
default behaviour. Set to "default" if you are not using namespaces
|
||||
within StorageOS. Namespaces that do not pre-exist within StorageOS
|
||||
will be created.
|
||||
type: str
|
||||
vsphere_volume:
|
||||
description:
|
||||
- VsphereVolume represents a vSphere volume attached and mounted on kubelets
|
||||
@@ -1249,6 +1798,15 @@ persistent_volume:
|
||||
host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred
|
||||
to be "ext4" if unspecified.
|
||||
type: str
|
||||
storage_policy_id:
|
||||
description:
|
||||
- Storage Policy Based Management (SPBM) profile ID associated with
|
||||
the StoragePolicyName.
|
||||
type: str
|
||||
storage_policy_name:
|
||||
description:
|
||||
- Storage Policy Based Management (SPBM) profile name.
|
||||
type: str
|
||||
volume_path:
|
||||
description:
|
||||
- Path that identifies vSphere volume vmdk
|
||||
|
||||
@@ -112,6 +112,11 @@ options:
|
||||
aliases:
|
||||
- selector_match_labels
|
||||
type: dict
|
||||
spec_storage_class_name:
|
||||
description:
|
||||
- Name of the StorageClass required by the claim.
|
||||
aliases:
|
||||
- storage_class_name
|
||||
spec_volume_name:
|
||||
description:
|
||||
- VolumeName is the binding reference to the PersistentVolume backing this claim.
|
||||
@@ -148,7 +153,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -264,6 +269,150 @@ persistent_volume_claim:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -299,6 +448,14 @@ persistent_volume_claim:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -354,14 +511,14 @@ persistent_volume_claim:
|
||||
description:
|
||||
- Limits describes the maximum amount of compute resources allowed.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
requests:
|
||||
description:
|
||||
- Requests describes the minimum amount of compute resources required.
|
||||
If Requests is omitted for a container, it defaults to Limits if that
|
||||
is explicitly specified, otherwise to an implementation-defined value.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
selector:
|
||||
description:
|
||||
- A label query over volumes to consider for binding.
|
||||
@@ -398,6 +555,10 @@ persistent_volume_claim:
|
||||
contains only "value". The requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
storage_class_name:
|
||||
description:
|
||||
- Name of the StorageClass required by the claim.
|
||||
type: str
|
||||
volume_name:
|
||||
description:
|
||||
- VolumeName is the binding reference to the PersistentVolume backing this
|
||||
@@ -419,7 +580,7 @@ persistent_volume_claim:
|
||||
description:
|
||||
- Represents the actual resources of the underlying volume.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
phase:
|
||||
description:
|
||||
- Phase represents the current phase of PersistentVolumeClaim.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ persistent_volume_claim_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ persistent_volume_claim_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -305,7 +456,7 @@ persistent_volume_claim_list:
|
||||
description:
|
||||
- Limits describes the maximum amount of compute resources allowed.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
requests:
|
||||
description:
|
||||
- Requests describes the minimum amount of compute resources required.
|
||||
@@ -313,7 +464,7 @@ persistent_volume_claim_list:
|
||||
if that is explicitly specified, otherwise to an implementation-defined
|
||||
value.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
selector:
|
||||
description:
|
||||
- A label query over volumes to consider for binding.
|
||||
@@ -350,6 +501,10 @@ persistent_volume_claim_list:
|
||||
array contains only "value". The requirements are ANDed.
|
||||
type: complex
|
||||
contains: str, str
|
||||
storage_class_name:
|
||||
description:
|
||||
- Name of the StorageClass required by the claim.
|
||||
type: str
|
||||
volume_name:
|
||||
description:
|
||||
- VolumeName is the binding reference to the PersistentVolume backing
|
||||
@@ -371,7 +526,7 @@ persistent_volume_claim_list:
|
||||
description:
|
||||
- Represents the actual resources of the underlying volume.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
phase:
|
||||
description:
|
||||
- Phase represents the current phase of PersistentVolumeClaim.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ persistent_volume_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ persistent_volume_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -349,6 +500,13 @@ persistent_volume_list:
|
||||
by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly
|
||||
inferred to be "ext4" if unspecified.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- 'Expected values Shared: mulitple blob disks per storage account
|
||||
Dedicated: single blob disk per storage account Managed: azure
|
||||
managed data disk (only in managed availability set). defaults
|
||||
to shared'
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
@@ -378,7 +536,7 @@ persistent_volume_list:
|
||||
description:
|
||||
- A description of the persistent volume's resources and capacity.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
cephfs:
|
||||
description:
|
||||
- CephFS represents a Ceph FS mount on the host that shares a pod's
|
||||
@@ -633,6 +791,14 @@ persistent_volume_list:
|
||||
host machine and then exposed to the pod. Provisioned by an admin.
|
||||
type: complex
|
||||
contains:
|
||||
chap_auth_discovery:
|
||||
description:
|
||||
- whether support iSCSI Discovery CHAP authentication
|
||||
type: bool
|
||||
chap_auth_session:
|
||||
description:
|
||||
- whether support iSCSI Session CHAP authentication
|
||||
type: bool
|
||||
fs_type:
|
||||
description:
|
||||
- 'Filesystem type of the volume that you want to mount. Tip: Ensure
|
||||
@@ -653,17 +819,44 @@ persistent_volume_list:
|
||||
description:
|
||||
- iSCSI target lun number.
|
||||
type: int
|
||||
portals:
|
||||
description:
|
||||
- iSCSI target portal List. The portal is either an IP or ip_addr:port
|
||||
if the port is other than default (typically TCP ports 860 and
|
||||
3260).
|
||||
type: list
|
||||
contains: str
|
||||
read_only:
|
||||
description:
|
||||
- ReadOnly here will force the ReadOnly setting in VolumeMounts.
|
||||
Defaults to false.
|
||||
type: bool
|
||||
secret_ref:
|
||||
description:
|
||||
- CHAP secret for iSCSI target and initiator authentication
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
target_portal:
|
||||
description:
|
||||
- iSCSI target portal. The portal is either an IP or ip_addr:port
|
||||
if the port is other than default (typically TCP ports 860 and
|
||||
3260).
|
||||
type: str
|
||||
local:
|
||||
description:
|
||||
- Local represents directly-attached storage with node affinity
|
||||
type: complex
|
||||
contains:
|
||||
path:
|
||||
description:
|
||||
- The full path to the volume on the node For alpha, this path must
|
||||
be a directory Once block as a source is supported, then this
|
||||
path can point to a block device
|
||||
type: str
|
||||
nfs:
|
||||
description:
|
||||
- NFS represents an NFS mount on the host. Provisioned by an admin.
|
||||
@@ -704,6 +897,27 @@ persistent_volume_list:
|
||||
description:
|
||||
- ID that identifies Photon Controller persistent disk
|
||||
type: str
|
||||
portworx_volume:
|
||||
description:
|
||||
- PortworxVolume represents a portworx volume attached and mounted on
|
||||
kubelets host machine
|
||||
type: complex
|
||||
contains:
|
||||
fs_type:
|
||||
description:
|
||||
- FSType represents the filesystem type to mount Must be a filesystem
|
||||
type supported by the host operating system. Ex. "ext4", "xfs".
|
||||
Implicitly inferred to be "ext4" if unspecified.
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
setting in VolumeMounts.
|
||||
type: bool
|
||||
volume_id:
|
||||
description:
|
||||
- VolumeID uniquely identifies a Portworx volume
|
||||
type: str
|
||||
quobyte:
|
||||
description:
|
||||
- Quobyte represents a Quobyte mount on the host that shares a pod's
|
||||
@@ -784,6 +998,148 @@ persistent_volume_list:
|
||||
description:
|
||||
- The rados user name. Default is admin.
|
||||
type: str
|
||||
scale_io:
|
||||
description:
|
||||
- ScaleIO represents a ScaleIO persistent volume attached and mounted
|
||||
on Kubernetes nodes.
|
||||
type: complex
|
||||
contains:
|
||||
fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported
|
||||
by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly
|
||||
inferred to be "ext4" if unspecified.
|
||||
type: str
|
||||
gateway:
|
||||
description:
|
||||
- The host address of the ScaleIO API Gateway.
|
||||
type: str
|
||||
protection_domain:
|
||||
description:
|
||||
- The name of the Protection Domain for the configured storage (defaults
|
||||
to "default").
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
setting in VolumeMounts.
|
||||
type: bool
|
||||
secret_ref:
|
||||
description:
|
||||
- SecretRef references to the secret for ScaleIO user and other
|
||||
sensitive information. If this is not provided, Login operation
|
||||
will fail.
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
ssl_enabled:
|
||||
description:
|
||||
- Flag to enable/disable SSL communication with Gateway, default
|
||||
false
|
||||
type: bool
|
||||
storage_mode:
|
||||
description:
|
||||
- Indicates whether the storage for a volume should be thick or
|
||||
thin (defaults to "thin").
|
||||
type: str
|
||||
storage_pool:
|
||||
description:
|
||||
- The Storage Pool associated with the protection domain (defaults
|
||||
to "default").
|
||||
type: str
|
||||
system:
|
||||
description:
|
||||
- The name of the storage system as configured in ScaleIO.
|
||||
type: str
|
||||
volume_name:
|
||||
description:
|
||||
- The name of a volume already created in the ScaleIO system that
|
||||
is associated with this volume source.
|
||||
type: str
|
||||
storage_class_name:
|
||||
description:
|
||||
- Name of StorageClass to which this persistent volume belongs. Empty
|
||||
value means that this volume does not belong to any StorageClass.
|
||||
type: str
|
||||
storageos:
|
||||
description:
|
||||
- StorageOS represents a StorageOS volume that is attached to the kubelet's
|
||||
host machine and mounted into the pod
|
||||
type: complex
|
||||
contains:
|
||||
fs_type:
|
||||
description:
|
||||
- Filesystem type to mount. Must be a filesystem type supported
|
||||
by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly
|
||||
inferred to be "ext4" if unspecified.
|
||||
type: str
|
||||
read_only:
|
||||
description:
|
||||
- Defaults to false (read/write). ReadOnly here will force the ReadOnly
|
||||
setting in VolumeMounts.
|
||||
type: bool
|
||||
secret_ref:
|
||||
description:
|
||||
- SecretRef specifies the secret to use for obtaining the StorageOS
|
||||
API credentials. If not specified, default values will be attempted.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
field_path:
|
||||
description:
|
||||
- 'If referring to a piece of an object instead of an entire
|
||||
object, this string should contain a valid JSON/Go field access
|
||||
statement, such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object.'
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- Specific resourceVersion to which this reference is made,
|
||||
if any.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
volume_name:
|
||||
description:
|
||||
- VolumeName is the human-readable name of the StorageOS volume.
|
||||
Volume names are only unique within a namespace.
|
||||
type: str
|
||||
volume_namespace:
|
||||
description:
|
||||
- VolumeNamespace specifies the scope of the volume within StorageOS.
|
||||
If no namespace is specified then the Pod's namespace will be
|
||||
used. This allows the Kubernetes name scoping to be mirrored within
|
||||
StorageOS for tighter integration. Set VolumeName to any name
|
||||
to override the default behaviour. Set to "default" if you are
|
||||
not using namespaces within StorageOS. Namespaces that do not
|
||||
pre-exist within StorageOS will be created.
|
||||
type: str
|
||||
vsphere_volume:
|
||||
description:
|
||||
- VsphereVolume represents a vSphere volume attached and mounted on
|
||||
@@ -796,6 +1152,15 @@ persistent_volume_list:
|
||||
by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly
|
||||
inferred to be "ext4" if unspecified.
|
||||
type: str
|
||||
storage_policy_id:
|
||||
description:
|
||||
- Storage Policy Based Management (SPBM) profile ID associated with
|
||||
the StoragePolicyName.
|
||||
type: str
|
||||
storage_policy_name:
|
||||
description:
|
||||
- Storage Policy Based Management (SPBM) profile name.
|
||||
type: str
|
||||
volume_path:
|
||||
description:
|
||||
- Path that identifies vSphere volume vmdk
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -120,7 +120,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -227,6 +227,150 @@ resource_quota:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -262,6 +406,14 @@ resource_quota:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -300,14 +452,14 @@ resource_quota:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec defines the desired quota. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Spec defines the desired quota.
|
||||
type: complex
|
||||
contains:
|
||||
hard:
|
||||
description:
|
||||
- Hard is the set of desired hard limits for each named resource.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
scopes:
|
||||
description:
|
||||
- A collection of filters that must match each object tracked by a quota.
|
||||
@@ -316,19 +468,19 @@ resource_quota:
|
||||
contains: str
|
||||
status:
|
||||
description:
|
||||
- Status defines the actual enforced quota and its current usage. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Status defines the actual enforced quota and its current usage.
|
||||
type: complex
|
||||
contains:
|
||||
hard:
|
||||
description:
|
||||
- Hard is the set of enforced hard limits for each named resource.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
used:
|
||||
description:
|
||||
- Used is the current observed total usage of the resource in the namespace.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
'''
|
||||
|
||||
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ resource_quota_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ resource_quota_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -287,14 +438,14 @@ resource_quota_list:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec defines the desired quota. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Spec defines the desired quota.
|
||||
type: complex
|
||||
contains:
|
||||
hard:
|
||||
description:
|
||||
- Hard is the set of desired hard limits for each named resource.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
scopes:
|
||||
description:
|
||||
- A collection of filters that must match each object tracked by a quota.
|
||||
@@ -303,19 +454,19 @@ resource_quota_list:
|
||||
contains: str
|
||||
status:
|
||||
description:
|
||||
- Status defines the actual enforced quota and its current usage. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Status defines the actual enforced quota and its current usage.
|
||||
type: complex
|
||||
contains:
|
||||
hard:
|
||||
description:
|
||||
- Hard is the set of enforced hard limits for each named resource.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
used:
|
||||
description:
|
||||
- Used is the current observed total usage of the resource in the namespace.
|
||||
type: complex
|
||||
contains: str, ResourceQuantity
|
||||
contains: str, str
|
||||
kind:
|
||||
description:
|
||||
- Kind is a string value representing the REST resource this object represents.
|
||||
|
||||
@@ -89,7 +89,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -196,6 +196,150 @@ scale:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -231,6 +375,14 @@ scale:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -29,10 +29,10 @@ options:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
data:
|
||||
description:
|
||||
- Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading
|
||||
dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data
|
||||
is a base64 encoded string, representing the arbitrary (possibly non-string)
|
||||
data value here. Described in
|
||||
- Data contains the secret data. Each key must consist of alphanumeric characters,
|
||||
'-', '_' or '.'. The serialized form of the secret data is a base64 encoded
|
||||
string, representing the arbitrary (possibly non-string) data value here. Described
|
||||
in
|
||||
type: dict
|
||||
debug:
|
||||
description:
|
||||
@@ -124,7 +124,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -146,10 +146,10 @@ secret:
|
||||
type: str
|
||||
data:
|
||||
description:
|
||||
- Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading
|
||||
dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data
|
||||
is a base64 encoded string, representing the arbitrary (possibly non-string)
|
||||
data value here. Described in
|
||||
- Data contains the secret data. Each key must consist of alphanumeric characters,
|
||||
'-', '_' or '.'. The serialized form of the secret data is a base64 encoded
|
||||
string, representing the arbitrary (possibly non-string) data value here.
|
||||
Described in
|
||||
type: complex
|
||||
contains: str, str
|
||||
kind:
|
||||
@@ -239,6 +239,150 @@ secret:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -274,6 +418,14 @@ secret:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -122,10 +118,10 @@ secret_list:
|
||||
type: str
|
||||
data:
|
||||
description:
|
||||
- Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN
|
||||
or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of
|
||||
the secret data is a base64 encoded string, representing the arbitrary
|
||||
(possibly non-string) data value here. Described in
|
||||
- Data contains the secret data. Each key must consist of alphanumeric characters,
|
||||
'-', '_' or '.'. The serialized form of the secret data is a base64 encoded
|
||||
string, representing the arbitrary (possibly non-string) data value here.
|
||||
Described in
|
||||
type: complex
|
||||
contains: str, str
|
||||
kind:
|
||||
@@ -218,6 +214,153 @@ secret_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -254,6 +397,14 @@ secret_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
565
library/k8s_v1_self_subject_access_review.py
Normal file
565
library/k8s_v1_self_subject_access_review.py
Normal file
@@ -0,0 +1,565 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_self_subject_access_review
|
||||
short_description: Kubernetes SelfSubjectAccessReview
|
||||
description:
|
||||
- Manage the lifecycle of a self_subject_access_review object. Supports check mode,
|
||||
and attempts to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
spec_non_resource_attributes_path:
|
||||
description:
|
||||
- Path is the URL path of the request
|
||||
aliases:
|
||||
- non_resource_attributes_path
|
||||
spec_non_resource_attributes_verb:
|
||||
description:
|
||||
- Verb is the standard HTTP verb
|
||||
aliases:
|
||||
- non_resource_attributes_verb
|
||||
spec_resource_attributes_group:
|
||||
description:
|
||||
- Group is the API Group of the Resource. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_group
|
||||
spec_resource_attributes_name:
|
||||
description:
|
||||
- Name is the name of the resource being requested for a "get" or deleted for
|
||||
a "delete". "" (empty) means all.
|
||||
aliases:
|
||||
- resource_attributes_name
|
||||
spec_resource_attributes_namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the action being requested. Currently, there is
|
||||
no distinction between no namespace and all namespaces "" (empty) is defaulted
|
||||
for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources
|
||||
"" (empty) means "all" for namespace scoped resources from a SubjectAccessReview
|
||||
or SelfSubjectAccessReview
|
||||
aliases:
|
||||
- resource_attributes_namespace
|
||||
spec_resource_attributes_resource:
|
||||
description:
|
||||
- Resource is one of the existing resource types. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_resource
|
||||
spec_resource_attributes_subresource:
|
||||
description:
|
||||
- Subresource is one of the existing resource types. "" means none.
|
||||
aliases:
|
||||
- resource_attributes_subresource
|
||||
spec_resource_attributes_verb:
|
||||
description:
|
||||
- 'Verb is a kubernetes resource API verb, like: get, list, watch, create, update,
|
||||
delete, proxy. "*" means all.'
|
||||
aliases:
|
||||
- resource_attributes_verb
|
||||
spec_resource_attributes_version:
|
||||
description:
|
||||
- Version is the API Version of the Resource. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_version
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
self_subject_access_review:
|
||||
type: complex
|
||||
returned: on success
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec holds information about the request being evaluated. user and groups
|
||||
must be empty
|
||||
type: complex
|
||||
contains:
|
||||
non_resource_attributes:
|
||||
description:
|
||||
- NonResourceAttributes describes information for a non-resource access
|
||||
request
|
||||
type: complex
|
||||
contains:
|
||||
path:
|
||||
description:
|
||||
- Path is the URL path of the request
|
||||
type: str
|
||||
verb:
|
||||
description:
|
||||
- Verb is the standard HTTP verb
|
||||
type: str
|
||||
resource_attributes:
|
||||
description:
|
||||
- ResourceAuthorizationAttributes describes information for a resource access
|
||||
request
|
||||
type: complex
|
||||
contains:
|
||||
group:
|
||||
description:
|
||||
- Group is the API Group of the Resource. "*" means all.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the resource being requested for a "get" or deleted
|
||||
for a "delete". "" (empty) means all.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the action being requested. Currently,
|
||||
there is no distinction between no namespace and all namespaces ""
|
||||
(empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty
|
||||
for cluster-scoped resources "" (empty) means "all" for namespace
|
||||
scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||
type: str
|
||||
resource:
|
||||
description:
|
||||
- Resource is one of the existing resource types. "*" means all.
|
||||
type: str
|
||||
subresource:
|
||||
description:
|
||||
- Subresource is one of the existing resource types. "" means none.
|
||||
type: str
|
||||
verb:
|
||||
description:
|
||||
- 'Verb is a kubernetes resource API verb, like: get, list, watch, create,
|
||||
update, delete, proxy. "*" means all.'
|
||||
type: str
|
||||
version:
|
||||
description:
|
||||
- Version is the API Version of the Resource. "*" means all.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- Status is filled in by the server and indicates whether the request is allowed
|
||||
or not
|
||||
type: complex
|
||||
contains:
|
||||
allowed:
|
||||
description:
|
||||
- Allowed is required. True if the action would be allowed, false otherwise.
|
||||
type: bool
|
||||
evaluation_error:
|
||||
description:
|
||||
- EvaluationError is an indication that some error occurred during the authorization
|
||||
check. It is entirely possible to get an error and be able to continue
|
||||
determine authorization status in spite of it. For instance, RBAC can
|
||||
be missing a role, but enough roles are still present and bound to reason
|
||||
about the request.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- Reason is optional. It indicates why a request was allowed or denied.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('self_subject_access_review', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -87,24 +87,13 @@ options:
|
||||
and LoadBalancer. Ignored if type is ExternalName.
|
||||
aliases:
|
||||
- cluster_ip
|
||||
spec_deprecated_public_i_ps:
|
||||
description:
|
||||
- deprecatedPublicIPs is deprecated and replaced by the externalIPs field with
|
||||
almost the exact same semantics. This field is retained in the v1 API for compatibility
|
||||
until at least 8/20/2016. It will be removed from any new API revisions. If
|
||||
both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.
|
||||
aliases:
|
||||
- deprecated_public_i_ps
|
||||
type: list
|
||||
spec_external_i_ps:
|
||||
description:
|
||||
- externalIPs is a list of IP addresses for which nodes in the cluster will also
|
||||
accept traffic for this service. These IPs are not managed by Kubernetes. The
|
||||
user is responsible for ensuring that traffic arrives at a node with this IP.
|
||||
A common example is external load-balancers that are not part of the Kubernetes
|
||||
system. A previous form of this functionality exists as the deprecatedPublicIPs
|
||||
field. When using this field, callers should also clear the deprecatedPublicIPs
|
||||
field.
|
||||
system.
|
||||
aliases:
|
||||
- external_i_ps
|
||||
type: list
|
||||
@@ -115,6 +104,26 @@ options:
|
||||
valid DNS name and requires Type to be ExternalName.
|
||||
aliases:
|
||||
- external_name
|
||||
spec_external_traffic_policy:
|
||||
description:
|
||||
- externalTrafficPolicy denotes if this Service desires to route external traffic
|
||||
to node-local or cluster-wide endpoints. "Local" preserves the client source
|
||||
IP and avoids a second hop for LoadBalancer and Nodeport type services, but
|
||||
risks potentially imbalanced traffic spreading. "Cluster" obscures the client
|
||||
source IP and may cause a second hop to another node, but should have good overall
|
||||
load-spreading.
|
||||
aliases:
|
||||
- external_traffic_policy
|
||||
spec_health_check_node_port:
|
||||
description:
|
||||
- healthCheckNodePort specifies the healthcheck nodePort for the service. If not
|
||||
specified, HealthCheckNodePort is created by the service api backend with the
|
||||
allocated nodePort. Will use user-specified nodePort value if specified by the
|
||||
client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy
|
||||
is set to Local.
|
||||
aliases:
|
||||
- health_check_node_port
|
||||
type: int
|
||||
spec_load_balancer_ip:
|
||||
description:
|
||||
- 'Only applies to Service Type: LoadBalancer LoadBalancer will get created with
|
||||
@@ -198,7 +207,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -230,7 +239,7 @@ EXAMPLES = '''
|
||||
- port: 8788
|
||||
target_port: 8080
|
||||
name: socket-port
|
||||
type: NodePort
|
||||
type: ClusterIP
|
||||
|
||||
- name: Create service
|
||||
k8s_v1_service.yml:
|
||||
@@ -274,7 +283,7 @@ EXAMPLES = '''
|
||||
- port: 8080
|
||||
target_port: 8080
|
||||
name: http
|
||||
type: ClusterIP
|
||||
type: NodePort
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
@@ -378,6 +387,150 @@ service:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -413,6 +566,14 @@ service:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -451,7 +612,7 @@ service:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec defines the behavior of a service. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Spec defines the behavior of a service.
|
||||
type: complex
|
||||
contains:
|
||||
cluster_ip:
|
||||
@@ -465,24 +626,13 @@ service:
|
||||
applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type
|
||||
is ExternalName.
|
||||
type: str
|
||||
deprecated_public_i_ps:
|
||||
description:
|
||||
- deprecatedPublicIPs is deprecated and replaced by the externalIPs field
|
||||
with almost the exact same semantics. This field is retained in the v1
|
||||
API for compatibility until at least 8/20/2016. It will be removed from
|
||||
any new API revisions. If both deprecatedPublicIPs *and* externalIPs are
|
||||
set, deprecatedPublicIPs is used.
|
||||
type: list
|
||||
contains: str
|
||||
external_i_ps:
|
||||
description:
|
||||
- externalIPs is a list of IP addresses for which nodes in the cluster will
|
||||
also accept traffic for this service. These IPs are not managed by Kubernetes.
|
||||
The user is responsible for ensuring that traffic arrives at a node with
|
||||
this IP. A common example is external load-balancers that are not part
|
||||
of the Kubernetes system. A previous form of this functionality exists
|
||||
as the deprecatedPublicIPs field. When using this field, callers should
|
||||
also clear the deprecatedPublicIPs field.
|
||||
of the Kubernetes system.
|
||||
type: list
|
||||
contains: str
|
||||
external_name:
|
||||
@@ -491,6 +641,23 @@ service:
|
||||
return as a CNAME record for this service. No proxying will be involved.
|
||||
Must be a valid DNS name and requires Type to be ExternalName.
|
||||
type: str
|
||||
external_traffic_policy:
|
||||
description:
|
||||
- externalTrafficPolicy denotes if this Service desires to route external
|
||||
traffic to node-local or cluster-wide endpoints. "Local" preserves the
|
||||
client source IP and avoids a second hop for LoadBalancer and Nodeport
|
||||
type services, but risks potentially imbalanced traffic spreading. "Cluster"
|
||||
obscures the client source IP and may cause a second hop to another node,
|
||||
but should have good overall load-spreading.
|
||||
type: str
|
||||
health_check_node_port:
|
||||
description:
|
||||
- healthCheckNodePort specifies the healthcheck nodePort for the service.
|
||||
If not specified, HealthCheckNodePort is created by the service api backend
|
||||
with the allocated nodePort. Will use user-specified nodePort value if
|
||||
specified by the client. Only effects when Type is set to LoadBalancer
|
||||
and ExternalTrafficPolicy is set to Local.
|
||||
type: int
|
||||
load_balancer_ip:
|
||||
description:
|
||||
- 'Only applies to Service Type: LoadBalancer LoadBalancer will get created
|
||||
@@ -545,8 +712,7 @@ service:
|
||||
'port' field is used (an identity map). This field is ignored for
|
||||
services with clusterIP=None, and should be omitted or set equal to
|
||||
the 'port' field.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
selector:
|
||||
description:
|
||||
- Route service traffic to pods with label keys and values matching this
|
||||
|
||||
@@ -20,6 +20,12 @@ options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
automount_service_account_token:
|
||||
description:
|
||||
- AutomountServiceAccountToken indicates whether pods running as this service
|
||||
account should have an API token automatically mounted. Can be overridden at
|
||||
the pod level.
|
||||
type: bool
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
@@ -119,7 +125,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -139,6 +145,12 @@ service_account:
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
type: str
|
||||
automount_service_account_token:
|
||||
description:
|
||||
- AutomountServiceAccountToken indicates whether pods running as this service
|
||||
account should have an API token automatically mounted. Can be overridden
|
||||
at the pod level.
|
||||
type: bool
|
||||
image_pull_secrets:
|
||||
description:
|
||||
- ImagePullSecrets is a list of references to secrets in the same namespace
|
||||
@@ -238,6 +250,150 @@ service_account:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -273,6 +429,14 @@ service_account:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -120,6 +116,12 @@ service_account_list:
|
||||
Servers should convert recognized schemas to the latest internal value,
|
||||
and may reject unrecognized values.
|
||||
type: str
|
||||
automount_service_account_token:
|
||||
description:
|
||||
- AutomountServiceAccountToken indicates whether pods running as this service
|
||||
account should have an API token automatically mounted. Can be overridden
|
||||
at the pod level.
|
||||
type: bool
|
||||
image_pull_secrets:
|
||||
description:
|
||||
- ImagePullSecrets is a list of references to secrets in the same namespace
|
||||
@@ -222,6 +224,153 @@ service_account_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -258,6 +407,14 @@ service_account_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ service_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ service_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -287,7 +438,7 @@ service_list:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec defines the behavior of a service. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md
|
||||
- Spec defines the behavior of a service.
|
||||
type: complex
|
||||
contains:
|
||||
cluster_ip:
|
||||
@@ -301,24 +452,13 @@ service_list:
|
||||
is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer.
|
||||
Ignored if type is ExternalName.
|
||||
type: str
|
||||
deprecated_public_i_ps:
|
||||
description:
|
||||
- deprecatedPublicIPs is deprecated and replaced by the externalIPs
|
||||
field with almost the exact same semantics. This field is retained
|
||||
in the v1 API for compatibility until at least 8/20/2016. It will
|
||||
be removed from any new API revisions. If both deprecatedPublicIPs
|
||||
*and* externalIPs are set, deprecatedPublicIPs is used.
|
||||
type: list
|
||||
contains: str
|
||||
external_i_ps:
|
||||
description:
|
||||
- externalIPs is a list of IP addresses for which nodes in the cluster
|
||||
will also accept traffic for this service. These IPs are not managed
|
||||
by Kubernetes. The user is responsible for ensuring that traffic arrives
|
||||
at a node with this IP. A common example is external load-balancers
|
||||
that are not part of the Kubernetes system. A previous form of this
|
||||
functionality exists as the deprecatedPublicIPs field. When using
|
||||
this field, callers should also clear the deprecatedPublicIPs field.
|
||||
that are not part of the Kubernetes system.
|
||||
type: list
|
||||
contains: str
|
||||
external_name:
|
||||
@@ -327,6 +467,23 @@ service_list:
|
||||
will return as a CNAME record for this service. No proxying will be
|
||||
involved. Must be a valid DNS name and requires Type to be ExternalName.
|
||||
type: str
|
||||
external_traffic_policy:
|
||||
description:
|
||||
- externalTrafficPolicy denotes if this Service desires to route external
|
||||
traffic to node-local or cluster-wide endpoints. "Local" preserves
|
||||
the client source IP and avoids a second hop for LoadBalancer and
|
||||
Nodeport type services, but risks potentially imbalanced traffic spreading.
|
||||
"Cluster" obscures the client source IP and may cause a second hop
|
||||
to another node, but should have good overall load-spreading.
|
||||
type: str
|
||||
health_check_node_port:
|
||||
description:
|
||||
- healthCheckNodePort specifies the healthcheck nodePort for the service.
|
||||
If not specified, HealthCheckNodePort is created by the service api
|
||||
backend with the allocated nodePort. Will use user-specified nodePort
|
||||
value if specified by the client. Only effects when Type is set to
|
||||
LoadBalancer and ExternalTrafficPolicy is set to Local.
|
||||
type: int
|
||||
load_balancer_ip:
|
||||
description:
|
||||
- 'Only applies to Service Type: LoadBalancer LoadBalancer will get
|
||||
@@ -381,8 +538,7 @@ service_list:
|
||||
specified, the value of the 'port' field is used (an identity
|
||||
map). This field is ignored for services with clusterIP=None,
|
||||
and should be omitted or set equal to the 'port' field.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
selector:
|
||||
description:
|
||||
- Route service traffic to pods with label keys and values matching
|
||||
|
||||
241
library/k8s_v1_status.py
Normal file
241
library/k8s_v1_status.py
Normal file
@@ -0,0 +1,241 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_status
|
||||
short_description: Kubernetes Status
|
||||
description:
|
||||
- Manage the lifecycle of a status object. Supports check mode, and attempts to to
|
||||
be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
details_causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the StatusReason failure.
|
||||
Not all StatusReasons may provide detailed causes.
|
||||
aliases:
|
||||
- causes
|
||||
type: list
|
||||
details_group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status StatusReason.
|
||||
aliases:
|
||||
- group
|
||||
details_kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status StatusReason.
|
||||
On some operations may differ from the requested resource Kind.
|
||||
aliases:
|
||||
- kind
|
||||
details_name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status StatusReason (when
|
||||
there is a single name which can be described).
|
||||
aliases:
|
||||
- name
|
||||
details_retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should be retried.
|
||||
aliases:
|
||||
- retry_after_seconds
|
||||
type: int
|
||||
details_uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which can be described).
|
||||
aliases:
|
||||
- uid
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the "Failure" status.
|
||||
If this value is empty there is no information available. A Reason clarifies
|
||||
an HTTP status code but does not override it.
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
status:
|
||||
type: complex
|
||||
returned: on success
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define its own extended
|
||||
details. This field is optional and the data returned is not guaranteed to
|
||||
conform to any schema except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the StatusReason
|
||||
failure. Not all StatusReasons may provide detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error, as named by
|
||||
its JSON serialization. May include dot and postfix notation for nested
|
||||
attributes. Arrays are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple errors. Optional.
|
||||
Examples: "name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error. This field
|
||||
may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error. If this
|
||||
value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status StatusReason.
|
||||
On some operations may differ from the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status StatusReason
|
||||
(when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the "Failure" status.
|
||||
If this value is empty there is no information available. A Reason clarifies
|
||||
an HTTP status code but does not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('status', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
475
library/k8s_v1_storage_class.py
Normal file
475
library/k8s_v1_storage_class.py
Normal file
@@ -0,0 +1,475 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_storage_class
|
||||
short_description: Kubernetes StorageClass
|
||||
description:
|
||||
- Manage the lifecycle of a storage_class object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
parameters:
|
||||
description:
|
||||
- Parameters holds the parameters for the provisioner that should create volumes
|
||||
of this storage class.
|
||||
type: dict
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
provisioner:
|
||||
description:
|
||||
- Provisioner indicates the type of the provisioner.
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
storage_class:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
parameters:
|
||||
description:
|
||||
- Parameters holds the parameters for the provisioner that should create volumes
|
||||
of this storage class.
|
||||
type: complex
|
||||
contains: str, str
|
||||
provisioner:
|
||||
description:
|
||||
- Provisioner indicates the type of the provisioner.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('storage_class', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
488
library/k8s_v1_storage_class_list.py
Normal file
488
library/k8s_v1_storage_class_list.py
Normal file
@@ -0,0 +1,488 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_storage_class_list
|
||||
short_description: Kubernetes StorageClassList
|
||||
description:
|
||||
- Retrieve a list of storage_class. List operations provide a snapshot read of the
|
||||
underlying objects, returning a resource_version representing a consistent version
|
||||
of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
storage_class_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- Items is the list of StorageClasses
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
parameters:
|
||||
description:
|
||||
- Parameters holds the parameters for the provisioner that should create
|
||||
volumes of this storage class.
|
||||
type: complex
|
||||
contains: str, str
|
||||
provisioner:
|
||||
description:
|
||||
- Provisioner indicates the type of the provisioner.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('storage_class_list', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
599
library/k8s_v1_subject_access_review.py
Normal file
599
library/k8s_v1_subject_access_review.py
Normal file
@@ -0,0 +1,599 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1_subject_access_review
|
||||
short_description: Kubernetes SubjectAccessReview
|
||||
description:
|
||||
- Manage the lifecycle of a subject_access_review object. Supports check mode, and
|
||||
attempts to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
spec_extra:
|
||||
description:
|
||||
- Extra corresponds to the user.Info.GetExtra() method from the authenticator.
|
||||
Since that is input to the authorizer it needs a reflection here.
|
||||
aliases:
|
||||
- extra
|
||||
type: dict
|
||||
spec_groups:
|
||||
description:
|
||||
- Groups is the groups you're testing for.
|
||||
aliases:
|
||||
- groups
|
||||
type: list
|
||||
spec_non_resource_attributes_path:
|
||||
description:
|
||||
- Path is the URL path of the request
|
||||
aliases:
|
||||
- non_resource_attributes_path
|
||||
spec_non_resource_attributes_verb:
|
||||
description:
|
||||
- Verb is the standard HTTP verb
|
||||
aliases:
|
||||
- non_resource_attributes_verb
|
||||
spec_resource_attributes_group:
|
||||
description:
|
||||
- Group is the API Group of the Resource. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_group
|
||||
spec_resource_attributes_name:
|
||||
description:
|
||||
- Name is the name of the resource being requested for a "get" or deleted for
|
||||
a "delete". "" (empty) means all.
|
||||
aliases:
|
||||
- resource_attributes_name
|
||||
spec_resource_attributes_namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the action being requested. Currently, there is
|
||||
no distinction between no namespace and all namespaces "" (empty) is defaulted
|
||||
for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources
|
||||
"" (empty) means "all" for namespace scoped resources from a SubjectAccessReview
|
||||
or SelfSubjectAccessReview
|
||||
aliases:
|
||||
- resource_attributes_namespace
|
||||
spec_resource_attributes_resource:
|
||||
description:
|
||||
- Resource is one of the existing resource types. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_resource
|
||||
spec_resource_attributes_subresource:
|
||||
description:
|
||||
- Subresource is one of the existing resource types. "" means none.
|
||||
aliases:
|
||||
- resource_attributes_subresource
|
||||
spec_resource_attributes_verb:
|
||||
description:
|
||||
- 'Verb is a kubernetes resource API verb, like: get, list, watch, create, update,
|
||||
delete, proxy. "*" means all.'
|
||||
aliases:
|
||||
- resource_attributes_verb
|
||||
spec_resource_attributes_version:
|
||||
description:
|
||||
- Version is the API Version of the Resource. "*" means all.
|
||||
aliases:
|
||||
- resource_attributes_version
|
||||
spec_user:
|
||||
description:
|
||||
- User is the user you're testing for. If you specify "User" but not "Groups",
|
||||
then is it interpreted as "What if User were not a member of any groups
|
||||
aliases:
|
||||
- user
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
subject_access_review:
|
||||
type: complex
|
||||
returned: on success
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec holds information about the request being evaluated
|
||||
type: complex
|
||||
contains:
|
||||
extra:
|
||||
description:
|
||||
- Extra corresponds to the user.Info.GetExtra() method from the authenticator.
|
||||
Since that is input to the authorizer it needs a reflection here.
|
||||
type: complex
|
||||
contains: str, list[str]
|
||||
groups:
|
||||
description:
|
||||
- Groups is the groups you're testing for.
|
||||
type: list
|
||||
contains: str
|
||||
non_resource_attributes:
|
||||
description:
|
||||
- NonResourceAttributes describes information for a non-resource access
|
||||
request
|
||||
type: complex
|
||||
contains:
|
||||
path:
|
||||
description:
|
||||
- Path is the URL path of the request
|
||||
type: str
|
||||
verb:
|
||||
description:
|
||||
- Verb is the standard HTTP verb
|
||||
type: str
|
||||
resource_attributes:
|
||||
description:
|
||||
- ResourceAuthorizationAttributes describes information for a resource access
|
||||
request
|
||||
type: complex
|
||||
contains:
|
||||
group:
|
||||
description:
|
||||
- Group is the API Group of the Resource. "*" means all.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the resource being requested for a "get" or deleted
|
||||
for a "delete". "" (empty) means all.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the action being requested. Currently,
|
||||
there is no distinction between no namespace and all namespaces ""
|
||||
(empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty
|
||||
for cluster-scoped resources "" (empty) means "all" for namespace
|
||||
scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||
type: str
|
||||
resource:
|
||||
description:
|
||||
- Resource is one of the existing resource types. "*" means all.
|
||||
type: str
|
||||
subresource:
|
||||
description:
|
||||
- Subresource is one of the existing resource types. "" means none.
|
||||
type: str
|
||||
verb:
|
||||
description:
|
||||
- 'Verb is a kubernetes resource API verb, like: get, list, watch, create,
|
||||
update, delete, proxy. "*" means all.'
|
||||
type: str
|
||||
version:
|
||||
description:
|
||||
- Version is the API Version of the Resource. "*" means all.
|
||||
type: str
|
||||
user:
|
||||
description:
|
||||
- User is the user you're testing for. If you specify "User" but not "Groups",
|
||||
then is it interpreted as "What if User were not a member of any groups
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- Status is filled in by the server and indicates whether the request is allowed
|
||||
or not
|
||||
type: complex
|
||||
contains:
|
||||
allowed:
|
||||
description:
|
||||
- Allowed is required. True if the action would be allowed, false otherwise.
|
||||
type: bool
|
||||
evaluation_error:
|
||||
description:
|
||||
- EvaluationError is an indication that some error occurred during the authorization
|
||||
check. It is entirely possible to get an error and be able to continue
|
||||
determine authorization status in spite of it. For instance, RBAC can
|
||||
be missing a role, but enough roles are still present and bound to reason
|
||||
about the request.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- Reason is optional. It indicates why a request was allowed or denied.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('subject_access_review', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -3,11 +3,11 @@
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_scale
|
||||
short_description: Kubernetes Scale
|
||||
module: k8s_v1_token_review
|
||||
short_description: Kubernetes TokenReview
|
||||
description:
|
||||
- Manage the lifecycle of a scale object. Supports check mode, and attempts to to
|
||||
be idempotent.
|
||||
- Manage the lifecycle of a token_review object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
@@ -71,12 +71,11 @@ options:
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
spec_replicas:
|
||||
spec_token:
|
||||
description:
|
||||
- desired number of instances for the scaled object.
|
||||
- Token is the opaque bearer token.
|
||||
aliases:
|
||||
- replicas
|
||||
type: int
|
||||
- token
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
@@ -89,7 +88,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -99,7 +98,7 @@ RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
scale:
|
||||
token_review:
|
||||
type: complex
|
||||
returned: on success
|
||||
contains:
|
||||
@@ -116,8 +115,7 @@ scale:
|
||||
be updated. In CamelCase.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object metadata;
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
@@ -196,6 +194,150 @@ scale:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -231,6 +373,14 @@ scale:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -269,42 +419,58 @@ scale:
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- defines the behavior of the scale.
|
||||
- Spec holds information about the request being evaluated
|
||||
type: complex
|
||||
contains:
|
||||
replicas:
|
||||
token:
|
||||
description:
|
||||
- desired number of instances for the scaled object.
|
||||
type: int
|
||||
- Token is the opaque bearer token.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- current status of the scale.
|
||||
- Status is filled in by the server and indicates whether the request can be
|
||||
authenticated.
|
||||
type: complex
|
||||
contains:
|
||||
replicas:
|
||||
authenticated:
|
||||
description:
|
||||
- actual number of observed instances of the scaled object.
|
||||
type: int
|
||||
selector:
|
||||
- Authenticated indicates that the token was associated with a known user.
|
||||
type: bool
|
||||
error:
|
||||
description:
|
||||
- label query over pods that should match the replicas count.
|
||||
type: complex
|
||||
contains: str, str
|
||||
target_selector:
|
||||
description:
|
||||
- label selector for pods that should match the replicas count. This is
|
||||
a serializated version of both map-based and more expressive set-based
|
||||
selectors. This is done to avoid introspection in the clients. The string
|
||||
will be in the same format as the query-param syntax. If the target type
|
||||
only supports map-based selectors, both this field and map-based selector
|
||||
field are populated.
|
||||
- Error indicates that the token couldn't be checked
|
||||
type: str
|
||||
user:
|
||||
description:
|
||||
- User is the UserInfo associated with the provided token.
|
||||
type: complex
|
||||
contains:
|
||||
extra:
|
||||
description:
|
||||
- Any additional information provided by the authenticator.
|
||||
type: complex
|
||||
contains: str, list[str]
|
||||
groups:
|
||||
description:
|
||||
- The names of groups this user is a part of.
|
||||
type: list
|
||||
contains: str
|
||||
uid:
|
||||
description:
|
||||
- A unique value that identifies this user across time. If this user
|
||||
is deleted and another user by the same name is added, they will have
|
||||
different UIDs.
|
||||
type: str
|
||||
username:
|
||||
description:
|
||||
- The name that uniquely identifies this user among all active users.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('scale', 'V1beta1')
|
||||
module = KubernetesAnsibleModule('token_review', 'V1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
@@ -111,7 +111,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -218,6 +218,150 @@ cluster_role:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -253,6 +397,14 @@ cluster_role:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -301,17 +453,6 @@ cluster_role:
|
||||
the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to handle the
|
||||
AttributeRestrictions, the Authorizer should report an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
|
||||
@@ -126,7 +126,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -233,6 +233,150 @@ cluster_role_binding:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -268,6 +412,14 @@ cluster_role_binding:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -329,7 +481,9 @@ cluster_role_binding:
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- APIVersion holds the API group and version of the referenced object.
|
||||
- APIVersion holds the API group and version of the referenced subject.
|
||||
Defaults to "v1" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io/v1alpha1"
|
||||
for User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ cluster_role_binding_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ cluster_role_binding_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -310,7 +461,9 @@ cluster_role_binding_list:
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- APIVersion holds the API group and version of the referenced object.
|
||||
- APIVersion holds the API group and version of the referenced subject.
|
||||
Defaults to "v1" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io/v1alpha1"
|
||||
for User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ cluster_role_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ cluster_role_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -297,17 +448,6 @@ cluster_role_list:
|
||||
one of the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to handle
|
||||
the AttributeRestrictions, the Authorizer should report an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.openshift_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: openshift_v1_policy
|
||||
short_description: OpenShift Policy
|
||||
module: k8s_v1alpha1_external_admission_hook_configuration
|
||||
short_description: Kubernetes ExternalAdmissionHookConfiguration
|
||||
description:
|
||||
- Manage the lifecycle of a policy object. Supports check mode, and attempts to to
|
||||
be idempotent.
|
||||
- Manage the lifecycle of a external_admission_hook_configuration object. Supports
|
||||
check mode, and attempts to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
@@ -32,6 +32,11 @@ options:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
external_admission_hooks:
|
||||
description:
|
||||
- ExternalAdmissionHooks is a list of external admission webhooks and the affected
|
||||
resources and operations.
|
||||
type: list
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
@@ -76,10 +81,6 @@ options:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
roles:
|
||||
description:
|
||||
- Roles holds all the Roles held by this Policy, mapped by Role.Name
|
||||
type: list
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
@@ -111,7 +112,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- openshift == 1.0.0-snapshot
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -121,7 +122,7 @@ RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
policy:
|
||||
external_admission_hook_configuration:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
@@ -131,21 +132,97 @@ policy:
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
type: str
|
||||
external_admission_hooks:
|
||||
description:
|
||||
- ExternalAdmissionHooks is a list of external admission webhooks and the affected
|
||||
resources and operations.
|
||||
type: list
|
||||
contains:
|
||||
client_config:
|
||||
description:
|
||||
- ClientConfig defines how to communicate with the hook. Required
|
||||
type: complex
|
||||
contains:
|
||||
ca_bundle:
|
||||
description:
|
||||
- CABundle is a PEM encoded CA bundle which will be used to validate
|
||||
webhook's server certificate. Required
|
||||
type: str
|
||||
service:
|
||||
description:
|
||||
- Service is a reference to the service for this webhook. If there is
|
||||
only one port open for the service, that port will be used. If there
|
||||
are multiple ports open, port 443 will be used if it is open, otherwise
|
||||
it is an error. Required
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the service Required
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the service Required
|
||||
type: str
|
||||
failure_policy:
|
||||
description:
|
||||
- FailurePolicy defines how unrecognized errors from the admission endpoint
|
||||
are handled - allowed values are Ignore or Fail. Defaults to Ignore.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name of the external admission webhook. Name should be fully qualified,
|
||||
e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the
|
||||
webhook, and kubernetes.io is the name of the organization. Required.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules describes what operations on what resources/subresources the webhook
|
||||
cares about. The webhook cares about an operation if it matches _any_
|
||||
Rule.
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the API groups the resources belong to. '*' is all groups.
|
||||
If '*' is present, the length of the slice must be one. Required.
|
||||
type: list
|
||||
contains: str
|
||||
api_versions:
|
||||
description:
|
||||
- APIVersions is the API versions the resources belong to. '*' is all
|
||||
versions. If '*' is present, the length of the slice must be one.
|
||||
Required.
|
||||
type: list
|
||||
contains: str
|
||||
operations:
|
||||
description:
|
||||
- Operations is the operations the admission hook cares about - CREATE,
|
||||
UPDATE, or * for all operations. If '*' is present, the length of
|
||||
the slice must be one. Required.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- "Resources is a list of resources this rule applies to. For example:\
|
||||
\ 'pods' means pods. 'pods/log' means the log subresource of pods.\
|
||||
\ '*' means all resources, but not subresources. 'pods/*' means all\
|
||||
\ subresources of pods. '*/scale' means all scale subresources. '*/*'\
|
||||
\ means all resources and their subresources. If wildcard is present,\
|
||||
\ the validation rule will ensure resources do not overlap with each\
|
||||
\ other. Depending on the enclosing object, subresources might not\
|
||||
\ be allowed. Required."
|
||||
type: list
|
||||
contains: str
|
||||
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.
|
||||
type: str
|
||||
last_modified:
|
||||
description:
|
||||
- LastModified is the last time that any part of the Policy was created, updated,
|
||||
or deleted
|
||||
type: complex
|
||||
contains: {}
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
- Standard object metadata;
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
@@ -224,6 +301,150 @@ policy:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -259,6 +480,14 @@ policy:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -295,260 +524,19 @@ policy:
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
roles:
|
||||
description:
|
||||
- Roles holds all the Roles held by this Policy, mapped by Role.Name
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the role
|
||||
type: str
|
||||
role:
|
||||
description:
|
||||
- Role is the role being named
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver
|
||||
is going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time
|
||||
when this object was created. It is not guaranteed to be set in
|
||||
happens-before order across separate operations. Clients may not
|
||||
set this value. It is represented in RFC3339 form and is in UTC.
|
||||
Populated by the system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful
|
||||
deletion is requested by the user, and is not directly settable
|
||||
by a client. The resource is expected to be deleted (no longer
|
||||
visible from resource lists, and not reachable by name) after
|
||||
the time in this field. Once set, this value may not be unset
|
||||
or be set further into the future, although it may be shortened
|
||||
or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet
|
||||
will react by sending a graceful termination signal to the containers
|
||||
in the pod. After that 30 seconds, the Kubelet will send a hard
|
||||
termination signal (SIGKILL) to the container and after cleanup,
|
||||
remove the pod from the API. In the presence of network partitions,
|
||||
this object may still exist after this timestamp, until an administrator
|
||||
or automated process can determine the resource is fully terminated.
|
||||
If not set, graceful deletion of the object has not been requested.
|
||||
Populated by the system when a graceful deletion is requested.
|
||||
Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry.
|
||||
Each entry is an identifier for the responsible component that
|
||||
will remove the entry from the list. If the deletionTimestamp
|
||||
of the object is non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only
|
||||
if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be
|
||||
updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and
|
||||
the watch operation on a resource or set of resources. Clients
|
||||
must treat these values as opaque and passed unmodified back to
|
||||
the server. They may only be valid for a particular resource or
|
||||
set of resources. Populated by the system. Read-only. Value must
|
||||
be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It
|
||||
is typically generated by the server on successful creation of
|
||||
a resource and is not allowed to change on PUT operations. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this Role
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources.
|
||||
If this field is empty, then both kubernetes and origin API groups
|
||||
are assumed. That means that if an action is requested against
|
||||
one of the enumerated resources in either the kubernetes or the
|
||||
origin API group, the request will be allowed
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to handle
|
||||
the AttributeRestrictions, the Authorizer should report an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLsSlice is a set of partial urls that a user should
|
||||
have access to. *s are allowed, but only as the full, final step
|
||||
in the path This name is intentionally different than the internal
|
||||
type so that the DefaultConvert works nicely and because the ordering
|
||||
may be different.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the rule
|
||||
applies to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll
|
||||
represents all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds and
|
||||
AttributeRestrictions contained in this rule. VerbAll represents
|
||||
all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = OpenShiftAnsibleModule('policy', 'V1')
|
||||
except OpenShiftAnsibleException as exc:
|
||||
module = KubernetesAnsibleModule('external_admission_hook_configuration', 'V1alpha1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except OpenShiftAnsibleException as exc:
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
@@ -0,0 +1,561 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1alpha1_external_admission_hook_configuration_list
|
||||
short_description: Kubernetes ExternalAdmissionHookConfigurationList
|
||||
description:
|
||||
- Retrieve a list of external_admission_hook_configurations. List operations provide
|
||||
a snapshot read of the underlying objects, returning a resource_version representing
|
||||
a consistent version of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
external_admission_hook_configuration_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- List of ExternalAdmissionHookConfiguration.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
external_admission_hooks:
|
||||
description:
|
||||
- ExternalAdmissionHooks is a list of external admission webhooks and the
|
||||
affected resources and operations.
|
||||
type: list
|
||||
contains:
|
||||
client_config:
|
||||
description:
|
||||
- ClientConfig defines how to communicate with the hook. Required
|
||||
type: complex
|
||||
contains:
|
||||
ca_bundle:
|
||||
description:
|
||||
- CABundle is a PEM encoded CA bundle which will be used to validate
|
||||
webhook's server certificate. Required
|
||||
type: str
|
||||
service:
|
||||
description:
|
||||
- Service is a reference to the service for this webhook. If there
|
||||
is only one port open for the service, that port will be used.
|
||||
If there are multiple ports open, port 443 will be used if it
|
||||
is open, otherwise it is an error. Required
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the service Required
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the service Required
|
||||
type: str
|
||||
failure_policy:
|
||||
description:
|
||||
- FailurePolicy defines how unrecognized errors from the admission endpoint
|
||||
are handled - allowed values are Ignore or Fail. Defaults to Ignore.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name of the external admission webhook. Name should be fully qualified,
|
||||
e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of
|
||||
the webhook, and kubernetes.io is the name of the organization. Required.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules describes what operations on what resources/subresources the
|
||||
webhook cares about. The webhook cares about an operation if it matches
|
||||
_any_ Rule.
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the API groups the resources belong to. '*' is all
|
||||
groups. If '*' is present, the length of the slice must be one.
|
||||
Required.
|
||||
type: list
|
||||
contains: str
|
||||
api_versions:
|
||||
description:
|
||||
- APIVersions is the API versions the resources belong to. '*' is
|
||||
all versions. If '*' is present, the length of the slice must
|
||||
be one. Required.
|
||||
type: list
|
||||
contains: str
|
||||
operations:
|
||||
description:
|
||||
- Operations is the operations the admission hook cares about -
|
||||
CREATE, UPDATE, or * for all operations. If '*' is present, the
|
||||
length of the slice must be one. Required.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- "Resources is a list of resources this rule applies to. For example:\
|
||||
\ 'pods' means pods. 'pods/log' means the log subresource of pods.\
|
||||
\ '*' means all resources, but not subresources. 'pods/*' means\
|
||||
\ all subresources of pods. '*/scale' means all scale subresources.\
|
||||
\ '*/*' means all resources and their subresources. If wildcard\
|
||||
\ is present, the validation rule will ensure resources do not\
|
||||
\ overlap with each other. Depending on the enclosing object,\
|
||||
\ subresources might not be allowed. Required."
|
||||
type: list
|
||||
contains: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object metadata;
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('external_admission_hook_configuration_list', 'V1alpha1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
519
library/k8s_v1alpha1_initializer_configuration.py
Normal file
519
library/k8s_v1alpha1_initializer_configuration.py
Normal file
@@ -0,0 +1,519 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1alpha1_initializer_configuration
|
||||
short_description: Kubernetes InitializerConfiguration
|
||||
description:
|
||||
- Manage the lifecycle of a initializer_configuration object. Supports check mode,
|
||||
and attempts to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
initializers:
|
||||
description:
|
||||
- Initializers is a list of resources and their default initializers Order-sensitive.
|
||||
When merging multiple InitializerConfigurations, we sort the initializers from
|
||||
different InitializerConfigurations by the name of the InitializerConfigurations;
|
||||
the order of the initializers from the same InitializerConfiguration is preserved.
|
||||
type: list
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
initializer_configuration:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
initializers:
|
||||
description:
|
||||
- Initializers is a list of resources and their default initializers Order-sensitive.
|
||||
When merging multiple InitializerConfigurations, we sort the initializers
|
||||
from different InitializerConfigurations by the name of the InitializerConfigurations;
|
||||
the order of the initializers from the same InitializerConfiguration is preserved.
|
||||
type: list
|
||||
contains:
|
||||
failure_policy:
|
||||
description:
|
||||
- FailurePolicy defines what happens if the responsible initializer controller
|
||||
fails to takes action. Allowed values are Ignore, or Fail. If "Ignore"
|
||||
is set, initializer is removed from the initializers list of an object
|
||||
if the timeout is reached; If "Fail" is set, admissionregistration returns
|
||||
timeout error if the timeout is reached.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the identifier of the initializer. It will be added to the object
|
||||
that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io,
|
||||
where "alwayspullimages" is the name of the webhook, and kubernetes.io
|
||||
is the name of the organization. Required
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules describes what resources/subresources the initializer cares about.
|
||||
The initializer cares about an operation if it matches _any_ Rule. Rule.Resources
|
||||
must not include subresources.
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the API groups the resources belong to. '*' is all groups.
|
||||
If '*' is present, the length of the slice must be one. Required.
|
||||
type: list
|
||||
contains: str
|
||||
api_versions:
|
||||
description:
|
||||
- APIVersions is the API versions the resources belong to. '*' is all
|
||||
versions. If '*' is present, the length of the slice must be one.
|
||||
Required.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- "Resources is a list of resources this rule applies to. For example:\
|
||||
\ 'pods' means pods. 'pods/log' means the log subresource of pods.\
|
||||
\ '*' means all resources, but not subresources. 'pods/*' means all\
|
||||
\ subresources of pods. '*/scale' means all scale subresources. '*/*'\
|
||||
\ means all resources and their subresources. If wildcard is present,\
|
||||
\ the validation rule will ensure resources do not overlap with each\
|
||||
\ other. Depending on the enclosing object, subresources might not\
|
||||
\ be allowed. Required."
|
||||
type: list
|
||||
contains: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object metadata;
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('initializer_configuration', 'V1alpha1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
536
library/k8s_v1alpha1_initializer_configuration_list.py
Normal file
536
library/k8s_v1alpha1_initializer_configuration_list.py
Normal file
@@ -0,0 +1,536 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1alpha1_initializer_configuration_list
|
||||
short_description: Kubernetes InitializerConfigurationList
|
||||
description:
|
||||
- Retrieve a list of initializer_configurations. List operations provide a snapshot
|
||||
read of the underlying objects, returning a resource_version representing a consistent
|
||||
version of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
initializer_configuration_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- List of InitializerConfiguration.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
initializers:
|
||||
description:
|
||||
- Initializers is a list of resources and their default initializers Order-sensitive.
|
||||
When merging multiple InitializerConfigurations, we sort the initializers
|
||||
from different InitializerConfigurations by the name of the InitializerConfigurations;
|
||||
the order of the initializers from the same InitializerConfiguration is
|
||||
preserved.
|
||||
type: list
|
||||
contains:
|
||||
failure_policy:
|
||||
description:
|
||||
- FailurePolicy defines what happens if the responsible initializer
|
||||
controller fails to takes action. Allowed values are Ignore, or Fail.
|
||||
If "Ignore" is set, initializer is removed from the initializers list
|
||||
of an object if the timeout is reached; If "Fail" is set, admissionregistration
|
||||
returns timeout error if the timeout is reached.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the identifier of the initializer. It will be added to the
|
||||
object that needs to be initialized. Name should be fully qualified,
|
||||
e.g., alwayspullimages.kubernetes.io, where "alwayspullimages" is
|
||||
the name of the webhook, and kubernetes.io is the name of the organization.
|
||||
Required
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules describes what resources/subresources the initializer cares
|
||||
about. The initializer cares about an operation if it matches _any_
|
||||
Rule. Rule.Resources must not include subresources.
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the API groups the resources belong to. '*' is all
|
||||
groups. If '*' is present, the length of the slice must be one.
|
||||
Required.
|
||||
type: list
|
||||
contains: str
|
||||
api_versions:
|
||||
description:
|
||||
- APIVersions is the API versions the resources belong to. '*' is
|
||||
all versions. If '*' is present, the length of the slice must
|
||||
be one. Required.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- "Resources is a list of resources this rule applies to. For example:\
|
||||
\ 'pods' means pods. 'pods/log' means the log subresource of pods.\
|
||||
\ '*' means all resources, but not subresources. 'pods/*' means\
|
||||
\ all subresources of pods. '*/scale' means all scale subresources.\
|
||||
\ '*/*' means all resources and their subresources. If wildcard\
|
||||
\ is present, the validation rule will ensure resources do not\
|
||||
\ overlap with each other. Depending on the enclosing object,\
|
||||
\ subresources might not be allowed. Required."
|
||||
type: list
|
||||
contains: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object metadata;
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('initializer_configuration_list', 'V1alpha1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
1712
library/k8s_v1alpha1_pod_preset.py
Normal file
1712
library/k8s_v1alpha1_pod_preset.py
Normal file
File diff suppressed because it is too large
Load Diff
1710
library/k8s_v1alpha1_pod_preset_list.py
Normal file
1710
library/k8s_v1alpha1_pod_preset_list.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -111,7 +111,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -218,6 +218,150 @@ role:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -253,6 +397,14 @@ role:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -301,17 +453,6 @@ role:
|
||||
the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to handle the
|
||||
AttributeRestrictions, the Authorizer should report an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
|
||||
@@ -126,7 +126,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -233,6 +233,150 @@ role_binding:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -268,6 +412,14 @@ role_binding:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -330,7 +482,9 @@ role_binding:
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- APIVersion holds the API group and version of the referenced object.
|
||||
- APIVersion holds the API group and version of the referenced subject.
|
||||
Defaults to "v1" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io/v1alpha1"
|
||||
for User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ role_binding_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ role_binding_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -311,7 +462,9 @@ role_binding_list:
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- APIVersion holds the API group and version of the referenced object.
|
||||
- APIVersion holds the API group and version of the referenced subject.
|
||||
Defaults to "v1" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io/v1alpha1"
|
||||
for User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ role_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ role_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -297,17 +448,6 @@ role_list:
|
||||
one of the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to handle
|
||||
the AttributeRestrictions, the Authorizer should report an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
|
||||
606
library/k8s_v1beta1_api_service.py
Normal file
606
library/k8s_v1beta1_api_service.py
Normal file
@@ -0,0 +1,606 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_api_service
|
||||
short_description: Kubernetes APIService
|
||||
description:
|
||||
- Manage the lifecycle of a api_service object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
spec_ca_bundle:
|
||||
description:
|
||||
- CABundle is a PEM encoded CA bundle which will be used to validate an API server's
|
||||
serving certificate.
|
||||
aliases:
|
||||
- ca_bundle
|
||||
spec_group:
|
||||
description:
|
||||
- Group is the API group name this server hosts
|
||||
aliases:
|
||||
- group
|
||||
spec_group_priority_minimum:
|
||||
description:
|
||||
- "GroupPriorityMininum is the priority this group should have at least. Higher\
|
||||
\ priority means that the group is prefered by clients over lower priority ones.\
|
||||
\ Note that other versions of this group might specify even higher GroupPriorityMininum\
|
||||
\ values such that the whole group gets a higher priority. The primary sort\
|
||||
\ is based on GroupPriorityMinimum, ordered highest number to lowest (20 before\
|
||||
\ 10). The secondary sort is based on the alphabetical comparison of the name\
|
||||
\ of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io\
|
||||
\ (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended\
|
||||
\ to be in the 2000s"
|
||||
aliases:
|
||||
- group_priority_minimum
|
||||
type: int
|
||||
spec_insecure_skip_tls_verify:
|
||||
description:
|
||||
- InsecureSkipTLSVerify disables TLS certificate verification when communicating
|
||||
with this server. This is strongly discouraged. You should use the CABundle
|
||||
instead.
|
||||
aliases:
|
||||
- insecure_skip_tls_verify
|
||||
type: bool
|
||||
spec_service_name:
|
||||
description:
|
||||
- Name is the name of the service
|
||||
aliases:
|
||||
- service_name
|
||||
spec_service_namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the service
|
||||
aliases:
|
||||
- service_namespace
|
||||
spec_version:
|
||||
description:
|
||||
- Version is the API version this server hosts. For example, "v1"
|
||||
aliases:
|
||||
- version
|
||||
spec_version_priority:
|
||||
description:
|
||||
- VersionPriority controls the ordering of this API version inside of its group.
|
||||
Must be greater than zero. The primary sort is based on VersionPriority, ordered
|
||||
highest to lowest (20 before 10). The secondary sort is based on the alphabetical
|
||||
comparison of the name of the object. (v1.bar before v1.foo) Since it's inside
|
||||
of a group, the number can be small, probably in the 10s.
|
||||
aliases:
|
||||
- version_priority
|
||||
type: int
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
api_service:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec contains information for locating and communicating with a server
|
||||
type: complex
|
||||
contains:
|
||||
ca_bundle:
|
||||
description:
|
||||
- CABundle is a PEM encoded CA bundle which will be used to validate an
|
||||
API server's serving certificate.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- Group is the API group name this server hosts
|
||||
type: str
|
||||
group_priority_minimum:
|
||||
description:
|
||||
- "GroupPriorityMininum is the priority this group should have at least.\
|
||||
\ Higher priority means that the group is prefered by clients over lower\
|
||||
\ priority ones. Note that other versions of this group might specify\
|
||||
\ even higher GroupPriorityMininum values such that the whole group gets\
|
||||
\ a higher priority. The primary sort is based on GroupPriorityMinimum,\
|
||||
\ ordered highest number to lowest (20 before 10). The secondary sort\
|
||||
\ is based on the alphabetical comparison of the name of the object. (v1.bar\
|
||||
\ before v1.foo) We'd recommend something like: *.k8s.io (except extensions)\
|
||||
\ at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s"
|
||||
type: int
|
||||
insecure_skip_tls_verify:
|
||||
description:
|
||||
- InsecureSkipTLSVerify disables TLS certificate verification when communicating
|
||||
with this server. This is strongly discouraged. You should use the CABundle
|
||||
instead.
|
||||
type: bool
|
||||
service:
|
||||
description:
|
||||
- Service is a reference to the service for this API server. It must communicate
|
||||
on port 443 If the Service is nil, that means the handling for the API
|
||||
groupversion is handled locally on this server. The call will simply delegate
|
||||
to the normal handler chain to be fulfilled.
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the service
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the service
|
||||
type: str
|
||||
version:
|
||||
description:
|
||||
- Version is the API version this server hosts. For example, "v1"
|
||||
type: str
|
||||
version_priority:
|
||||
description:
|
||||
- VersionPriority controls the ordering of this API version inside of its
|
||||
group. Must be greater than zero. The primary sort is based on VersionPriority,
|
||||
ordered highest to lowest (20 before 10). The secondary sort is based
|
||||
on the alphabetical comparison of the name of the object. (v1.bar before
|
||||
v1.foo) Since it's inside of a group, the number can be small, probably
|
||||
in the 10s.
|
||||
type: int
|
||||
status:
|
||||
description:
|
||||
- Status contains derived information about an API server
|
||||
type: complex
|
||||
contains:
|
||||
conditions:
|
||||
description:
|
||||
- Current service state of apiService.
|
||||
type: list
|
||||
contains:
|
||||
last_transition_time:
|
||||
description:
|
||||
- Last time the condition transitioned from one status to another.
|
||||
type: complex
|
||||
contains: {}
|
||||
message:
|
||||
description:
|
||||
- Human-readable message indicating details about last transition.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- Unique, one-word, CamelCase reason for the condition's last transition.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- Status is the status of the condition. Can be True, False, Unknown.
|
||||
type: str
|
||||
type:
|
||||
description:
|
||||
- Type is the type of the condition.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('api_service', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
568
library/k8s_v1beta1_api_service_list.py
Normal file
568
library/k8s_v1beta1_api_service_list.py
Normal file
@@ -0,0 +1,568 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_api_service_list
|
||||
short_description: Kubernetes APIServiceList
|
||||
description:
|
||||
- Retrieve a list of api_services. List operations provide a snapshot read of the
|
||||
underlying objects, returning a resource_version representing a consistent version
|
||||
of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
api_service_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description: []
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
spec:
|
||||
description:
|
||||
- Spec contains information for locating and communicating with a server
|
||||
type: complex
|
||||
contains:
|
||||
ca_bundle:
|
||||
description:
|
||||
- CABundle is a PEM encoded CA bundle which will be used to validate
|
||||
an API server's serving certificate.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- Group is the API group name this server hosts
|
||||
type: str
|
||||
group_priority_minimum:
|
||||
description:
|
||||
- "GroupPriorityMininum is the priority this group should have at least.\
|
||||
\ Higher priority means that the group is prefered by clients over\
|
||||
\ lower priority ones. Note that other versions of this group might\
|
||||
\ specify even higher GroupPriorityMininum values such that the whole\
|
||||
\ group gets a higher priority. The primary sort is based on GroupPriorityMinimum,\
|
||||
\ ordered highest number to lowest (20 before 10). The secondary sort\
|
||||
\ is based on the alphabetical comparison of the name of the object.\
|
||||
\ (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except\
|
||||
\ extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended\
|
||||
\ to be in the 2000s"
|
||||
type: int
|
||||
insecure_skip_tls_verify:
|
||||
description:
|
||||
- InsecureSkipTLSVerify disables TLS certificate verification when communicating
|
||||
with this server. This is strongly discouraged. You should use the
|
||||
CABundle instead.
|
||||
type: bool
|
||||
service:
|
||||
description:
|
||||
- Service is a reference to the service for this API server. It must
|
||||
communicate on port 443 If the Service is nil, that means the handling
|
||||
for the API groupversion is handled locally on this server. The call
|
||||
will simply delegate to the normal handler chain to be fulfilled.
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the service
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace is the namespace of the service
|
||||
type: str
|
||||
version:
|
||||
description:
|
||||
- Version is the API version this server hosts. For example, "v1"
|
||||
type: str
|
||||
version_priority:
|
||||
description:
|
||||
- VersionPriority controls the ordering of this API version inside of
|
||||
its group. Must be greater than zero. The primary sort is based on
|
||||
VersionPriority, ordered highest to lowest (20 before 10). The secondary
|
||||
sort is based on the alphabetical comparison of the name of the object.
|
||||
(v1.bar before v1.foo) Since it's inside of a group, the number can
|
||||
be small, probably in the 10s.
|
||||
type: int
|
||||
status:
|
||||
description:
|
||||
- Status contains derived information about an API server
|
||||
type: complex
|
||||
contains:
|
||||
conditions:
|
||||
description:
|
||||
- Current service state of apiService.
|
||||
type: list
|
||||
contains:
|
||||
last_transition_time:
|
||||
description:
|
||||
- Last time the condition transitioned from one status to another.
|
||||
type: complex
|
||||
contains: {}
|
||||
message:
|
||||
description:
|
||||
- Human-readable message indicating details about last transition.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- Unique, one-word, CamelCase reason for the condition's last transition.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- Status is the status of the condition. Can be True, False, Unknown.
|
||||
type: str
|
||||
type:
|
||||
description:
|
||||
- Type is the type of the condition.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description: []
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('api_service_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -3,7 +3,7 @@
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1alpha1_certificate_signing_request
|
||||
module: k8s_v1beta1_certificate_signing_request
|
||||
short_description: Kubernetes CertificateSigningRequest
|
||||
description:
|
||||
- Manage the lifecycle of a certificate_signing_request object. Supports check mode,
|
||||
@@ -76,7 +76,15 @@ options:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
spec_extra:
|
||||
description:
|
||||
- Extra information about the requesting user. See user.Info interface for details.
|
||||
aliases:
|
||||
- extra
|
||||
type: dict
|
||||
spec_groups:
|
||||
description:
|
||||
- Group information about the requesting user. See user.Info interface for details.
|
||||
aliases:
|
||||
- groups
|
||||
type: list
|
||||
@@ -86,12 +94,20 @@ options:
|
||||
aliases:
|
||||
- request
|
||||
spec_uid:
|
||||
description:
|
||||
- UID information about the requesting user. See user.Info interface for details.
|
||||
aliases:
|
||||
- uid
|
||||
spec_usages:
|
||||
description:
|
||||
- 'allowedUsages specifies a set of usage contexts the key will be valid for.
|
||||
See:'
|
||||
aliases:
|
||||
- usages
|
||||
type: list
|
||||
spec_username:
|
||||
description:
|
||||
- Information about the requesting user (if relevant) See user.Info interface
|
||||
for details
|
||||
- Information about the requesting user. See user.Info interface for details.
|
||||
aliases:
|
||||
- username
|
||||
src:
|
||||
@@ -125,7 +141,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -231,6 +247,150 @@ certificate_signing_request:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -266,6 +426,14 @@ certificate_signing_request:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -307,8 +475,16 @@ certificate_signing_request:
|
||||
- The certificate request itself and any additional information.
|
||||
type: complex
|
||||
contains:
|
||||
extra:
|
||||
description:
|
||||
- Extra information about the requesting user. See user.Info interface for
|
||||
details.
|
||||
type: complex
|
||||
contains: str, list[str]
|
||||
groups:
|
||||
description: []
|
||||
description:
|
||||
- Group information about the requesting user. See user.Info interface for
|
||||
details.
|
||||
type: list
|
||||
contains: str
|
||||
request:
|
||||
@@ -316,12 +492,19 @@ certificate_signing_request:
|
||||
- Base64-encoded PKCS
|
||||
type: str
|
||||
uid:
|
||||
description: []
|
||||
description:
|
||||
- UID information about the requesting user. See user.Info interface for
|
||||
details.
|
||||
type: str
|
||||
usages:
|
||||
description:
|
||||
- 'allowedUsages specifies a set of usage contexts the key will be valid
|
||||
for. See:'
|
||||
type: list
|
||||
contains: str
|
||||
username:
|
||||
description:
|
||||
- Information about the requesting user (if relevant) See user.Info interface
|
||||
for details
|
||||
- Information about the requesting user. See user.Info interface for details.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
@@ -360,7 +543,7 @@ certificate_signing_request:
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('certificate_signing_request', 'V1alpha1')
|
||||
module = KubernetesAnsibleModule('certificate_signing_request', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
@@ -3,7 +3,7 @@
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1alpha1_certificate_signing_request_list
|
||||
module: k8s_v1beta1_certificate_signing_request_list
|
||||
short_description: Kubernetes CertificateSigningRequestList
|
||||
description:
|
||||
- Retrieve a list of certificate_signing_requests. List operations provide a snapshot
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -208,6 +204,153 @@ certificate_signing_request_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -244,6 +387,14 @@ certificate_signing_request_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -288,8 +439,16 @@ certificate_signing_request_list:
|
||||
- The certificate request itself and any additional information.
|
||||
type: complex
|
||||
contains:
|
||||
extra:
|
||||
description:
|
||||
- Extra information about the requesting user. See user.Info interface
|
||||
for details.
|
||||
type: complex
|
||||
contains: str, list[str]
|
||||
groups:
|
||||
description: []
|
||||
description:
|
||||
- Group information about the requesting user. See user.Info interface
|
||||
for details.
|
||||
type: list
|
||||
contains: str
|
||||
request:
|
||||
@@ -297,12 +456,20 @@ certificate_signing_request_list:
|
||||
- Base64-encoded PKCS
|
||||
type: str
|
||||
uid:
|
||||
description: []
|
||||
description:
|
||||
- UID information about the requesting user. See user.Info interface
|
||||
for details.
|
||||
type: str
|
||||
usages:
|
||||
description:
|
||||
- 'allowedUsages specifies a set of usage contexts the key will be valid
|
||||
for. See:'
|
||||
type: list
|
||||
contains: str
|
||||
username:
|
||||
description:
|
||||
- Information about the requesting user (if relevant) See user.Info
|
||||
interface for details
|
||||
- Information about the requesting user. See user.Info interface for
|
||||
details.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
@@ -362,7 +529,7 @@ certificate_signing_request_list:
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('certificate_signing_request_list', 'V1alpha1')
|
||||
module = KubernetesAnsibleModule('certificate_signing_request_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
501
library/k8s_v1beta1_cluster_role.py
Normal file
501
library/k8s_v1beta1_cluster_role.py
Normal file
@@ -0,0 +1,501 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_cluster_role
|
||||
short_description: Kubernetes ClusterRole
|
||||
description:
|
||||
- Manage the lifecycle of a cluster_role object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this ClusterRole
|
||||
type: list
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
cluster_role:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this ClusterRole
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources. If
|
||||
multiple API groups are specified, any action requested against one of
|
||||
the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
to. *s are allowed, but only as the full, final step in the path Since
|
||||
non-resource URLs are not namespaced, this field is only applicable for
|
||||
ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply
|
||||
to API resources (such as "pods" or "secrets") or non-resource URL paths
|
||||
(such as "/api"), but not both.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the rule applies
|
||||
to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll represents
|
||||
all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions
|
||||
contained in this rule. VerbAll represents all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('cluster_role', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
521
library/k8s_v1beta1_cluster_role_binding.py
Normal file
521
library/k8s_v1beta1_cluster_role_binding.py
Normal file
@@ -0,0 +1,521 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_cluster_role_binding
|
||||
short_description: Kubernetes ClusterRoleBinding
|
||||
description:
|
||||
- Manage the lifecycle of a cluster_role_binding object. Supports check mode, and
|
||||
attempts to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
role_ref_api_group:
|
||||
description:
|
||||
- APIGroup is the group for the resource being referenced
|
||||
aliases:
|
||||
- api_group
|
||||
role_ref_kind:
|
||||
description:
|
||||
- Kind is the type of resource being referenced
|
||||
aliases:
|
||||
- kind
|
||||
role_ref_name:
|
||||
description:
|
||||
- Name is the name of resource being referenced
|
||||
aliases:
|
||||
- name
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
subjects:
|
||||
description:
|
||||
- Subjects holds references to the objects the role applies to.
|
||||
type: list
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
cluster_role_binding:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
role_ref:
|
||||
description:
|
||||
- RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef
|
||||
cannot be resolved, the Authorizer must return an error.
|
||||
type: complex
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- APIGroup is the group for the resource being referenced
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is the type of resource being referenced
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of resource being referenced
|
||||
type: str
|
||||
subjects:
|
||||
description:
|
||||
- Subjects holds references to the objects the role applies to.
|
||||
type: list
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- APIGroup holds the API group of the referenced subject. Defaults to ""
|
||||
for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for
|
||||
User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of object being referenced. Values defined by this API group are
|
||||
"User", "Group", and "ServiceAccount". If the Authorizer does not recognized
|
||||
the kind value, the Authorizer should report an error.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the object being referenced.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace of the referenced object. If the object kind is non-namespace,
|
||||
such as "User" or "Group", and this value is not empty the Authorizer
|
||||
should report an error.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('cluster_role_binding', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
523
library/k8s_v1beta1_cluster_role_binding_list.py
Normal file
523
library/k8s_v1beta1_cluster_role_binding_list.py
Normal file
@@ -0,0 +1,523 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_cluster_role_binding_list
|
||||
short_description: Kubernetes ClusterRoleBindingList
|
||||
description:
|
||||
- Retrieve a list of cluster_role_bindings. List operations provide a snapshot read
|
||||
of the underlying objects, returning a resource_version representing a consistent
|
||||
version of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
cluster_role_binding_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- Items is a list of ClusterRoleBindings
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
role_ref:
|
||||
description:
|
||||
- RoleRef can only reference a ClusterRole in the global namespace. If the
|
||||
RoleRef cannot be resolved, the Authorizer must return an error.
|
||||
type: complex
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- APIGroup is the group for the resource being referenced
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is the type of resource being referenced
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of resource being referenced
|
||||
type: str
|
||||
subjects:
|
||||
description:
|
||||
- Subjects holds references to the objects the role applies to.
|
||||
type: list
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- APIGroup holds the API group of the referenced subject. Defaults to
|
||||
"" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io"
|
||||
for User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of object being referenced. Values defined by this API group
|
||||
are "User", "Group", and "ServiceAccount". If the Authorizer does
|
||||
not recognized the kind value, the Authorizer should report an error.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the object being referenced.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace of the referenced object. If the object kind is non-namespace,
|
||||
such as "User" or "Group", and this value is not empty the Authorizer
|
||||
should report an error.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('cluster_role_binding_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
518
library/k8s_v1beta1_cluster_role_list.py
Normal file
518
library/k8s_v1beta1_cluster_role_list.py
Normal file
@@ -0,0 +1,518 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_cluster_role_list
|
||||
short_description: Kubernetes ClusterRoleList
|
||||
description:
|
||||
- Retrieve a list of cluster_roles. List operations provide a snapshot read of the
|
||||
underlying objects, returning a resource_version representing a consistent version
|
||||
of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
cluster_role_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- Items is a list of ClusterRoles
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this ClusterRole
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources.
|
||||
If multiple API groups are specified, any action requested against
|
||||
one of the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
to. *s are allowed, but only as the full, final step in the path Since
|
||||
non-resource URLs are not namespaced, this field is only applicable
|
||||
for ClusterRoles referenced from a ClusterRoleBinding. Rules can either
|
||||
apply to API resources (such as "pods" or "secrets") or non-resource
|
||||
URL paths (such as "/api"), but not both.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the rule applies
|
||||
to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll
|
||||
represents all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions
|
||||
contained in this rule. VerbAll represents all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('cluster_role_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -3,11 +3,11 @@
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_horizontal_pod_autoscaler
|
||||
short_description: Kubernetes HorizontalPodAutoscaler
|
||||
module: k8s_v1beta1_controller_revision
|
||||
short_description: Kubernetes ControllerRevision
|
||||
description:
|
||||
- Manage the lifecycle of a horizontal_pod_autoscaler object. Supports check mode,
|
||||
and attempts to to be idempotent.
|
||||
- Manage the lifecycle of a controller_revision object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
@@ -27,6 +27,11 @@ options:
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
data_raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
aliases:
|
||||
- raw
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
@@ -76,47 +81,10 @@ options:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
spec_cpu_utilization_target_percentage:
|
||||
revision:
|
||||
description:
|
||||
- fraction of the requested CPU that should be utilized/used, e.g. 70 means that
|
||||
70% of the requested CPU should be in use.
|
||||
aliases:
|
||||
- cpu_utilization_target_percentage
|
||||
- Revision indicates the revision of the state represented by Data.
|
||||
type: int
|
||||
spec_max_replicas:
|
||||
description:
|
||||
- upper limit for the number of pods that can be set by the autoscaler; cannot
|
||||
be smaller than MinReplicas.
|
||||
aliases:
|
||||
- max_replicas
|
||||
type: int
|
||||
spec_min_replicas:
|
||||
description:
|
||||
- lower limit for the number of pods that can be set by the autoscaler, default
|
||||
1.
|
||||
aliases:
|
||||
- min_replicas
|
||||
type: int
|
||||
spec_scale_ref_api_version:
|
||||
description:
|
||||
- API version of the referent
|
||||
aliases:
|
||||
- scale_ref_api_version
|
||||
spec_scale_ref_kind:
|
||||
description:
|
||||
- Kind of the referent;
|
||||
aliases:
|
||||
- scale_ref_kind
|
||||
spec_scale_ref_name:
|
||||
description:
|
||||
- Name of the referent;
|
||||
aliases:
|
||||
- scale_ref_name
|
||||
spec_scale_ref_subresource:
|
||||
description:
|
||||
- Subresource name of the referent
|
||||
aliases:
|
||||
- scale_ref_subresource
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
@@ -148,7 +116,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -158,7 +126,7 @@ RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
horizontal_pod_autoscaler:
|
||||
controller_revision:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
@@ -168,6 +136,15 @@ horizontal_pod_autoscaler:
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
type: str
|
||||
data:
|
||||
description:
|
||||
- Data is the serialized representation of the state.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is a string value representing the REST resource this object represents.
|
||||
@@ -176,7 +153,7 @@ horizontal_pod_autoscaler:
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object metadata.
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
@@ -255,6 +232,150 @@ horizontal_pod_autoscaler:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -290,6 +411,14 @@ horizontal_pod_autoscaler:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -326,91 +455,16 @@ horizontal_pod_autoscaler:
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
spec:
|
||||
revision:
|
||||
description:
|
||||
- behaviour of autoscaler.
|
||||
type: complex
|
||||
contains:
|
||||
cpu_utilization:
|
||||
description:
|
||||
- target average CPU utilization (represented as a percentage of requested
|
||||
CPU) over all the pods; if not specified it defaults to the target CPU
|
||||
utilization at 80% of the requested resources.
|
||||
type: complex
|
||||
contains:
|
||||
target_percentage:
|
||||
description:
|
||||
- fraction of the requested CPU that should be utilized/used, e.g. 70
|
||||
means that 70% of the requested CPU should be in use.
|
||||
type: int
|
||||
max_replicas:
|
||||
description:
|
||||
- upper limit for the number of pods that can be set by the autoscaler;
|
||||
cannot be smaller than MinReplicas.
|
||||
type: int
|
||||
min_replicas:
|
||||
description:
|
||||
- lower limit for the number of pods that can be set by the autoscaler,
|
||||
default 1.
|
||||
type: int
|
||||
scale_ref:
|
||||
description:
|
||||
- reference to Scale subresource; horizontal pod autoscaler will learn the
|
||||
current resource consumption from its status, and will set the desired
|
||||
number of pods by modifying its spec.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent;
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent;
|
||||
type: str
|
||||
subresource:
|
||||
description:
|
||||
- Subresource name of the referent
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- current information about the autoscaler.
|
||||
type: complex
|
||||
contains:
|
||||
current_cpu_utilization_percentage:
|
||||
description:
|
||||
- current average CPU utilization over all pods, represented as a percentage
|
||||
of requested CPU, e.g. 70 means that an average pod is using now 70% of
|
||||
its requested CPU.
|
||||
type: int
|
||||
current_replicas:
|
||||
description:
|
||||
- current number of replicas of pods managed by this autoscaler.
|
||||
type: int
|
||||
desired_replicas:
|
||||
description:
|
||||
- desired number of replicas of pods managed by this autoscaler.
|
||||
type: int
|
||||
last_scale_time:
|
||||
description:
|
||||
- last time the HorizontalPodAutoscaler scaled the number of pods; used
|
||||
by the autoscaler to control how often the number of pods is changed.
|
||||
type: complex
|
||||
contains: {}
|
||||
observed_generation:
|
||||
description:
|
||||
- most recent generation observed by this autoscaler.
|
||||
type: int
|
||||
- Revision indicates the revision of the state represented by Data.
|
||||
type: int
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('horizontal_pod_autoscaler', 'V1beta1')
|
||||
module = KubernetesAnsibleModule('controller_revision', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
@@ -3,11 +3,11 @@
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_horizontal_pod_autoscaler_list
|
||||
short_description: Kubernetes HorizontalPodAutoscalerList
|
||||
module: k8s_v1beta1_controller_revision_list
|
||||
short_description: Kubernetes ControllerRevisionList
|
||||
description:
|
||||
- Retrieve a list of horizontal_pod_autoscalers. List operations provide a snapshot
|
||||
read of the underlying objects, returning a resource_version representing a consistent
|
||||
- Retrieve a list of controller_revisions. List operations provide a snapshot read
|
||||
of the underlying objects, returning a resource_version representing a consistent
|
||||
version of the listed objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -99,7 +95,7 @@ RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
horizontal_pod_autoscaler_list:
|
||||
controller_revision_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
@@ -111,7 +107,7 @@ horizontal_pod_autoscaler_list:
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- list of horizontal pod autoscaler objects.
|
||||
- Items is the list of ControllerRevisions
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
@@ -120,6 +116,15 @@ horizontal_pod_autoscaler_list:
|
||||
Servers should convert recognized schemas to the latest internal value,
|
||||
and may reject unrecognized values.
|
||||
type: str
|
||||
data:
|
||||
description:
|
||||
- Data is the serialized representation of the state.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is a string value representing the REST resource this object represents.
|
||||
@@ -128,7 +133,7 @@ horizontal_pod_autoscaler_list:
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object metadata.
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
@@ -210,6 +215,153 @@ horizontal_pod_autoscaler_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +398,14 @@ horizontal_pod_autoscaler_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -285,85 +445,10 @@ horizontal_pod_autoscaler_list:
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
spec:
|
||||
revision:
|
||||
description:
|
||||
- behaviour of autoscaler.
|
||||
type: complex
|
||||
contains:
|
||||
cpu_utilization:
|
||||
description:
|
||||
- target average CPU utilization (represented as a percentage of requested
|
||||
CPU) over all the pods; if not specified it defaults to the target
|
||||
CPU utilization at 80% of the requested resources.
|
||||
type: complex
|
||||
contains:
|
||||
target_percentage:
|
||||
description:
|
||||
- fraction of the requested CPU that should be utilized/used, e.g.
|
||||
70 means that 70% of the requested CPU should be in use.
|
||||
type: int
|
||||
max_replicas:
|
||||
description:
|
||||
- upper limit for the number of pods that can be set by the autoscaler;
|
||||
cannot be smaller than MinReplicas.
|
||||
type: int
|
||||
min_replicas:
|
||||
description:
|
||||
- lower limit for the number of pods that can be set by the autoscaler,
|
||||
default 1.
|
||||
type: int
|
||||
scale_ref:
|
||||
description:
|
||||
- reference to Scale subresource; horizontal pod autoscaler will learn
|
||||
the current resource consumption from its status, and will set the
|
||||
desired number of pods by modifying its spec.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent;
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent;
|
||||
type: str
|
||||
subresource:
|
||||
description:
|
||||
- Subresource name of the referent
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- current information about the autoscaler.
|
||||
type: complex
|
||||
contains:
|
||||
current_cpu_utilization_percentage:
|
||||
description:
|
||||
- current average CPU utilization over all pods, represented as a percentage
|
||||
of requested CPU, e.g. 70 means that an average pod is using now 70%
|
||||
of its requested CPU.
|
||||
type: int
|
||||
current_replicas:
|
||||
description:
|
||||
- current number of replicas of pods managed by this autoscaler.
|
||||
type: int
|
||||
desired_replicas:
|
||||
description:
|
||||
- desired number of replicas of pods managed by this autoscaler.
|
||||
type: int
|
||||
last_scale_time:
|
||||
description:
|
||||
- last time the HorizontalPodAutoscaler scaled the number of pods; used
|
||||
by the autoscaler to control how often the number of pods is changed.
|
||||
type: complex
|
||||
contains: {}
|
||||
observed_generation:
|
||||
description:
|
||||
- most recent generation observed by this autoscaler.
|
||||
type: int
|
||||
- Revision indicates the revision of the state represented by Data.
|
||||
type: int
|
||||
kind:
|
||||
description:
|
||||
- Kind is a string value representing the REST resource this object represents.
|
||||
@@ -372,7 +457,7 @@ horizontal_pod_autoscaler_list:
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
- ''
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
@@ -391,7 +476,7 @@ horizontal_pod_autoscaler_list:
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('horizontal_pod_autoscaler_list', 'V1beta1')
|
||||
module = KubernetesAnsibleModule('controller_revision_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -57,8 +57,10 @@ options:
|
||||
- kind
|
||||
delete_options_orphan_dependents:
|
||||
description:
|
||||
- Should the dependent objects be orphaned. If true/false, the "orphan" finalizer
|
||||
will be added to/removed from the object's finalizers list.
|
||||
- "Deprecated: please use the PropagationPolicy, this field will be deprecated\
|
||||
\ in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\"\
|
||||
\ finalizer will be added to/removed from the object's finalizers list. Either\
|
||||
\ this field or PropagationPolicy may be set, but not both."
|
||||
aliases:
|
||||
- orphan_dependents
|
||||
type: bool
|
||||
@@ -67,6 +69,13 @@ options:
|
||||
- Specifies the target UID.
|
||||
aliases:
|
||||
- uid
|
||||
delete_options_propagation_policy:
|
||||
description:
|
||||
- Whether and how garbage collection will be performed. Either this field or OrphanDependents
|
||||
may be set, but not both. The default policy is decided by the existing finalizer
|
||||
set in the metadata.finalizers and the resource-specific default policy.
|
||||
aliases:
|
||||
- propagation_policy
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
@@ -118,7 +127,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -165,8 +174,10 @@ eviction:
|
||||
type: str
|
||||
orphan_dependents:
|
||||
description:
|
||||
- Should the dependent objects be orphaned. If true/false, the "orphan"
|
||||
finalizer will be added to/removed from the object's finalizers list.
|
||||
- "Deprecated: please use the PropagationPolicy, this field will be deprecated\
|
||||
\ in 1.7. Should the dependent objects be orphaned. If true/false, the\
|
||||
\ \"orphan\" finalizer will be added to/removed from the object's finalizers\
|
||||
\ list. Either this field or PropagationPolicy may be set, but not both."
|
||||
type: bool
|
||||
preconditions:
|
||||
description:
|
||||
@@ -178,6 +189,13 @@ eviction:
|
||||
description:
|
||||
- Specifies the target UID.
|
||||
type: str
|
||||
propagation_policy:
|
||||
description:
|
||||
- Whether and how garbage collection will be performed. Either this field
|
||||
or OrphanDependents may be set, but not both. The default policy is decided
|
||||
by the existing finalizer set in the metadata.finalizers and the resource-specific
|
||||
default policy.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is a string value representing the REST resource this object represents.
|
||||
@@ -265,6 +283,150 @@ eviction:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -300,6 +462,14 @@ eviction:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -133,7 +133,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -240,6 +240,150 @@ ingress:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -275,6 +419,14 @@ ingress:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -331,8 +483,7 @@ ingress:
|
||||
service_port:
|
||||
description:
|
||||
- Specifies the port of the referenced service.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- A list of host rules used to configure the Ingress. If unspecified, or
|
||||
@@ -374,8 +525,7 @@ ingress:
|
||||
service_port:
|
||||
description:
|
||||
- Specifies the port of the referenced service.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
path:
|
||||
description:
|
||||
- Path is an extended POSIX regex as defined by IEEE Std 1003.1,
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ ingress_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ ingress_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -305,8 +456,7 @@ ingress_list:
|
||||
service_port:
|
||||
description:
|
||||
- Specifies the port of the referenced service.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- A list of host rules used to configure the Ingress. If unspecified,
|
||||
@@ -348,8 +498,7 @@ ingress_list:
|
||||
service_port:
|
||||
description:
|
||||
- Specifies the port of the referenced service.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
path:
|
||||
description:
|
||||
- Path is an extended POSIX regex as defined by IEEE Std
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -153,7 +153,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -259,6 +259,150 @@ local_subject_access_review:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -294,6 +438,14 @@ local_subject_access_review:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -79,13 +79,11 @@ options:
|
||||
spec_ingress:
|
||||
description:
|
||||
- List of ingress rules to be applied to the selected pods. Traffic is allowed
|
||||
to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster
|
||||
policy allows it, OR if the traffic source is the pod's local node, OR if the
|
||||
traffic matches at least one ingress rule across all of the NetworkPolicy objects
|
||||
whose podSelector matches the pod. If this field is empty then this NetworkPolicy
|
||||
does not affect ingress isolation. If this field is present and contains at
|
||||
least one rule, this policy allows any traffic which matches at least one of
|
||||
the ingress rules in this list.
|
||||
to a pod if there are no NetworkPolicies selecting the pod OR if the traffic
|
||||
source is the pod's local node, OR if the traffic matches at least one ingress
|
||||
rule across all of the NetworkPolicy objects whose podSelector matches the pod.
|
||||
If this field is empty then this NetworkPolicy does not allow any traffic (and
|
||||
serves solely to ensure that the pods it selects are isolated by default).
|
||||
aliases:
|
||||
- ingress
|
||||
type: list
|
||||
@@ -136,7 +134,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -243,6 +241,150 @@ network_policy:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -278,6 +420,14 @@ network_policy:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -322,23 +472,21 @@ network_policy:
|
||||
ingress:
|
||||
description:
|
||||
- List of ingress rules to be applied to the selected pods. Traffic is allowed
|
||||
to a pod if namespace.networkPolicy.ingress.isolation is undefined and
|
||||
cluster policy allows it, OR if the traffic source is the pod's local
|
||||
node, OR if the traffic matches at least one ingress rule across all of
|
||||
the NetworkPolicy objects whose podSelector matches the pod. If this field
|
||||
is empty then this NetworkPolicy does not affect ingress isolation. If
|
||||
this field is present and contains at least one rule, this policy allows
|
||||
any traffic which matches at least one of the ingress rules in this list.
|
||||
to a pod if there are no NetworkPolicies selecting the pod OR if the traffic
|
||||
source is the pod's local node, OR if the traffic matches at least one
|
||||
ingress rule across all of the NetworkPolicy objects whose podSelector
|
||||
matches the pod. If this field is empty then this NetworkPolicy does not
|
||||
allow any traffic (and serves solely to ensure that the pods it selects
|
||||
are isolated by default).
|
||||
type: list
|
||||
contains:
|
||||
_from:
|
||||
description:
|
||||
- List of sources which should be able to access the pods selected for
|
||||
this rule. Items in this list are combined using a logical OR operation.
|
||||
If this field is not provided, this rule matches all sources (traffic
|
||||
not restricted by source). If this field is empty, this rule matches
|
||||
no sources (no traffic matches). If this field is present and contains
|
||||
at least on item, this rule allows traffic only if the traffic matches
|
||||
If this field is empty or missing, this rule matches all sources (traffic
|
||||
not restricted by source). If this field is present and contains at
|
||||
least on item, this rule allows traffic only if the traffic matches
|
||||
at least one item in the from list.
|
||||
type: list
|
||||
contains:
|
||||
@@ -346,9 +494,8 @@ network_policy:
|
||||
description:
|
||||
- Selects Namespaces using cluster scoped-labels. This matches all
|
||||
pods in all namespaces selected by this label selector. This field
|
||||
follows standard label selector semantics. If omitted, this selector
|
||||
selects no namespaces. If present but empty, this selector selects
|
||||
all namespaces.
|
||||
follows standard label selector semantics. If present but empty,
|
||||
this selector selects all namespaces.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
@@ -386,9 +533,8 @@ network_policy:
|
||||
pod_selector:
|
||||
description:
|
||||
- This is a label selector which selects Pods in this namespace.
|
||||
This field follows standard label selector semantics. If not provided,
|
||||
this selector selects no pods. If present but empty, this selector
|
||||
selects all pods in this namespace.
|
||||
This field follows standard label selector semantics. If present
|
||||
but empty, this selector selects all pods in this namespace.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
@@ -427,9 +573,8 @@ network_policy:
|
||||
description:
|
||||
- List of ports which should be made accessible on the pods selected
|
||||
for this rule. Each item in this list is combined using a logical
|
||||
OR. If this field is not provided, this rule matches all ports (traffic
|
||||
not restricted by port). If this field is empty, this rule matches
|
||||
no ports (no traffic matches). If this field is present and contains
|
||||
OR. If this field is empty or missing, this rule matches all ports
|
||||
(traffic not restricted by port). If this field is present and contains
|
||||
at least one item, then this rule allows traffic only if the traffic
|
||||
matches at least one port in the list.
|
||||
type: list
|
||||
@@ -440,8 +585,7 @@ network_policy:
|
||||
be a numerical or named port on a pod. If this field is not provided,
|
||||
this matches all port names and numbers. If present, only traffic
|
||||
on the specified protocol AND port will be matched.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
protocol:
|
||||
description:
|
||||
- Optional. The protocol (TCP or UDP) which traffic must match.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ network_policy_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ network_policy_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -293,35 +444,30 @@ network_policy_list:
|
||||
ingress:
|
||||
description:
|
||||
- List of ingress rules to be applied to the selected pods. Traffic
|
||||
is allowed to a pod if namespace.networkPolicy.ingress.isolation is
|
||||
undefined and cluster policy allows it, OR if the traffic source is
|
||||
the pod's local node, OR if the traffic matches at least one ingress
|
||||
rule across all of the NetworkPolicy objects whose podSelector matches
|
||||
the pod. If this field is empty then this NetworkPolicy does not affect
|
||||
ingress isolation. If this field is present and contains at least
|
||||
one rule, this policy allows any traffic which matches at least one
|
||||
of the ingress rules in this list.
|
||||
is allowed to a pod if there are no NetworkPolicies selecting the
|
||||
pod OR if the traffic source is the pod's local node, OR if the traffic
|
||||
matches at least one ingress rule across all of the NetworkPolicy
|
||||
objects whose podSelector matches the pod. If this field is empty
|
||||
then this NetworkPolicy does not allow any traffic (and serves solely
|
||||
to ensure that the pods it selects are isolated by default).
|
||||
type: list
|
||||
contains:
|
||||
_from:
|
||||
description:
|
||||
- List of sources which should be able to access the pods selected
|
||||
for this rule. Items in this list are combined using a logical
|
||||
OR operation. If this field is not provided, this rule matches
|
||||
OR operation. If this field is empty or missing, this rule matches
|
||||
all sources (traffic not restricted by source). If this field
|
||||
is empty, this rule matches no sources (no traffic matches). If
|
||||
this field is present and contains at least on item, this rule
|
||||
allows traffic only if the traffic matches at least one item in
|
||||
the from list.
|
||||
is present and contains at least on item, this rule allows traffic
|
||||
only if the traffic matches at least one item in the from list.
|
||||
type: list
|
||||
contains:
|
||||
namespace_selector:
|
||||
description:
|
||||
- Selects Namespaces using cluster scoped-labels. This matches
|
||||
all pods in all namespaces selected by this label selector.
|
||||
This field follows standard label selector semantics. If omitted,
|
||||
this selector selects no namespaces. If present but empty,
|
||||
this selector selects all namespaces.
|
||||
This field follows standard label selector semantics. If present
|
||||
but empty, this selector selects all namespaces.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
@@ -361,9 +507,8 @@ network_policy_list:
|
||||
pod_selector:
|
||||
description:
|
||||
- This is a label selector which selects Pods in this namespace.
|
||||
This field follows standard label selector semantics. If not
|
||||
provided, this selector selects no pods. If present but empty,
|
||||
this selector selects all pods in this namespace.
|
||||
This field follows standard label selector semantics. If present
|
||||
but empty, this selector selects all pods in this namespace.
|
||||
type: complex
|
||||
contains:
|
||||
match_expressions:
|
||||
@@ -404,11 +549,10 @@ network_policy_list:
|
||||
description:
|
||||
- List of ports which should be made accessible on the pods selected
|
||||
for this rule. Each item in this list is combined using a logical
|
||||
OR. If this field is not provided, this rule matches all ports
|
||||
(traffic not restricted by port). If this field is empty, this
|
||||
rule matches no ports (no traffic matches). If this field is present
|
||||
and contains at least one item, then this rule allows traffic
|
||||
only if the traffic matches at least one port in the list.
|
||||
OR. If this field is empty or missing, this rule matches all ports
|
||||
(traffic not restricted by port). If this field is present and
|
||||
contains at least one item, then this rule allows traffic only
|
||||
if the traffic matches at least one port in the list.
|
||||
type: list
|
||||
contains:
|
||||
port:
|
||||
@@ -417,8 +561,7 @@ network_policy_list:
|
||||
be a numerical or named port on a pod. If this field is not
|
||||
provided, this matches all port names and numbers. If present,
|
||||
only traffic on the specified protocol AND port will be matched.
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
protocol:
|
||||
description:
|
||||
- Optional. The protocol (TCP or UDP) which traffic must match.
|
||||
|
||||
@@ -76,6 +76,14 @@ options:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
spec_max_unavailable:
|
||||
description:
|
||||
- An eviction is allowed if at most "maxUnavailable" pods selected by "selector"
|
||||
are unavailable after the eviction, i.e. even in absence of the evicted pod.
|
||||
For example, one can prevent all voluntary evictions by specifying 0. This is
|
||||
a mutually exclusive setting with "minAvailable".
|
||||
aliases:
|
||||
- max_unavailable
|
||||
spec_min_available:
|
||||
description:
|
||||
- An eviction is allowed if at least "minAvailable" pods selected by "selector"
|
||||
@@ -131,7 +139,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -237,6 +245,150 @@ pod_disruption_budget:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -272,6 +424,14 @@ pod_disruption_budget:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -313,14 +473,20 @@ pod_disruption_budget:
|
||||
- Specification of the desired behavior of the PodDisruptionBudget.
|
||||
type: complex
|
||||
contains:
|
||||
max_unavailable:
|
||||
description:
|
||||
- An eviction is allowed if at most "maxUnavailable" pods selected by "selector"
|
||||
are unavailable after the eviction, i.e. even in absence of the evicted
|
||||
pod. For example, one can prevent all voluntary evictions by specifying
|
||||
0. This is a mutually exclusive setting with "minAvailable".
|
||||
type: str
|
||||
min_available:
|
||||
description:
|
||||
- An eviction is allowed if at least "minAvailable" pods selected by "selector"
|
||||
will still be available after the eviction, i.e. even in the absence of
|
||||
the evicted pod. So for example you can prevent all voluntary evictions
|
||||
by specifying "100%".
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
selector:
|
||||
description:
|
||||
- Label query over pods whose evictions are managed by the disruption budget.
|
||||
@@ -385,7 +551,7 @@ pod_disruption_budget:
|
||||
of the time. Large number of entries in the map may indicate problems
|
||||
with pod deletions.
|
||||
type: complex
|
||||
contains: str, UnversionedTime
|
||||
contains: str, datetime
|
||||
disruptions_allowed:
|
||||
description:
|
||||
- Number of pod disruptions that are currently allowed.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -208,6 +204,153 @@ pod_disruption_budget_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -244,6 +387,14 @@ pod_disruption_budget_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -288,14 +439,20 @@ pod_disruption_budget_list:
|
||||
- Specification of the desired behavior of the PodDisruptionBudget.
|
||||
type: complex
|
||||
contains:
|
||||
max_unavailable:
|
||||
description:
|
||||
- An eviction is allowed if at most "maxUnavailable" pods selected by
|
||||
"selector" are unavailable after the eviction, i.e. even in absence
|
||||
of the evicted pod. For example, one can prevent all voluntary evictions
|
||||
by specifying 0. This is a mutually exclusive setting with "minAvailable".
|
||||
type: str
|
||||
min_available:
|
||||
description:
|
||||
- An eviction is allowed if at least "minAvailable" pods selected by
|
||||
"selector" will still be available after the eviction, i.e. even in
|
||||
the absence of the evicted pod. So for example you can prevent all
|
||||
voluntary evictions by specifying "100%".
|
||||
type: complex
|
||||
contains: {}
|
||||
type: str
|
||||
selector:
|
||||
description:
|
||||
- Label query over pods whose evictions are managed by the disruption
|
||||
@@ -361,7 +518,7 @@ pod_disruption_budget_list:
|
||||
be empty for the most of the time. Large number of entries in the
|
||||
map may indicate problems with pod deletions.
|
||||
type: complex
|
||||
contains: str, UnversionedTime
|
||||
contains: str, datetime
|
||||
disruptions_allowed:
|
||||
description:
|
||||
- Number of pod disruptions that are currently allowed.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.openshift_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: openshift_v1beta1_pod_security_policy
|
||||
short_description: OpenShift PodSecurityPolicy
|
||||
module: k8s_v1beta1_pod_security_policy
|
||||
short_description: Kubernetes PodSecurityPolicy
|
||||
description:
|
||||
- Manage the lifecycle of a pod_security_policy object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
@@ -71,6 +71,11 @@ options:
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
spec_allowed_capabilities:
|
||||
description:
|
||||
- AllowedCapabilities is a list of capabilities that can be requested to add to
|
||||
@@ -205,10 +210,29 @@ options:
|
||||
aliases:
|
||||
- volumes
|
||||
type: list
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
@@ -217,7 +241,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- openshift == 1.0.0-snapshot
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -229,7 +253,7 @@ api_version:
|
||||
description: Requested API version
|
||||
pod_security_policy:
|
||||
type: complex
|
||||
returned: on success
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
@@ -324,6 +348,150 @@ pod_security_policy:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -359,6 +527,14 @@ pod_security_policy:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -580,14 +756,14 @@ pod_security_policy:
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = OpenShiftAnsibleModule('pod_security_policy', 'V1beta1')
|
||||
except OpenShiftAnsibleException as exc:
|
||||
module = KubernetesAnsibleModule('pod_security_policy', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except OpenShiftAnsibleException as exc:
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.openshift_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: openshift_v1beta1_pod_security_policy_list
|
||||
short_description: OpenShift PodSecurityPolicyList
|
||||
module: k8s_v1beta1_pod_security_policy_list
|
||||
short_description: Kubernetes PodSecurityPolicyList
|
||||
description:
|
||||
- Retrieve a list of pod_security_policys. List operations provide a snapshot read
|
||||
of the underlying objects, returning a resource_version representing a consistent
|
||||
@@ -46,17 +46,37 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
@@ -65,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- openshift == 1.0.0-snapshot
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -77,7 +97,7 @@ api_version:
|
||||
description: Requested API version
|
||||
pod_security_policy_list:
|
||||
type: complex
|
||||
returned: on success
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
@@ -186,6 +206,153 @@ pod_security_policy_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -222,6 +389,14 @@ pod_security_policy_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -470,14 +645,14 @@ pod_security_policy_list:
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = OpenShiftAnsibleModule('pod_security_policy_list', 'V1beta1')
|
||||
except OpenShiftAnsibleException as exc:
|
||||
module = KubernetesAnsibleModule('pod_security_policy_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except OpenShiftAnsibleException as exc:
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
501
library/k8s_v1beta1_role.py
Normal file
501
library/k8s_v1beta1_role.py
Normal file
@@ -0,0 +1,501 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_role
|
||||
short_description: Kubernetes Role
|
||||
description:
|
||||
- Manage the lifecycle of a role object. Supports check mode, and attempts to to be
|
||||
idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
annotations:
|
||||
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.
|
||||
type: dict
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
labels:
|
||||
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.
|
||||
type: dict
|
||||
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.
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this Role
|
||||
type: list
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
role:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used to distinguish
|
||||
resources with same name and namespace in different clusters. This field
|
||||
is not set anywhere right now and apiserver is going to ignore it if set
|
||||
in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when this
|
||||
object was created. It is not guaranteed to be set in happens-before order
|
||||
across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null
|
||||
for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate before
|
||||
it will be removed from the system. Only set when deletionTimestamp is
|
||||
also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource will
|
||||
be deleted. This field is set by the server when a graceful deletion is
|
||||
requested by the user, and is not directly settable by a client. The resource
|
||||
is expected to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once set, this value
|
||||
may not be unset or be set further into the future, although it may be
|
||||
shortened or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet will
|
||||
react by sending a graceful termination signal to the containers in the
|
||||
pod. After that 30 seconds, the Kubelet will send a hard termination signal
|
||||
(SIGKILL) to the container and after cleanup, remove the pod from the
|
||||
API. In the presence of network partitions, this object may still exist
|
||||
after this timestamp, until an administrator or automated process can
|
||||
determine the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system when a graceful
|
||||
deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each entry
|
||||
is an identifier for the responsible component that will remove the entry
|
||||
from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||
in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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.
|
||||
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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object that
|
||||
can be used by clients to determine when objects have changed. May be
|
||||
used for optimistic concurrency, change detection, and the watch operation
|
||||
on a resource or set of resources. Clients must treat these values as
|
||||
opaque and passed unmodified back to the server. They may only be valid
|
||||
for a particular resource or set of resources. Populated by the system.
|
||||
Read-only. Value must be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this Role
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources. If
|
||||
multiple API groups are specified, any action requested against one of
|
||||
the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
to. *s are allowed, but only as the full, final step in the path Since
|
||||
non-resource URLs are not namespaced, this field is only applicable for
|
||||
ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply
|
||||
to API resources (such as "pods" or "secrets") or non-resource URL paths
|
||||
(such as "/api"), but not both.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the rule applies
|
||||
to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll represents
|
||||
all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions
|
||||
contained in this rule. VerbAll represents all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('role', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.openshift_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: openshift_v1_cluster_policy
|
||||
short_description: OpenShift ClusterPolicy
|
||||
module: k8s_v1beta1_role_binding
|
||||
short_description: Kubernetes RoleBinding
|
||||
description:
|
||||
- Manage the lifecycle of a cluster_policy object. Supports check mode, and attempts
|
||||
- Manage the lifecycle of a role_binding object. Supports check mode, and attempts
|
||||
to to be idempotent.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
@@ -76,10 +76,21 @@ options:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
roles:
|
||||
role_ref_api_group:
|
||||
description:
|
||||
- Roles holds all the ClusterRoles held by this ClusterPolicy, mapped by ClusterRole.Name
|
||||
type: list
|
||||
- APIGroup is the group for the resource being referenced
|
||||
aliases:
|
||||
- api_group
|
||||
role_ref_kind:
|
||||
description:
|
||||
- Kind is the type of resource being referenced
|
||||
aliases:
|
||||
- kind
|
||||
role_ref_name:
|
||||
description:
|
||||
- Name is the name of resource being referenced
|
||||
aliases:
|
||||
- name
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
@@ -103,6 +114,10 @@ options:
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
subjects:
|
||||
description:
|
||||
- Subjects holds references to the objects the role applies to.
|
||||
type: list
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
@@ -111,7 +126,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- openshift == 1.0.0-snapshot
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -121,7 +136,7 @@ RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
cluster_policy:
|
||||
role_binding:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
@@ -137,12 +152,6 @@ cluster_policy:
|
||||
Servers may infer this from the endpoint the client submits requests to. Cannot
|
||||
be updated. In CamelCase.
|
||||
type: str
|
||||
last_modified:
|
||||
description:
|
||||
- LastModified is the last time that any part of the ClusterPolicy was created,
|
||||
updated, or deleted
|
||||
type: complex
|
||||
contains: {}
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
@@ -224,6 +233,150 @@ cluster_policy:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -259,6 +412,14 @@ cluster_policy:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -295,260 +456,65 @@ cluster_policy:
|
||||
generated by the server on successful creation of a resource and is not
|
||||
allowed to change on PUT operations. Populated by the system. Read-only.
|
||||
type: str
|
||||
roles:
|
||||
role_ref:
|
||||
description:
|
||||
- Roles holds all the ClusterRoles held by this ClusterPolicy, mapped by ClusterRole.Name
|
||||
type: list
|
||||
- RoleRef can reference a Role in the current namespace or a ClusterRole in
|
||||
the global namespace. If the RoleRef cannot be resolved, the Authorizer must
|
||||
return an error.
|
||||
type: complex
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- APIGroup is the group for the resource being referenced
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is the type of resource being referenced
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the cluster role
|
||||
- Name is the name of resource being referenced
|
||||
type: str
|
||||
role:
|
||||
subjects:
|
||||
description:
|
||||
- Subjects holds references to the objects the role applies to.
|
||||
type: list
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- Role is the cluster role being named
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver
|
||||
is going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time
|
||||
when this object was created. It is not guaranteed to be set in
|
||||
happens-before order across separate operations. Clients may not
|
||||
set this value. It is represented in RFC3339 form and is in UTC.
|
||||
Populated by the system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful
|
||||
deletion is requested by the user, and is not directly settable
|
||||
by a client. The resource is expected to be deleted (no longer
|
||||
visible from resource lists, and not reachable by name) after
|
||||
the time in this field. Once set, this value may not be unset
|
||||
or be set further into the future, although it may be shortened
|
||||
or the resource may be deleted prior to this time. For example,
|
||||
a user may request that a pod is deleted in 30 seconds. The Kubelet
|
||||
will react by sending a graceful termination signal to the containers
|
||||
in the pod. After that 30 seconds, the Kubelet will send a hard
|
||||
termination signal (SIGKILL) to the container and after cleanup,
|
||||
remove the pod from the API. In the presence of network partitions,
|
||||
this object may still exist after this timestamp, until an administrator
|
||||
or automated process can determine the resource is fully terminated.
|
||||
If not set, graceful deletion of the object has not been requested.
|
||||
Populated by the system when a graceful deletion is requested.
|
||||
Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry.
|
||||
Each entry is an identifier for the responsible component that
|
||||
will remove the entry from the list. If the deletionTimestamp
|
||||
of the object is non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only
|
||||
if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be
|
||||
updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and
|
||||
the watch operation on a resource or set of resources. Clients
|
||||
must treat these values as opaque and passed unmodified back to
|
||||
the server. They may only be valid for a particular resource or
|
||||
set of resources. Populated by the system. Read-only. Value must
|
||||
be treated as opaque by clients and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It
|
||||
is typically generated by the server on successful creation of
|
||||
a resource and is not allowed to change on PUT operations. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this ClusterRole
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources.
|
||||
If this field is empty, then both kubernetes and origin API groups
|
||||
are assumed. That means that if an action is requested against
|
||||
one of the enumerated resources in either the kubernetes or the
|
||||
origin API group, the request will be allowed
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to handle
|
||||
the AttributeRestrictions, the Authorizer should report an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLsSlice is a set of partial urls that a user should
|
||||
have access to. *s are allowed, but only as the full, final step
|
||||
in the path This name is intentionally different than the internal
|
||||
type so that the DefaultConvert works nicely and because the ordering
|
||||
may be different.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the rule
|
||||
applies to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll
|
||||
represents all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds and
|
||||
AttributeRestrictions contained in this rule. VerbAll represents
|
||||
all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
- APIGroup holds the API group of the referenced subject. Defaults to ""
|
||||
for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for
|
||||
User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of object being referenced. Values defined by this API group are
|
||||
"User", "Group", and "ServiceAccount". If the Authorizer does not recognized
|
||||
the kind value, the Authorizer should report an error.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the object being referenced.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace of the referenced object. If the object kind is non-namespace,
|
||||
such as "User" or "Group", and this value is not empty the Authorizer
|
||||
should report an error.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = OpenShiftAnsibleModule('cluster_policy', 'V1')
|
||||
except OpenShiftAnsibleException as exc:
|
||||
module = KubernetesAnsibleModule('role_binding', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except OpenShiftAnsibleException as exc:
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.openshift_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: openshift_v1_cluster_policy_list
|
||||
short_description: OpenShift ClusterPolicyList
|
||||
module: k8s_v1beta1_role_binding_list
|
||||
short_description: Kubernetes RoleBindingList
|
||||
description:
|
||||
- Retrieve a list of cluster_policys. List operations provide a snapshot read of the
|
||||
- Retrieve a list of role_bindings. List operations provide a snapshot read of the
|
||||
underlying objects, returning a resource_version representing a consistent version
|
||||
of the listed objects.
|
||||
version_added: 2.3.0
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- openshift == 1.0.0-snapshot
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -99,7 +95,7 @@ RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
cluster_policy_list:
|
||||
role_binding_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
@@ -111,7 +107,7 @@ cluster_policy_list:
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- Items is a list of ClusterPolicies
|
||||
- Items is a list of RoleBindings
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
@@ -126,12 +122,6 @@ cluster_policy_list:
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated. In CamelCase.
|
||||
type: str
|
||||
last_modified:
|
||||
description:
|
||||
- LastModified is the last time that any part of the ClusterPolicy was created,
|
||||
updated, or deleted
|
||||
type: complex
|
||||
contains: {}
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
@@ -216,6 +206,153 @@ cluster_policy_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -252,6 +389,14 @@ cluster_policy_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
@@ -291,256 +436,52 @@ cluster_policy_list:
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
roles:
|
||||
role_ref:
|
||||
description:
|
||||
- Roles holds all the ClusterRoles held by this ClusterPolicy, mapped by
|
||||
ClusterRole.Name
|
||||
type: list
|
||||
- RoleRef can reference a Role in the current namespace or a ClusterRole
|
||||
in the global namespace. If the RoleRef cannot be resolved, the Authorizer
|
||||
must return an error.
|
||||
type: complex
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- APIGroup is the group for the resource being referenced
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is the type of resource being referenced
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name is the name of the cluster role
|
||||
- Name is the name of resource being referenced
|
||||
type: str
|
||||
role:
|
||||
subjects:
|
||||
description:
|
||||
- Subjects holds references to the objects the role applies to.
|
||||
type: list
|
||||
contains:
|
||||
api_group:
|
||||
description:
|
||||
- Role is the cluster role being named
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This
|
||||
is used to distinguish resources with same name and namespace
|
||||
in different clusters. This field is not set anywhere right
|
||||
now and apiserver is going to ignore it if set in create or
|
||||
update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time
|
||||
when this object was created. It is not guaranteed to be set
|
||||
in happens-before order across separate operations. Clients
|
||||
may not set this value. It is represented in RFC3339 form
|
||||
and is in UTC. Populated by the system. Read-only. Null for
|
||||
lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this
|
||||
resource will be deleted. This field is set by the server
|
||||
when a graceful deletion is requested by the user, and is
|
||||
not directly settable by a client. The resource is expected
|
||||
to be deleted (no longer visible from resource lists, and
|
||||
not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the
|
||||
future, although it may be shortened or the resource may be
|
||||
deleted prior to this time. For example, a user may request
|
||||
that a pod is deleted in 30 seconds. The Kubelet will react
|
||||
by sending a graceful termination signal to the containers
|
||||
in the pod. After that 30 seconds, the Kubelet will send a
|
||||
hard termination signal (SIGKILL) to the container and after
|
||||
cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp,
|
||||
until an administrator or automated process can determine
|
||||
the resource is fully terminated. If not set, graceful deletion
|
||||
of the object has not been requested. Populated by the system
|
||||
when a graceful deletion is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry.
|
||||
Each entry is an identifier for the responsible component
|
||||
that will remove the entry from the list. If the deletionTimestamp
|
||||
of the object is non-nil, entries in this list can only be
|
||||
removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied
|
||||
only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the
|
||||
desired state. Populated by the system. Read-only.
|
||||
type: int
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL.
|
||||
Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. May be used for optimistic concurrency, change
|
||||
detection, and the watch operation on a resource or set of
|
||||
resources. Clients must treat these values as opaque and passed
|
||||
unmodified back to the server. They may only be valid for
|
||||
a particular resource or set of resources. Populated by the
|
||||
system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object.
|
||||
It is typically generated by the server on successful creation
|
||||
of a resource and is not allowed to change on PUT operations.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this ClusterRole
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources.
|
||||
If this field is empty, then both kubernetes and origin API
|
||||
groups are assumed. That means that if an action is requested
|
||||
against one of the enumerated resources in either the kubernetes
|
||||
or the origin API group, the request will be allowed
|
||||
type: list
|
||||
contains: str
|
||||
attribute_restrictions:
|
||||
description:
|
||||
- AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder
|
||||
pair supports. If the Authorizer does not recognize how to
|
||||
handle the AttributeRestrictions, the Authorizer should report
|
||||
an error.
|
||||
type: complex
|
||||
contains:
|
||||
raw:
|
||||
description:
|
||||
- Raw is the underlying serialization of this object.
|
||||
type: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLsSlice is a set of partial urls that a user
|
||||
should have access to. *s are allowed, but only as the full,
|
||||
final step in the path This name is intentionally different
|
||||
than the internal type so that the DefaultConvert works nicely
|
||||
and because the ordering may be different.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the
|
||||
rule applies to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll
|
||||
represents all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds
|
||||
and AttributeRestrictions contained in this rule. VerbAll
|
||||
represents all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
- APIGroup holds the API group of the referenced subject. Defaults to
|
||||
"" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io"
|
||||
for User and Group subjects.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind of object being referenced. Values defined by this API group
|
||||
are "User", "Group", and "ServiceAccount". If the Authorizer does
|
||||
not recognized the kind value, the Authorizer should report an error.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the object being referenced.
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace of the referenced object. If the object kind is non-namespace,
|
||||
such as "User" or "Group", and this value is not empty the Authorizer
|
||||
should report an error.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- Kind is a string value representing the REST resource this object represents.
|
||||
@@ -568,14 +509,14 @@ cluster_policy_list:
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = OpenShiftAnsibleModule('cluster_policy_list', 'V1')
|
||||
except OpenShiftAnsibleException as exc:
|
||||
module = KubernetesAnsibleModule('role_binding_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except OpenShiftAnsibleException as exc:
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
518
library/k8s_v1beta1_role_list.py
Normal file
518
library/k8s_v1beta1_role_list.py
Normal file
@@ -0,0 +1,518 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: k8s_v1beta1_role_list
|
||||
short_description: Kubernetes RoleList
|
||||
description:
|
||||
- Retrieve a list of roles. List operations provide a snapshot read of the underlying
|
||||
objects, returning a resource_version representing a consistent version of the listed
|
||||
objects.
|
||||
version_added: 2.3.0
|
||||
author: OpenShift (@openshift)
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Token used to connect to the API.
|
||||
cert_file:
|
||||
description:
|
||||
- Path to a certificate used to authenticate with the API.
|
||||
type: path
|
||||
context:
|
||||
description:
|
||||
- The name of a context found in the Kubernetes config file.
|
||||
debug:
|
||||
description:
|
||||
- Enable debug output from the OpenShift helper. Logging info is written to KubeObjHelper.log
|
||||
default: false
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- If set to C(True), and I(state) is C(present), an existing object will updated,
|
||||
and lists will be replaced, rather than merged.
|
||||
default: false
|
||||
type: bool
|
||||
host:
|
||||
description:
|
||||
- Provide a URL for acessing the Kubernetes API.
|
||||
key_file:
|
||||
description:
|
||||
- Path to a key file used to authenticate with the API.
|
||||
type: path
|
||||
kubeconfig:
|
||||
description:
|
||||
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
resource_definition:
|
||||
description:
|
||||
- Provide the YAML definition for the object, bypassing any modules parameters
|
||||
intended to define object attributes.
|
||||
type: dict
|
||||
src:
|
||||
description:
|
||||
- Provide a path to a file containing the YAML definition of the object. Mutually
|
||||
exclusive with I(resource_definition).
|
||||
type: path
|
||||
ssl_ca_cert:
|
||||
description:
|
||||
- Path to a CA certificate used to authenticate with the API.
|
||||
type: path
|
||||
state:
|
||||
description:
|
||||
- Determines if an object should be created, patched, or deleted. When set to
|
||||
C(present), the object will be created, if it does not exist, or patched, if
|
||||
parameter values differ from the existing object's attributes, and deleted,
|
||||
if set to C(absent). A patch operation results in merging lists and updating
|
||||
dictionaries, with lists being merged into a unique set of values. If a list
|
||||
contains a dictionary with a I(name) or I(type) attribute, a strategic merge
|
||||
is performed, where individual elements with a matching I(name_) or I(type)
|
||||
are merged. To force the replacement of lists, set the I(force) option to C(True).
|
||||
default: present
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
username:
|
||||
description:
|
||||
- Provide a username for connecting to the API.
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
api_version:
|
||||
type: string
|
||||
description: Requested API version
|
||||
role_list:
|
||||
type: complex
|
||||
returned: when I(state) = C(present)
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
items:
|
||||
description:
|
||||
- Items is a list of Roles
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
annotations:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
cluster_name:
|
||||
description:
|
||||
- The name of the cluster which the object belongs to. This is used
|
||||
to distinguish resources with same name and namespace in different
|
||||
clusters. This field is not set anywhere right now and apiserver is
|
||||
going to ignore it if set in create or update request.
|
||||
type: str
|
||||
creation_timestamp:
|
||||
description:
|
||||
- CreationTimestamp is a timestamp representing the server time when
|
||||
this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value.
|
||||
It is represented in RFC3339 form and is in UTC. Populated by the
|
||||
system. Read-only. Null for lists.
|
||||
type: complex
|
||||
contains: {}
|
||||
deletion_grace_period_seconds:
|
||||
description:
|
||||
- Number of seconds allowed for this object to gracefully terminate
|
||||
before it will be removed from the system. Only set when deletionTimestamp
|
||||
is also set. May only be shortened. Read-only.
|
||||
type: int
|
||||
deletion_timestamp:
|
||||
description:
|
||||
- DeletionTimestamp is RFC 3339 date and time at which this resource
|
||||
will be deleted. This field is set by the server when a graceful deletion
|
||||
is requested by the user, and is not directly settable by a client.
|
||||
The resource is expected to be deleted (no longer visible from resource
|
||||
lists, and not reachable by name) after the time in this field. Once
|
||||
set, this value may not be unset or be set further into the future,
|
||||
although it may be shortened or the resource may be deleted prior
|
||||
to this time. For example, a user may request that a pod is deleted
|
||||
in 30 seconds. The Kubelet will react by sending a graceful termination
|
||||
signal to the containers in the pod. After that 30 seconds, the Kubelet
|
||||
will send a hard termination signal (SIGKILL) to the container and
|
||||
after cleanup, remove the pod from the API. In the presence of network
|
||||
partitions, this object may still exist after this timestamp, until
|
||||
an administrator or automated process can determine the resource is
|
||||
fully terminated. If not set, graceful deletion of the object has
|
||||
not been requested. Populated by the system when a graceful deletion
|
||||
is requested. Read-only.
|
||||
type: complex
|
||||
contains: {}
|
||||
finalizers:
|
||||
description:
|
||||
- Must be empty before the object is deleted from the registry. Each
|
||||
entry is an identifier for the responsible component that will remove
|
||||
the entry from the list. If the deletionTimestamp of the object is
|
||||
non-nil, entries in this list can only be removed.
|
||||
type: list
|
||||
contains: str
|
||||
generate_name:
|
||||
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. 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). Applied only if Name is not specified.
|
||||
type: str
|
||||
generation:
|
||||
description:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
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.
|
||||
type: complex
|
||||
contains: str, str
|
||||
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.
|
||||
type: str
|
||||
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. Must be a DNS_LABEL. Cannot be updated.
|
||||
type: str
|
||||
owner_references:
|
||||
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.
|
||||
type: list
|
||||
contains:
|
||||
api_version:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
type: bool
|
||||
kind:
|
||||
description:
|
||||
- Kind of the referent.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Name of the referent.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID of the referent.
|
||||
type: str
|
||||
resource_version:
|
||||
description:
|
||||
- An opaque value that represents the internal version of this object
|
||||
that can be used by clients to determine when objects have changed.
|
||||
May be used for optimistic concurrency, change detection, and the
|
||||
watch operation on a resource or set of resources. Clients must treat
|
||||
these values as opaque and passed unmodified back to the server. They
|
||||
may only be valid for a particular resource or set of resources. Populated
|
||||
by the system. Read-only. Value must be treated as opaque by clients
|
||||
and .
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
uid:
|
||||
description:
|
||||
- UID is the unique in time and space value for this object. It is typically
|
||||
generated by the server on successful creation of a resource and is
|
||||
not allowed to change on PUT operations. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
rules:
|
||||
description:
|
||||
- Rules holds all the PolicyRules for this Role
|
||||
type: list
|
||||
contains:
|
||||
api_groups:
|
||||
description:
|
||||
- APIGroups is the name of the APIGroup that contains the resources.
|
||||
If multiple API groups are specified, any action requested against
|
||||
one of the enumerated resources in any API group will be allowed.
|
||||
type: list
|
||||
contains: str
|
||||
non_resource_ur_ls:
|
||||
description:
|
||||
- NonResourceURLs is a set of partial urls that a user should have access
|
||||
to. *s are allowed, but only as the full, final step in the path Since
|
||||
non-resource URLs are not namespaced, this field is only applicable
|
||||
for ClusterRoles referenced from a ClusterRoleBinding. Rules can either
|
||||
apply to API resources (such as "pods" or "secrets") or non-resource
|
||||
URL paths (such as "/api"), but not both.
|
||||
type: list
|
||||
contains: str
|
||||
resource_names:
|
||||
description:
|
||||
- ResourceNames is an optional white list of names that the rule applies
|
||||
to. An empty set means that everything is allowed.
|
||||
type: list
|
||||
contains: str
|
||||
resources:
|
||||
description:
|
||||
- Resources is a list of resources this rule applies to. ResourceAll
|
||||
represents all resources.
|
||||
type: list
|
||||
contains: str
|
||||
verbs:
|
||||
description:
|
||||
- Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions
|
||||
contained in this rule. VerbAll represents all kinds.
|
||||
type: list
|
||||
contains: str
|
||||
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.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard object's metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this object that
|
||||
can be used by clients to determine when objects have changed. Value must
|
||||
be treated as opaque by clients and passed unmodified back to the server.
|
||||
Populated by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the system. Read-only.
|
||||
type: str
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
module = KubernetesAnsibleModule('role_list', 'V1beta1')
|
||||
except KubernetesAnsibleException as exc:
|
||||
# The helper failed to init, so there is no module object. All we can do is raise the error.
|
||||
raise Exception(exc.message)
|
||||
|
||||
try:
|
||||
module.execute_module()
|
||||
except KubernetesAnsibleException as exc:
|
||||
module.fail_json(msg="Module failed!", error=str(exc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -134,7 +134,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -240,6 +240,150 @@ self_subject_access_review:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -275,6 +419,14 @@ self_subject_access_review:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -115,7 +115,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -222,6 +222,150 @@ storage_class:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -257,6 +401,14 @@ storage_class:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -46,10 +46,6 @@ options:
|
||||
options are provided, the openshift client will attempt to load the default
|
||||
configuration file from I(~/.kube/config.json).
|
||||
type: path
|
||||
namespace:
|
||||
description:
|
||||
- Namespaces provide a scope for names. Names of resources need to be unique within
|
||||
a namespace, but not across namespaces. Provide the namespace for the object.
|
||||
password:
|
||||
description:
|
||||
- Provide a password for connecting to the API. Use in conjunction with I(username).
|
||||
@@ -89,7 +85,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -210,6 +206,153 @@ storage_class_list:
|
||||
- A sequence number representing a specific generation of the desired
|
||||
state. Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant
|
||||
at object creation time. This field is a list of initializers that
|
||||
have not yet acted on this object. If nil or empty, this object has
|
||||
been completely initialized. Otherwise, the object is considered uninitialized
|
||||
and is hidden (in list/watch and get calls) from clients that haven't
|
||||
explicitly asked to observe uninitialized objects. When an object
|
||||
is created, the system will populate this list with the current set
|
||||
of initializers. Only privileged users may set or modify this list.
|
||||
Once it is empty, it may not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be
|
||||
set to nil and the object is considered as initialized and visible
|
||||
to all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may
|
||||
define its own extended details. This field is optional and
|
||||
the data returned is not guaranteed to conform to any schema
|
||||
except that defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with
|
||||
the StatusReason failure. Not all StatusReasons may provide
|
||||
detailed causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot
|
||||
and postfix notation for nested attributes. Arrays
|
||||
are zero-indexed. Fields may appear more than once
|
||||
in an array of causes due to fields having multiple
|
||||
errors. Optional. Examples: "name" - the field "name"
|
||||
on the current resource "items[0].name" - the field
|
||||
"name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the
|
||||
error. If this value is empty there is no information
|
||||
available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the
|
||||
status StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the
|
||||
status StatusReason. On some operations may differ from
|
||||
the requested resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the
|
||||
status StatusReason (when there is a single name which
|
||||
can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation
|
||||
should be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource
|
||||
which can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of
|
||||
this object that can be used by clients to determine when
|
||||
objects have changed. Value must be treated as opaque
|
||||
by clients and passed unmodified back to the server. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated
|
||||
by the system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in
|
||||
the "Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does
|
||||
not override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -246,6 +389,14 @@ storage_class_list:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -153,7 +153,7 @@ options:
|
||||
- Whether or not to verify the API server's SSL certificates.
|
||||
type: bool
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -259,6 +259,150 @@ subject_access_review:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -294,6 +438,14 @@ subject_access_review:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
@@ -114,7 +114,7 @@ options:
|
||||
- Versions are versions for this third party object
|
||||
type: list
|
||||
requirements:
|
||||
- kubernetes == 1.0.0
|
||||
- kubernetes == 3.0.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -225,6 +225,150 @@ third_party_resource:
|
||||
- A sequence number representing a specific generation of the desired state.
|
||||
Populated by the system. Read-only.
|
||||
type: int
|
||||
initializers:
|
||||
description:
|
||||
- An initializer is a controller which enforces some system invariant at
|
||||
object creation time. This field is a list of initializers that have not
|
||||
yet acted on this object. If nil or empty, this object has been completely
|
||||
initialized. Otherwise, the object is considered uninitialized and is
|
||||
hidden (in list/watch and get calls) from clients that haven't explicitly
|
||||
asked to observe uninitialized objects. When an object is created, the
|
||||
system will populate this list with the current set of initializers. Only
|
||||
privileged users may set or modify this list. Once it is empty, it may
|
||||
not be modified further by any user.
|
||||
type: complex
|
||||
contains:
|
||||
pending:
|
||||
description:
|
||||
- Pending is a list of initializers that must execute in order before
|
||||
this object is visible. When the last pending initializer is removed,
|
||||
and no failing result is set, the initializers struct will be set
|
||||
to nil and the object is considered as initialized and visible to
|
||||
all clients.
|
||||
type: list
|
||||
contains:
|
||||
name:
|
||||
description:
|
||||
- name of the process that is responsible for initializing this
|
||||
object.
|
||||
type: str
|
||||
result:
|
||||
description:
|
||||
- If result is set with the Failure field, the object will be persisted
|
||||
to storage and then deleted, ensuring that other clients can observe
|
||||
the deletion.
|
||||
type: complex
|
||||
contains:
|
||||
api_version:
|
||||
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.
|
||||
type: str
|
||||
code:
|
||||
description:
|
||||
- Suggested HTTP return code for this status, 0 if not set.
|
||||
type: int
|
||||
details:
|
||||
description:
|
||||
- Extended data associated with the reason. Each reason may define
|
||||
its own extended details. This field is optional and the data
|
||||
returned is not guaranteed to conform to any schema except that
|
||||
defined by the reason type.
|
||||
type: complex
|
||||
contains:
|
||||
causes:
|
||||
description:
|
||||
- The Causes array includes more details associated with the
|
||||
StatusReason failure. Not all StatusReasons may provide detailed
|
||||
causes.
|
||||
type: list
|
||||
contains:
|
||||
field:
|
||||
description:
|
||||
- 'The field of the resource that has caused this error,
|
||||
as named by its JSON serialization. May include dot and
|
||||
postfix notation for nested attributes. Arrays are zero-indexed.
|
||||
Fields may appear more than once in an array of causes
|
||||
due to fields having multiple errors. Optional. Examples:
|
||||
"name" - the field "name" on the current resource "items[0].name"
|
||||
- the field "name" on the first array entry in "items"'
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the cause of the error.
|
||||
This field may be presented as-is to a reader.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of the cause of the error.
|
||||
If this value is empty there is no information available.
|
||||
type: str
|
||||
group:
|
||||
description:
|
||||
- The group attribute of the resource associated with the status
|
||||
StatusReason.
|
||||
type: str
|
||||
kind:
|
||||
description:
|
||||
- The kind attribute of the resource associated with the status
|
||||
StatusReason. On some operations may differ from the requested
|
||||
resource Kind.
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The name attribute of the resource associated with the status
|
||||
StatusReason (when there is a single name which can be described).
|
||||
type: str
|
||||
retry_after_seconds:
|
||||
description:
|
||||
- If specified, the time in seconds before the operation should
|
||||
be retried.
|
||||
type: int
|
||||
uid:
|
||||
description:
|
||||
- UID of the resource. (when there is a single resource which
|
||||
can be described).
|
||||
type: str
|
||||
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.
|
||||
type: str
|
||||
message:
|
||||
description:
|
||||
- A human-readable description of the status of this operation.
|
||||
type: str
|
||||
metadata:
|
||||
description:
|
||||
- Standard list metadata.
|
||||
type: complex
|
||||
contains:
|
||||
resource_version:
|
||||
description:
|
||||
- String that identifies the server's internal version of this
|
||||
object that can be used by clients to determine when objects
|
||||
have changed. Value must be treated as opaque by clients and
|
||||
passed unmodified back to the server. Populated by the system.
|
||||
Read-only.
|
||||
type: str
|
||||
self_link:
|
||||
description:
|
||||
- SelfLink is a URL representing this object. Populated by the
|
||||
system. Read-only.
|
||||
type: str
|
||||
reason:
|
||||
description:
|
||||
- A machine-readable description of why this operation is in the
|
||||
"Failure" status. If this value is empty there is no information
|
||||
available. A Reason clarifies an HTTP status code but does not
|
||||
override it.
|
||||
type: str
|
||||
status:
|
||||
description:
|
||||
- 'Status of the operation. One of: "Success" or "Failure".'
|
||||
type: str
|
||||
labels:
|
||||
description:
|
||||
- Map of string keys and values that can be used to organize and categorize
|
||||
@@ -260,6 +404,14 @@ third_party_resource:
|
||||
description:
|
||||
- API version of the referent.
|
||||
type: str
|
||||
block_owner_deletion:
|
||||
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: bool
|
||||
controller:
|
||||
description:
|
||||
- If true, this reference points to the managing controller.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user