Class: ReplicationControllersEndpoint

endpoints~ ReplicationControllersEndpoint

Extended endpoint for 'replicationControllers'

new ReplicationControllersEndpoint()

Kubernetes API Endpoint for ReplicationControllers

Define a new ReplicationControllersEndpoint object.

Extends

Members

client :module:client.KubernetesClient

Reference to the parent client object

Type:
Inherited From:

<nullable> options :object

Endpoint option overrides

Type:
  • object
Inherited From:

resource :string

Server resource name

Type:
  • string
Inherited From:

Methods

create(body, opts, next) → {Promise.<KubernetesResource>}

Create new resource on the API server

Corresponds to the 'POST' http method.

This:
Parameters:
Name Type Argument Description
body KubernetesResource | *

Resource object to send

opts object <optional>
<nullable>

Method options

next function | * <optional>

Node.js callback (replaces Promise output)

Inherited From:
Returns:
Type
Promise.<KubernetesResource>

delete(query, opts, next) → {Promise.<KubernetesResource>}

Delete resource on the API server

Corresponds to the 'DELETE' http method.

This:
Parameters:
Name Type Argument Description
query string

Server resource resource

opts object <optional>
<nullable>

Method options

next function | * <optional>

Node.js callback (replaces Promise output)

Inherited From:
Returns:
Type
Promise.<KubernetesResource>

get(query, opts, next) → {Promise.<(KubernetesResource|KubernetesList)>}

Request resources from the API server

Corresponds to the 'GET' http method.

Missing parameters can be stripped from the beginning of the parameter list and will be checked for type appropriately. If query is not defined, the returned Promise will be for a KubernetesList. Otherwise it will be a Promise for a KubernetesResource.

This:
Parameters:
Name Type Argument Description
query string <optional>
<nullable>

Server resource name

opts object <optional>
<nullable>

Method options

next function | * <optional>

Node.js callback (replaces Promise output)

Inherited From:
Returns:
Type
Promise.<(KubernetesResource|KubernetesList)>

patch(query, body, opts, next) → {Promise.<KubernetesResource>}

Partially update resource on the API server

Corresponds to the 'PATCH' http method.

Currently only the application/strategic-merge-patch+json content type is supported by default, but other types may be used by manually setting the Content-Type header in the method options.

This:
Parameters:
Name Type Argument Description
query string

Server resource resource

body object

Resource patch to send

opts object <optional>
<nullable>

Method options

next function | * <optional>

Node.js callback (replaces Promise output)

Inherited From:
Returns:
Type
Promise.<KubernetesResource>

scale(query, increment, opts, next) → {Promise}

Scale the Replication Controller's replica count

Specify a negative increment to scale down.

Parameters:
Name Type Argument Default Description
query string

Server resource name

increment number <optional>
1

Number of replicas to add

opts object <optional>
<nullable>

Method options

Properties
Name Type Argument Default Description
prune boolean <optional>
false

Delete replication controller if replicas becomes 0

next function | * <optional>

Node.js callback (replaces Promise output)

Returns:
  • Resolves to the response body from the API server
Type
Promise

update(query, body, opts, next) → {Promise.<KubernetesResource>}

Update resource on the API server

Corresponds to the 'PUT' http method.

This:
Parameters:
Name Type Argument Description
query string

Server resource resource

body KubernetesResource | *

Resource object to send

opts object <optional>
<nullable>

Method options

next function | * <optional>

Node.js callback (replaces Promise output)

Inherited From:
Returns:
Type
Promise.<KubernetesResource>

watch(query, opts, next) → {module.endpoints~WatchEmitter}

Watch server resource(s) for changes

Corresponds to the 'GET' http method with the watch query parameter set.

Gets the current state of the requested resources and returns a custom event emitter (see below) with the current state set to the initialState property. Watch events will not be received until the start method is called on the emitter. This allows the user to define all event listeners before requesting events from the API server and prevent events from being missed during the initial setup.

Missing parameters can be stripped from the beginning of the parameter list and will be checked for type appropriately. If query is not defined, the watched resource will be a KubernetesList. Otherwise it will be a KubernetesResource.

This:
Parameters:
Name Type Argument Description
query string <optional>
<nullable>

Server resource resource

opts object | * <optional>

Method options

Properties
Name Type Argument Default Description
verbose boolean <optional>
false

Return full response instead of body only

child string <optional>
<nullable>

Name of nested child resource

next function | * <optional>

Node.js callback (replaces Promise output)

Inherited From:
Returns:
Type
module.endpoints~WatchEmitter