Class: ReplicaSet#
Hierarchy#
WorkloadKubeObject
↳ ReplicaSet
Table of contents#
Constructors#
Properties#
Accessors#
Methods#
- delete
- getAffinity
- getAffinityNumber
- getAge
- getAnnotations
- getCurrent
- getDesired
- getFinalizers
- getId
- getImages
- getLabels
- getName
- getNodeSelectors
- getNs
- getOwnerRefs
- getReady
- getResourceVersion
- getSearchFields
- getSelectors
- getTemplateLabels
- getTimeDiffFromNow
- getTolerations
- patch
- toPlainObject
- update
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- stringifyLabels
Constructors#
constructor#
• new ReplicaSet(data
)
Parameters#
Name | Type |
---|---|
data |
KubeJsonApiData |
Overrides#
WorkloadKubeObject.constructor
Properties#
apiVersion#
• apiVersion: string
Inherited from#
WorkloadKubeObject.apiVersion
kind#
• kind: string
Inherited from#
WorkloadKubeObject.kind
managedFields#
• Optional
managedFields: any
Inherited from#
WorkloadKubeObject.managedFields
metadata#
• metadata: KubeObjectMetadata
Inherited from#
WorkloadKubeObject.metadata
spec#
• spec: Object
Type declaration#
Name | Type |
---|---|
minReadySeconds? |
number |
replicas? |
number |
selector |
LabelSelector |
template? |
Object |
template.metadata |
Object |
template.metadata.labels |
Object |
template.metadata.labels.app |
string |
template.spec? |
Object |
template.spec.activeDeadlineSeconds? |
number |
template.spec.affinity? |
IAffinity |
template.spec.automountServiceAccountToken? |
boolean |
template.spec.containers |
IPodContainer [] |
template.spec.dnsPolicy? |
string |
template.spec.hostAliases? |
Object |
template.spec.hostAliases.hostnames |
string [] |
template.spec.hostAliases.ip |
string |
template.spec.hostIPC? |
boolean |
template.spec.hostNetwork? |
boolean |
template.spec.hostPID? |
boolean |
template.spec.hostname? |
string |
template.spec.imagePullSecrets? |
{ name : string }[] |
template.spec.initContainers |
IPodContainer [] |
template.spec.nodeName? |
string |
template.spec.nodeSelector? |
Object |
template.spec.priority? |
number |
template.spec.priorityClassName? |
string |
template.spec.restartPolicy? |
string |
template.spec.schedulerName? |
string |
template.spec.securityContext? |
Object |
template.spec.serviceAccount |
string |
template.spec.serviceAccountName |
string |
template.spec.shareProcessNamespace? |
boolean |
template.spec.subdomain? |
string |
template.spec.terminationGracePeriodSeconds? |
number |
template.spec.tolerations? |
{ effect? : string ; key? : string ; operator? : string ; tolerationSeconds? : number ; value? : string }[] |
template.spec.volumes? |
{ configMap : { name : string } ; emptyDir : { medium? : string ; sizeLimit? : string } ; name : string ; persistentVolumeClaim : { claimName : string } ; secret : { defaultMode : number ; secretName : string } }[] |
Overrides#
WorkloadKubeObject.spec
status#
• status: Object
Type declaration#
Name | Type |
---|---|
availableReplicas? |
number |
conditions? |
{ lastTransitionTime : string ; lastUpdateTime : string ; message : string ; reason : string ; status : string ; type : string }[] |
fullyLabeledReplicas? |
number |
observedGeneration? |
number |
readyReplicas? |
number |
replicas |
number |
Overrides#
WorkloadKubeObject.status
apiBase#
▪ Static
apiBase: string
= "/apis/apps/v1/replicasets"
Overrides#
WorkloadKubeObject.apiBase
kind#
▪ Static
kind: string
= "ReplicaSet"
Overrides#
WorkloadKubeObject.kind
namespaced#
▪ Static
namespaced: boolean
= true
Overrides#
WorkloadKubeObject.namespaced
Accessors#
selfLink#
• get
selfLink(): string
Returns#
string
Inherited from#
WorkloadKubeObject.selfLink
Methods#
delete#
▸ delete(params?
): Promise
<KubeJsonApiData
>
deprecated
use KubeApi.delete instead
Parameters#
Name | Type |
---|---|
params? |
JsonApiParams <any > |
Returns#
Promise
<KubeJsonApiData
>
Inherited from#
WorkloadKubeObject.delete
getAffinity#
▸ getAffinity(): IAffinity
Returns#
IAffinity
Inherited from#
WorkloadKubeObject.getAffinity
getAffinityNumber#
▸ getAffinityNumber(): number
Returns#
number
Inherited from#
WorkloadKubeObject.getAffinityNumber
getAge#
▸ getAge(humanize?
, compact?
, fromNow?
): string
| number
Parameters#
Name | Type | Default value |
---|---|---|
humanize |
boolean |
true |
compact |
boolean |
true |
fromNow |
boolean |
false |
Returns#
string
| number
Inherited from#
WorkloadKubeObject.getAge
getAnnotations#
▸ getAnnotations(filter?
): string
[]
Parameters#
Name | Type | Default value |
---|---|---|
filter |
boolean |
false |
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getAnnotations
getCurrent#
▸ getCurrent(): number
Returns#
number
getDesired#
▸ getDesired(): number
Returns#
number
getFinalizers#
▸ getFinalizers(): string
[]
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getFinalizers
getId#
▸ getId(): string
Returns#
string
Inherited from#
WorkloadKubeObject.getId
getImages#
▸ getImages(): string
[]
Returns#
string
[]
getLabels#
▸ getLabels(): string
[]
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getLabels
getName#
▸ getName(): string
Returns#
string
Inherited from#
WorkloadKubeObject.getName
getNodeSelectors#
▸ getNodeSelectors(): string
[]
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getNodeSelectors
getNs#
▸ getNs(): string
Returns#
string
Inherited from#
WorkloadKubeObject.getNs
getOwnerRefs#
▸ getOwnerRefs(): { apiVersion
: string
; blockOwnerDeletion
: boolean
; controller
: boolean
; kind
: string
; name
: string
; namespace
: string
; uid
: string
}[]
Returns#
{ apiVersion
: string
; blockOwnerDeletion
: boolean
; controller
: boolean
; kind
: string
; name
: string
; namespace
: string
; uid
: string
}[]
Inherited from#
WorkloadKubeObject.getOwnerRefs
getReady#
▸ getReady(): number
Returns#
number
getResourceVersion#
▸ getResourceVersion(): string
Returns#
string
Inherited from#
WorkloadKubeObject.getResourceVersion
getSearchFields#
▸ getSearchFields(): string
[]
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getSearchFields
getSelectors#
▸ getSelectors(): string
[]
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getSelectors
getTemplateLabels#
▸ getTemplateLabels(): string
[]
Returns#
string
[]
Inherited from#
WorkloadKubeObject.getTemplateLabels
getTimeDiffFromNow#
▸ getTimeDiffFromNow(): number
Returns#
number
Inherited from#
WorkloadKubeObject.getTimeDiffFromNow
getTolerations#
▸ getTolerations(): IToleration
[]
Returns#
IToleration
[]
Inherited from#
WorkloadKubeObject.getTolerations
patch#
▸ patch(patch
): Promise
<KubeJsonApiData
>
deprecated
use KubeApi.patch instead
Parameters#
Name | Type |
---|---|
patch |
Patch |
Returns#
Promise
<KubeJsonApiData
>
Inherited from#
WorkloadKubeObject.patch
toPlainObject#
▸ toPlainObject(): object
Returns#
object
Inherited from#
WorkloadKubeObject.toPlainObject
update#
▸ update(data
): Promise
<KubeJsonApiData
>
Perform a full update (or more specifically a replace)
Note: this is brittle if data
is not actually partial (but instead whole).
As fields such as resourceVersion
will probably out of date. This is a
common race condition.
deprecated
use KubeApi.update instead
Parameters#
Name | Type |
---|---|
data |
Partial <ReplicaSet > |
Returns#
Promise
<KubeJsonApiData
>
Inherited from#
WorkloadKubeObject.update
create#
▸ Static
create(data
): KubeObject
<KubeObjectMetadata
, any
, any
>
Parameters#
Name | Type |
---|---|
data |
KubeJsonApiData |
Returns#
KubeObject
<KubeObjectMetadata
, any
, any
>
Inherited from#
WorkloadKubeObject.create
isJsonApiData#
▸ Static
isJsonApiData(object
): object is KubeJsonApiData
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiData
Inherited from#
WorkloadKubeObject.isJsonApiData
isJsonApiDataList#
▸ Static
isJsonApiDataList<T
>(object
, verifyItem
): object is KubeJsonApiDataList<T>
Type parameters#
Name |
---|
T |
Parameters#
Name | Type |
---|---|
object |
unknown |
verifyItem |
(val : unknown ) => val is T |
Returns#
object is KubeJsonApiDataList<T>
Inherited from#
WorkloadKubeObject.isJsonApiDataList
isKubeJsonApiListMetadata#
▸ Static
isKubeJsonApiListMetadata(object
): object is KubeJsonApiListMetadata
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiListMetadata
Inherited from#
WorkloadKubeObject.isKubeJsonApiListMetadata
isKubeJsonApiMetadata#
▸ Static
isKubeJsonApiMetadata(object
): object is KubeJsonApiMetadata
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is KubeJsonApiMetadata
Inherited from#
WorkloadKubeObject.isKubeJsonApiMetadata
isNonSystem#
▸ Static
isNonSystem(item
): boolean
Parameters#
Name | Type |
---|---|
item |
KubeObject <KubeObjectMetadata , any , any > | KubeJsonApiData |
Returns#
boolean
Inherited from#
WorkloadKubeObject.isNonSystem
isPartialJsonApiData#
▸ Static
isPartialJsonApiData(object
): object is Partial<KubeJsonApiData>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is Partial<KubeJsonApiData>
Inherited from#
WorkloadKubeObject.isPartialJsonApiData
isPartialJsonApiMetadata#
▸ Static
isPartialJsonApiMetadata(object
): object is Partial<KubeJsonApiMetadata>
Parameters#
Name | Type |
---|---|
object |
unknown |
Returns#
object is Partial<KubeJsonApiMetadata>
Inherited from#
WorkloadKubeObject.isPartialJsonApiMetadata
stringifyLabels#
▸ Static
stringifyLabels(labels?
): string
[]
Parameters#
Name | Type |
---|---|
labels? |
Object |
Returns#
string
[]
Inherited from#
WorkloadKubeObject.stringifyLabels