Class: StatefulSet#
Hierarchy#
WorkloadKubeObject
↳ StatefulSet
Table of contents#
Constructors#
Properties#
Accessors#
Methods#
- delete
- getAffinity
- getAffinityNumber
- getAge
- getAnnotations
- getFinalizers
- getId
- getImages
- getLabels
- getName
- getNodeSelectors
- getNs
- getOwnerRefs
- getReplicas
- getResourceVersion
- getSearchFields
- getSelectors
- getTemplateLabels
- getTimeDiffFromNow
- getTolerations
- patch
- toPlainObject
- update
- create
- isJsonApiData
- isJsonApiDataList
- isKubeJsonApiListMetadata
- isKubeJsonApiMetadata
- isNonSystem
- isPartialJsonApiData
- isPartialJsonApiMetadata
- stringifyLabels
Constructors#
constructor#
• new StatefulSet(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 |
---|---|
replicas |
number |
selector |
LabelSelector |
serviceName |
string |
template |
Object |
template.metadata |
Object |
template.metadata.labels |
Object |
template.metadata.labels.app |
string |
template.spec |
Object |
template.spec.affinity? |
IAffinity |
template.spec.containers |
{ image : string ; name : string ; ports : { containerPort : number ; name : string }[] ; volumeMounts : { mountPath : string ; name : string }[] }[] |
template.spec.nodeSelector? |
Object |
template.spec.tolerations |
{ effect : string ; key : string ; operator : string ; tolerationSeconds : number }[] |
volumeClaimTemplates |
{ metadata : { name : string } ; spec : { accessModes : string [] ; resources : { requests : { storage : string } } } }[] |
Overrides#
WorkloadKubeObject.spec
status#
• status: Object
Type declaration#
Name | Type |
---|---|
collisionCount |
number |
currentReplicas |
number |
currentRevision |
string |
observedGeneration |
number |
readyReplicas |
number |
replicas |
number |
updateRevision |
string |
Overrides#
WorkloadKubeObject.status
apiBase#
▪ Static
apiBase: string
= "/apis/apps/v1/statefulsets"
Overrides#
WorkloadKubeObject.apiBase
kind#
▪ Static
kind: string
= "StatefulSet"
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
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
getReplicas#
▸ getReplicas(): 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 <StatefulSet > |
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