Class: Event
Extends
Constructors
new Event()
new Event(json: KubeEvent, cluster?: string): Event
Parameters
Parameter | Type |
---|---|
json | KubeEvent |
cluster ? | string |
Returns
Inherited from
Defined in
Properties
Property | Modifier | Type | Default value | Description | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|---|---|
_clusterName | public | string | undefined | - | - | KubeObject ._clusterName | src/lib/k8s/KubeObject.ts:29 |
jsonData | public | KubeEvent | undefined | - | - | KubeObject .jsonData | src/lib/k8s/KubeObject.ts:26 |
_internalApiEndpoint? | static | ApiWithNamespaceClient <KubeObjectInterface > | ApiClient <KubeObjectInterface > | undefined | - | - | KubeObject ._internalApiEndpoint | src/lib/k8s/KubeObject.ts:43 |
apiName | static | string | 'events' | Name of the resource, plural, used in API | KubeObject .apiName | - | src/lib/k8s/event.ts:29 |
apiVersion | static | string | 'v1' | Group and version of the resource formatted as "GROUP/VERSION", e.g. "policy.k8s.io/v1". | KubeObject .apiVersion | - | src/lib/k8s/event.ts:30 |
isNamespaced | static | boolean | true | Whether the object is namespaced. | KubeObject .isNamespaced | - | src/lib/k8s/event.ts:32 |
kind | static | string | 'Event' | The kind of the object. Corresponding to the resource kind in Kubernetes. | KubeObject .kind | - | src/lib/k8s/event.ts:28 |
readOnlyFields | static | string [] | [] | Readonly field defined as JSONPath paths | - | KubeObject .readOnlyFields | src/lib/k8s/KubeObject.ts:28 |
Accessors
cluster
get cluster(): string
set cluster(cluster: string): void
Parameters
Parameter | Type |
---|---|
cluster | string |
Returns
string
Inherited from
Defined in
count
get count(): any
Returns
any
Defined in
detailsRoute
get detailsRoute(): string
Returns
string
Inherited from
Defined in
firstOccurrence
get firstOccurrence(): any
Returns
any
Defined in
involvedObject
get involvedObject(): any
Returns
any
Defined in
involvedObjectInstance
get involvedObjectInstance(): null | KubeObject<any>
Returns
null
| KubeObject
<any
>
Defined in
isNamespaced
get isNamespaced(): boolean
Returns
boolean
Inherited from
Defined in
kind
get kind(): any
Returns
any
Inherited from
Defined in
lastOccurrence
get lastOccurrence(): any
Returns
any
Defined in
listRoute
get listRoute(): string
Returns
string
Inherited from
Defined in
message
get message(): any
Returns
any
Defined in
metadata
get metadata(): KubeMetadata
Returns
Inherited from
Defined in
pluralName
get pluralName(): string
Returns
string
Inherited from
Defined in
reason
get reason(): any
Returns
any
Defined in
source
get source(): any
Returns
any
Defined in
spec
get spec(): any
Returns
any
Defined in
status
get status(): any
Returns
any
Defined in
type
get type(): any
Returns
any
Defined in
apiEndpoint
get static apiEndpoint(): ApiWithNamespaceClient<KubeObjectInterface> | ApiClient<KubeObjectInterface>
set static apiEndpoint(endpoint: ApiWithNamespaceClient<KubeObjectInterface> | ApiClient<KubeObjectInterface>): void
Parameters
Parameter | Type |
---|---|
endpoint | ApiWithNamespaceClient <KubeObjectInterface > | ApiClient <KubeObjectInterface > |
Returns
ApiWithNamespaceClient
<KubeObjectInterface
> | ApiClient
<KubeObjectInterface
>
Inherited from
Defined in
className
get static className(): string
Returns
string
Inherited from
Defined in
detailsRoute
get static detailsRoute(): string
Returns
string
Inherited from
Defined in
listRoute
get static listRoute(): string
Returns
string
Inherited from
Defined in
maxLimit
get static maxLimit(): number
set static maxLimit(limit: number): void
Parameters
Parameter | Type |
---|---|
limit | number |
Returns
number
Defined in
pluralName
get static pluralName(): string
Returns
string
Inherited from
Defined in
Methods
_class()
_class(): typeof KubeObject
Returns
typeof KubeObject
Inherited from
Defined in
delete()
delete(): Promise<any>
Returns
Promise
<any
>
Inherited from
Defined in
getAge()
getAge(): string
Returns
string
Inherited from
Defined in
getAuthorization()
getAuthorization(verb: string, reqResourseAttrs?: AuthRequestResourceAttrs): Promise<any>
Parameters
Parameter | Type |
---|---|
verb | string |
reqResourseAttrs ? | AuthRequestResourceAttrs |
Returns
Promise
<any
>
Inherited from
Defined in
getCreationTs()
getCreationTs(): string
Returns
string
Inherited from
Defined in
getDetailsLink()
getDetailsLink(): string
Returns
string
Inherited from
Defined in
getEditableObject()
getEditableObject(): object
Returns
object
Inherited from
Defined in
getListLink()
getListLink(): string
Returns
string
Inherited from
Defined in
getName()
getName(): string
Returns
string
Inherited from
Defined in
getNamespace()
getNamespace(): undefined | string
Returns
undefined
| string
Inherited from
Defined in
getValue()
getValue(prop: string): any
Parameters
Parameter | Type |
---|---|
prop | string |
Returns
any
Inherited from
Defined in
patch()
patch(body: OpPatch[]): Promise<any>
Parameters
Parameter | Type |
---|---|
body | OpPatch [] |
Returns
Promise
<any
>
Inherited from
Defined in
scale()
scale(numReplicas: number): Promise<any>
Parameters
Parameter | Type |
---|---|
numReplicas | number |
Returns
Promise
<any
>
Inherited from
Defined in
update()
update(data: KubeObjectInterface): Promise<KubeObjectInterface>
Parameters
Parameter | Type |
---|---|
data | KubeObjectInterface |
Returns
Promise
<KubeObjectInterface
>
Inherited from
Defined in
apiGet()
static apiGet<K>(
this: (...args: any) => K & typeof KubeObject,
onGet: (...args: any) => void,
name: string,
namespace?: string,
onError?: (err: null | ApiError, cluster?: string) => void,
opts?: object): (...args: any[]) => Promise<CancelFunction>
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
onGet | (...args : any ) => void |
name | string |
namespace ? | string |
onError ? | (err : null | ApiError , cluster ?: string ) => void |
opts ? | object |
opts.cluster ? | string |
opts.queryParams ? | QueryParameters |
Returns
Function
Parameters
Parameter | Type |
---|---|
...args | any [] |
Returns
Promise
<CancelFunction
>
Inherited from
Defined in
apiList()
static apiList<K>(
this: (...args: any) => K & typeof KubeObject,
onList: (arg: K[]) => void,
onError?: (err: ApiError, cluster?: string) => void,
opts?: ApiListSingleNamespaceOptions): (...args: any[]) => Promise<CancelFunction>
Returns the API endpoint for this object.
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type | Description |
---|---|---|
this | (...args : any ) => K & typeof KubeObject | - |
onList | (arg : K []) => void | Callback function to be called when the list is retrieved. |
onError ? | (err : ApiError , cluster ?: string ) => void | Callback function to be called when an error occurs. |
opts ? | ApiListSingleNamespaceOptions | Options to be passed to the API endpoint. |
Returns
Function
The API endpoint for this object.
Parameters
Parameter | Type |
---|---|
...args | any [] |
Returns
Promise
<CancelFunction
>
Inherited from
Defined in
create()
static create<Args, T>(this: (...args: Args) => T, ...item: Args): T
Type Parameters
Type Parameter |
---|
Args extends any [] |
T extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : Args ) => T |
...item | Args |
Returns
T
Inherited from
Defined in
fetchAuthorization()
static fetchAuthorization(reqResourseAttrs?: AuthRequestResourceAttrs): Promise<any>
Performs a request to check if the user has the given permission.
Parameters
Parameter | Type |
---|---|
reqResourseAttrs ? | AuthRequestResourceAttrs |
Returns
Promise
<any
>
The result of the access request.
Inherited from
Defined in
getAuthorization()
static getAuthorization(verb: string, reqResourseAttrs?: AuthRequestResourceAttrs): Promise<any>
Parameters
Parameter | Type |
---|---|
verb | string |
reqResourseAttrs ? | AuthRequestResourceAttrs |
Returns
Promise
<any
>
Inherited from
Defined in
getBaseObject()
static getBaseObject(): Omit<KubeObjectInterface, "metadata"> & object
Returns
Omit
<KubeObjectInterface
, "metadata"
> & object
Inherited from
Defined in
getErrorMessage()
static getErrorMessage(err: null | ApiError): null | "Error: Not found" | "Error: No permissions" | "Error"
Parameters
Parameter | Type |
---|---|
err | null | ApiError |
Returns
null
| "Error: Not found"
| "Error: No permissions"
| "Error"
Inherited from
Defined in
objectEvents()
static objectEvents(object: KubeObject<any>): Promise<any>
Parameters
Parameter | Type |
---|---|
object | KubeObject <any > |
Returns
Promise
<any
>
Defined in
put()
static put(data: KubeObjectInterface): Promise<KubeObjectInterface>
Parameters
Parameter | Type |
---|---|
data | KubeObjectInterface |
Returns
Promise
<KubeObjectInterface
>
Inherited from
Defined in
useApiGet()
static useApiGet<K>(
this: (...args: any) => K & typeof KubeObject,
onGet: (item: null | K) => any,
name: string,
namespace?: string,
onError?: (err: null | ApiError, cluster?: string) => void,
opts?: object): void
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
onGet | (item : null | K ) => any |
name | string |
namespace ? | string |
onError ? | (err : null | ApiError , cluster ?: string ) => void |
opts ? | object |
opts.cluster ? | string |
opts.queryParams ? | QueryParameters |
Returns
void
Inherited from
Defined in
useApiList()
static useApiList<K>(
this: (...args: any) => K & typeof KubeObject,
onList: (...arg: any[]) => any,
onError?: (err: ApiError, cluster?: string) => void,
opts?: ApiListOptions): void
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
onList | (...arg : any []) => any |
onError ? | (err : ApiError , cluster ?: string ) => void |
opts ? | ApiListOptions |
Returns
void
Inherited from
Defined in
useGet()
static useGet<K>(
this: (...args: any) => K,
name: string,
namespace?: string,
opts?: object): [null | K, null | ApiError] & QueryResponse<K, ApiError>
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K |
name | string |
namespace ? | string |
opts ? | object |
opts.cluster ? | string |
opts.queryParams ? | QueryParameters |
Returns
[null
| K
, null
| ApiError
] & QueryResponse
<K
, ApiError
>
Inherited from
Defined in
useList()
static useList<K>(this: (...args: any) => K & typeof KubeObject, __namedParameters: object & QueryParameters): [null | K[], null | ApiError] & QueryListResponse<(undefined | null | ListResponse<K>)[], K, ApiError>
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
__namedParameters | object & QueryParameters |
Returns
[null
| K
[], null
| ApiError
] & QueryListResponse
<(undefined
| null
| ListResponse
<K
>)[], K
, ApiError
>
Inherited from
Defined in
useListForClusters()
static useListForClusters(clusterNames: string[], options: object): EventsPerCluster
Fetch events for given clusters
Important! Make sure to have the parent component have clusters as a key so that component remounts when clusters change, instead of rerendering with different number of clusters
Parameters
Parameter | Type |
---|---|
clusterNames | string [] |
options | object |
options.queryParams ? | QueryParameters |
Returns
EventsPerCluster
Defined in
useWarningList()
static useWarningList(clusters: string[], options?: object): EventsPerCluster
Fetch warning events for given clusters Amount is limited to Event.maxEventsLimit
Important! Make sure to have the parent component have clusters as a key so that component remounts when clusters change, instead of rerendering with different number of clusters
Parameters
Parameter | Type |
---|---|
clusters | string [] |
options ? | object |
options.queryParams ? | QueryParameters |
Returns
EventsPerCluster