Kui API Documentation - v11.0.0 / @kui-shell/plugin-kubectl
- InvolvedObject
- Job
- KubeContext
- KubeItems
- KubeOptions
- KubeStatus
- KubeStatusCondition
- Pod
- PodLikeSpec
- PodList
- Resource
- Secret
- WithRawData
- WithSummary
- computeDurations
- describer
- doCreate
- doDelete
- doExecRaw
- doExecWithMarkdown
- doExecWithPty
- doExecWithRadioTable
- doExecWithStatus
- doExecWithStdout
- doExecWithStdoutViaPty
- doExecWithTable
- doGet
- doHelp
- doNativeExec
- doRun
- emitKubectlConfigChangeEvent
- fetchFileString
- flags
- formatTable
- fqn
- fqnOf
- getAllContexts
- getAsMMRTransformer
- getCommandFromArgs
- getContainer
- getCurrentContext
- getCurrentContextName
- getCurrentDefaultContextName
- getCurrentDefaultNamespace
- getKind
- getLabel
- getLabelForArgv
- getNamespace
- getNamespaceForArgv
- getPodsCommand
- getTabState
- getTransformer
- getter
- hasLabel
- isCrudableKubeResource
- isDeployment
- isForAllNamespaces
- isHelpRequest
- isJob
- isKubeItems
- isKubeItemsOfKind
- isKubeResource
- isPod
- isPodList
- isSecret
- isTableRequest
- isUsage
- isWatchRequest
- offKubectlConfigChangeEvents
- onKubectlConfigChangeEvents
- parseName
- preprocessTable
- registerApplySubcommands
- registerConfig
- registerEdit
- stringToTable
- watchRequestFrom
- withHelp
- withKubeconfigFrom
- withNamespaceBreadcrumb
Ƭ Deployment: Deployment1
| Deployment2
plugins/plugin-kubectl/src/lib/model/resource.ts:421
Ƭ KubePartial<R
>: Omit
<R
, "apiVersion"
| "kind"
>
Name | Type |
---|---|
R |
extends KubeResource = KubeResource |
plugins/plugin-kubectl/src/lib/model/resource.ts:544
Ƭ KubeResource<Status
, Metadata
>: ResourceWithMetadata
& WithRawData
& { apiVersion
: string
; isKubeResource
: true
; isSimulacrum?
: boolean
; kind
: string
; metadata?
: Metadata
; originatingCommand
: Arguments
<KubeOptions
> ; spec?
: any
; status?
: Status
}
The basic Kubernetes resource
Name | Type |
---|---|
Status |
KubeStatus |
Metadata |
KubeMetadata |
plugins/plugin-kubectl/src/lib/model/resource.ts:194
Ƭ KubeResourceWithSummary<Status
>: KubeResource
<Status
> & WithSummary
KubeResourceWithSummary
allows plugins to provide their own
Summary. Otherwise lib/views/modes/summary will try to fetch one
automatically.
Name | Type |
---|---|
Status |
KubeStatus |
plugins/plugin-kubectl/src/lib/model/resource.ts:238
• apiVersion: "github.com/kui-shell/plugin-kubectl/v1alpha1"
• kubectl: string
• logsMode: "logs"
• Parser: Object
memory and cpu parsing
Name | Type |
---|---|
cpuFraction |
(str : string ) => number |
cpuShare |
(str : string ) => number |
formatAsBytes |
(mem : number ) => string |
formatAsCpu |
(cpu : number ) => string |
fractionOfMemory |
(num : string , denom : string ) => string |
memShare |
(str : string ) => number |
reformatAsBytes |
(mem : string ) => string |
plugins/plugin-kubectl/src/lib/util/parse.ts:144
• defaultFlags: CommandOptions
plugins/plugin-kubectl/src/controller/kubectl/flags.ts:66
▸ computeDurations<T
>(table
): T
Turn START and END columns into a DURATION column.
TODO Kubectl gurus: Is there a way to get this directly from a jsonpath or go-template? I think so from the latter?
Name | Type |
---|---|
T |
extends Table <Row > | KResponse <any > |
Name | Type |
---|---|
table |
T |
T
plugins/plugin-kubectl/src/lib/view/formatTable.ts:515
▸ describer(registrar
, command
, cli?
): void
Register a command listener
Name | Type | Default value |
---|---|---|
registrar |
CommandRegistrar |
undefined |
command |
string |
undefined |
cli |
string |
command |
void
plugins/plugin-kubectl/src/controller/kubectl/describe.ts:48
▸ Const
doCreate(verb
, command?
): (args
: EvaluatorArgs
<KubeOptions
>) => Promise
<string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[]>
Name | Type | Default value |
---|---|---|
verb |
"create" | "apply" |
undefined |
command |
string |
'kubectl' |
fn
▸ (args
): Promise
<string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[]>
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
Promise
<string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[]>
plugins/plugin-kubectl/src/controller/kubectl/create.ts:34
▸ Const
doDelete(command?
): (args
: EvaluatorArgs
<KubeOptions
>) => Promise
<string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[]>
Name | Type | Default value |
---|---|---|
command |
string |
'kubectl' |
fn
▸ (args
): Promise
<string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[]>
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
Promise
<string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[]>
plugins/plugin-kubectl/src/controller/kubectl/delete.ts:41
▸ doExecRaw(command
, parsedOptions
, execOptions
): Promise
<string
>
A convenience wrapper over doNativeExec
that extracts only
stdout, and discards the exit code and stderr.
Name | Type |
---|---|
command |
string |
parsedOptions |
KubeOptions |
execOptions |
ExecOptions |
Promise
<string
>
plugins/plugin-kubectl/src/controller/kubectl/raw.ts:165
▸ doExecWithMarkdown(args
, exec?
): Promise
<NavResponse
>
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
exec? |
string |
Promise
<NavResponse
>
plugins/plugin-kubectl/src/controller/kubectl/exec-to-markdown.ts:24
▸ doExecWithPty<Content
, Response
, O
>(args
, prepare?
, exec?
): Promise
<string
| Response
>
Execute the given command using a pty
Name | Type |
---|---|
Content |
void |
Response |
extends KResponse <Content > = KResponse <Content > |
O |
extends KubeOptions = KubeOptions |
Name | Type | Default value |
---|---|---|
args |
EvaluatorArgs <O > |
undefined |
prepare |
Prepare <O > |
NoPrepare |
exec? |
string |
undefined |
Promise
<string
| Response
>
plugins/plugin-kubectl/src/controller/kubectl/exec.ts:108
▸ doExecWithRadioTable<Resource
>(resources
, defaultSelectedIdx
, onSelect
, __namedParameters?
): Promise
<RadioTable
| void
>
Name | Type |
---|---|
Resource |
extends MetadataBearing <void , Resource > & WithRawData <void , Resource > & { apiVersion : string ; isKubeResource : true ; isSimulacrum? : boolean ; kind : string ; metadata? : KubeMetadata ; originatingCommand : EvaluatorArgs <KubeOptions > ; spec? : any ; status? : KubeStatus } |
Name | Type |
---|---|
resources |
Resource [] |
defaultSelectedIdx |
number |
onSelect |
(name : string , resource : Resource ) => string |
__namedParameters |
Object |
__namedParameters.nameColumnTitle |
string |
__namedParameters.title |
string |
Promise
<RadioTable
| void
>
plugins/plugin-kubectl/src/controller/kubectl/exec.ts:283
▸ Const
doExecWithStatus<O
>(verb
, finalState
, command?
, prepareForExec?
, prepareForStatus?
): (args
: EvaluatorArgs
<O
>) => Promise
<KubeTableResponse
>
Execute a command, and then execute the status command which will poll until the given FinalState is reached.
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type | Default value |
---|---|---|
verb |
string |
undefined |
finalState |
FinalState |
undefined |
command |
string |
'kubectl' |
prepareForExec |
Prepare <O > |
NoPrepare |
prepareForStatus |
PrepareForStatus <O > |
DefaultPrepareForStatus |
fn
▸ (args
): Promise
<KubeTableResponse
>
Name | Type |
---|---|
args |
EvaluatorArgs <O > |
Promise
<KubeTableResponse
>
plugins/plugin-kubectl/src/controller/kubectl/exec.ts:260
▸ doExecWithStdout<O
>(args
, prepare?
, exec?
): Promise
<string
>
Behaves as does exec
, except that it projects out just the
stdout
part -- thus ignoring the exit code
and stderr
.
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type | Default value |
---|---|---|
args |
EvaluatorArgs <O > |
undefined |
prepare |
Prepare <O > |
NoPrepare |
exec? |
string |
undefined |
Promise
<string
>
plugins/plugin-kubectl/src/controller/kubectl/exec.ts:85
▸ doExecWithStdoutViaPty<O
>(args
, prepare?
): Promise
<string
>
Execute the given command using a pty, but return a string
Name | Type |
---|---|
O |
extends KubeOptions = KubeOptions |
Name | Type | Default value |
---|---|---|
args |
EvaluatorArgs <O > |
undefined |
prepare |
Prepare <O > |
NoPrepare |
Promise
<string
>
plugins/plugin-kubectl/src/controller/kubectl/exec.ts:159
▸ doExecWithTable<O
>(args
, prepare?
, command?
, __namedParameters?
): Promise
<Table
| MixedResponse
>
Behaves as does exec
, except that it projects out just the
stdout
part and parses it into a Table model.
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type | Default value |
---|---|---|
args |
EvaluatorArgs <O > |
undefined |
prepare |
Prepare <O > |
NoPrepare |
command |
string |
'kubectl' |
__namedParameters |
Object |
{} |
__namedParameters.entityType? |
string |
undefined |
__namedParameters.nameColumn? |
string |
undefined |
__namedParameters.usePty? |
boolean |
undefined |
__namedParameters.verb? |
string |
undefined |
Promise
<Table
| MixedResponse
>
plugins/plugin-kubectl/src/controller/kubectl/exec.ts:224
▸ Const
doGet(command
): (args
: EvaluatorArgs
<KubeOptions
>) => Promise
<KResponse
<any
>>
This is the main handler for kubectl get
. Here, we act as a
dispatcher: in kubectl
a get
can mean either get-as-table,
get-as-entity, or get-as-custom, depending on the -o
flag.
Name | Type |
---|---|
command |
string |
fn
▸ (args
): Promise
<KResponse
<any
>>
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
Promise
<KResponse
<any
>>
plugins/plugin-kubectl/src/controller/kubectl/get.ts:331
▸ doHelp<O
>(command
, args
, prepare?
): Promise
<KResponse
>
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type | Default value |
---|---|---|
command |
string |
undefined |
args |
EvaluatorArgs <O > |
undefined |
prepare |
Prepare <O > |
NoPrepare |
Promise
<KResponse
>
plugins/plugin-kubectl/src/lib/util/help.ts:467
▸ doNativeExec(args
): Promise
<RawResponse
>
Name | Type |
---|---|
args |
Args |
Promise
<RawResponse
>
plugins/plugin-kubectl/src/controller/kubectl/raw.ts:136
▸ Const
doRun(command?
): (args
: EvaluatorArgs
<KubeOptions
>) => Promise
<KResponse
<any
>>
Name | Type | Default value |
---|---|---|
command |
string |
'kubectl' |
fn
▸ (args
): Promise
<KResponse
<any
>>
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
Promise
<KResponse
<any
>>
plugins/plugin-kubectl/src/controller/kubectl/run.ts:40
▸ emitKubectlConfigChangeEvent(type
, namespace?
, context?
): void
Name | Type |
---|---|
type |
"SetNamespaceOrContext" | "CreateOrDeleteNamespace" |
namespace? |
string |
context? |
string |
void
plugins/plugin-kubectl/src/controller/kubectl/config.ts:39
▸ fetchFileString(args
, url
, headers?
): Promise
<(void
| string
)[]>
same as fetchFile, but returning a string rather than a Buffer
Name | Type |
---|---|
args |
ContextArgs |
url |
string |
headers? |
Record <string , string > |
Promise
<(void
| string
)[]>
plugins/plugin-kubectl/src/lib/util/fetch-file.ts:292
▸ flags(booleans?
): CommandOptions
Name | Type | Default value |
---|---|---|
booleans |
string [] |
[] |
CommandOptions
plugins/plugin-kubectl/src/controller/kubectl/flags.ts:44
▸ Const
formatTable<O
>(command
, verb
, entityTypeFromCommandLine
, args
, preTable
, nameColumn?
): Promise
<Table
<Row
>>
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type | Default value |
---|---|---|
command |
string |
undefined |
verb |
string |
undefined |
entityTypeFromCommandLine |
string |
undefined |
args |
EvaluatorArgs <O > |
undefined |
preTable |
Pair [][] |
undefined |
nameColumn |
string |
'NAME' |
Promise
<Table
<Row
>>
plugins/plugin-kubectl/src/lib/view/formatTable.ts:212
▸ fqn(apiVersion
, kind
, name
, namespace
): string
Name | Type |
---|---|
apiVersion |
string |
kind |
string |
name |
string |
namespace |
string |
string
plugins/plugin-kubectl/src/controller/kubectl/fqn.ts:93
▸ fqnOf(resource
): string
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
string
plugins/plugin-kubectl/src/controller/kubectl/fqn.ts:101
▸ getAllContexts(__namedParameters
): Promise
<KubeContext
[]>
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.REPL |
default |
Promise
<KubeContext
[]>
a list of KubeContext
for all known contexts
plugins/plugin-kubectl/src/controller/kubectl/contexts.ts:68
▸ getAsMMRTransformer(args
, resource
): Promise
<MultiModalResponse
<KubeResource
>>
kubectl get
as entity response
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
resource |
KubeResource <KubeStatus , KubeMetadata > |
Promise
<MultiModalResponse
<KubeResource
>>
plugins/plugin-kubectl/src/controller/kubectl/get.ts:183
▸ Const
getCommandFromArgs(args
): string
Name | Type |
---|---|
args |
Pick <EvaluatorArgs <ParsedOptions >, "argvNoOptions" > |
string
plugins/plugin-kubectl/src/lib/util/util.ts:115
▸ getContainer(args
, verb
): string
e.g. for kubectl logs
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
verb |
string |
string
plugins/plugin-kubectl/src/controller/kubectl/options.ts:229
▸ getCurrentContext(__namedParameters
): Promise
<KubeContext
>
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.REPL |
default |
Promise
<KubeContext
>
a KubeContext
representing the current context
plugins/plugin-kubectl/src/controller/kubectl/contexts.ts:56
▸ getCurrentContextName(__namedParameters
): Promise
<string
>
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.REPL |
default |
Promise
<string
>
plugins/plugin-kubectl/src/controller/kubectl/contexts.ts:72
▸ getCurrentDefaultContextName(__namedParameters
): string
| Promise
<string
>
Name | Type |
---|---|
__namedParameters |
ContextArgs |
string
| Promise
<string
>
the relevant context for the given args/command line
plugins/plugin-kubectl/src/controller/kubectl/contexts.ts:105
▸ getCurrentDefaultNamespace(args
): Promise
<string
>
Name | Type |
---|---|
args |
ContextArgs |
Promise
<string
>
the relevant namespace for the given args/command line
plugins/plugin-kubectl/src/controller/kubectl/contexts.ts:128
▸ getKind(command
, args
, kindAsProvidedByUser
): Promise
<string
>
Name | Type | Description |
---|---|---|
command |
string |
- |
args |
EvaluatorArgs <ParsedOptions > |
- |
kindAsProvidedByUser |
string |
e.g. pod or po |
Promise
<string
>
e.g. Pod
plugins/plugin-kubectl/src/controller/kubectl/explain.ts:329
▸ getLabel(__namedParameters
): string
Name | Type |
---|---|
__namedParameters |
Pick <EvaluatorArgs <KubeOptions >, "parsedOptions" > |
string
plugins/plugin-kubectl/src/controller/kubectl/options.ts:144
▸ getLabelForArgv(args
): string
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
string
plugins/plugin-kubectl/src/controller/kubectl/options.ts:169
▸ getNamespace(args
): Promise
<string
>
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
Promise
<string
>
the namespace as expressed in the command line, or the default from context
plugins/plugin-kubectl/src/controller/kubectl/options.ts:206
▸ getNamespaceForArgv(args
): string
A variant of getNamespace where you only want to use what was provided by the user in their command line.
Name | Type |
---|---|
args |
Pick <EvaluatorArgs <KubeOptions >, "parsedOptions" > |
string
plugins/plugin-kubectl/src/controller/kubectl/options.ts:214
▸ getPodsCommand(resource
, args?
): string
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
args? |
Pick <EvaluatorArgs <ParsedOptions >, "argvNoOptions" > |
string
plugins/plugin-kubectl/src/lib/view/modes/pods.ts:25
▸ getTabState(tab
, key
): any
Name | Type |
---|---|
tab |
default |
key |
string |
any
plugins/plugin-kubectl/src/tab-state.ts:27
▸ getTransformer(args
, response
): Promise
<ReturnType
<typeof getAsMMRTransformer
> | Table
>
KubeResource -> MultiModalResponse view transformer
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
response |
KResponse <any > |
Promise
<ReturnType
<typeof getAsMMRTransformer
> | Table
>
plugins/plugin-kubectl/src/controller/kubectl/get.ts:402
▸ getter(registrar
, command
, cli?
): void
Register a command listener
Name | Type | Default value |
---|---|---|
registrar |
CommandRegistrar |
undefined |
command |
string |
undefined |
cli |
string |
command |
void
plugins/plugin-kubectl/src/controller/kubectl/get.ts:465
▸ hasLabel(args
): boolean
Due to deficiencies in yargs-parser (used by @kui-shell/core), the form -lapp=name (i.e. without a whitespace after the -l) is not parsed properly.
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
boolean
plugins/plugin-kubectl/src/controller/kubectl/options.ts:183
▸ isCrudableKubeResource(entity
): entity is KubeResource<KubeStatus, KubeMetadata>
is the command response a kube resource that can responds to "kubectl delete", etc.?
Name | Type |
---|---|
entity |
MetadataBearing <void > |
entity is KubeResource<KubeStatus, KubeMetadata>
plugins/plugin-kubectl/src/lib/model/resource.ts:530
▸ isDeployment(resource
): resource is Deployment
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
resource is Deployment
whether the given resource is an instance of a Deployment
plugins/plugin-kubectl/src/lib/model/resource.ts:427
▸ isForAllNamespaces(parsedOptions
): boolean
Name | Type |
---|---|
parsedOptions |
KubeOptions |
boolean
plugins/plugin-kubectl/src/controller/kubectl/options.ts:317
▸ isHelpRequest(args
): boolean
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
boolean
plugins/plugin-kubectl/src/controller/kubectl/options.ts:112
▸ isJob(resource
): resource is Job
Name | Type |
---|---|
resource |
Pick <KubeResource <KubeStatus , KubeMetadata >, "apiVersion" | "kind" > |
resource is Job
whether the given resource is an instance of a Deploymemt
plugins/plugin-kubectl/src/lib/model/resource.ts:399
▸ isKubeItems(resource
): resource is KubeItems<KubeResource<KubeStatus, KubeMetadata>>
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
resource is KubeItems<KubeResource<KubeStatus, KubeMetadata>>
plugins/plugin-kubectl/src/lib/model/resource.ts:552
▸ isKubeItemsOfKind<Item
>(resource
, isOfKind
): resource is KubeItems<Item>
Name | Type |
---|---|
Item |
extends MetadataBearing <void , Item > & WithRawData <void , Item > & { apiVersion : string ; isKubeResource : true ; isSimulacrum? : boolean ; kind : string ; metadata? : KubeMetadata ; originatingCommand : EvaluatorArgs <KubeOptions > ; spec? : any ; status? : KubeStatus } = KubeResource <KubeStatus , KubeMetadata > |
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
isOfKind |
(item : KubeResource <KubeStatus , KubeMetadata >) => item is Item |
resource is KubeItems<Item>
plugins/plugin-kubectl/src/lib/model/resource.ts:560
▸ isKubeResource(entity
): entity is KubeResource<KubeStatus, KubeMetadata>
is the command response a Kubernetes resource? note: excluding any ones we simulate in kubeui
Name | Type |
---|---|
entity |
MetadataBearing <void > | KResponse <any > |
entity is KubeResource<KubeStatus, KubeMetadata>
plugins/plugin-kubectl/src/lib/model/resource.ts:214
▸ isPod(resource
): resource is Pod
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
resource is Pod
whether the given resource is an instance of a Pod
plugins/plugin-kubectl/src/lib/model/resource.ts:335
▸ isPodList(resource
): resource is PodList
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
resource is PodList
plugins/plugin-kubectl/src/lib/model/resource.ts:556
▸ isSecret(resource
): resource is Secret<Record<string, any>>
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
resource is Secret<Record<string, any>>
plugins/plugin-kubectl/src/lib/model/resource.ts:760
▸ isTableRequest(args
): boolean
Name | Type |
---|---|
args |
Pick <EvaluatorArgs <KubeOptions >, "parsedOptions" > |
boolean
plugins/plugin-kubectl/src/controller/kubectl/options.ts:118
▸ Const
isUsage(args
): boolean
Name | Type |
---|---|
args |
EvaluatorArgs <KubeOptions > |
boolean
plugins/plugin-kubectl/src/lib/util/help.ts:465
▸ isWatchRequest(args
): boolean
Name | Type |
---|---|
args |
Pick <EvaluatorArgs <KubeOptions >, "parsedOptions" > |
boolean
plugins/plugin-kubectl/src/controller/kubectl/options.ts:122
▸ offKubectlConfigChangeEvents(handler
): void
Name | Type |
---|---|
handler |
Handler |
void
plugins/plugin-kubectl/src/controller/kubectl/config.ts:55
▸ onKubectlConfigChangeEvents(handler
): void
Name | Type |
---|---|
handler |
Handler |
void
plugins/plugin-kubectl/src/controller/kubectl/config.ts:51
▸ parseName(resource
): { app
: string
; name
: string
; nameHash
: string
; version
: string
} | { app
: undefined
; name
: string
; nameHash
: string
; version
: string
} | { app
: undefined
; name
: undefined
; nameHash
: undefined
; version
: undefined
}
Separate the app and generated parts of a resource name
Name | Type |
---|---|
resource |
KubeResource <KubeStatus , KubeMetadata > |
{ app
: string
; name
: string
; nameHash
: string
; version
: string
} | { app
: undefined
; name
: string
; nameHash
: string
; version
: string
} | { app
: undefined
; name
: undefined
; nameHash
: undefined
; version
: undefined
}
plugins/plugin-kubectl/src/lib/util/name.ts:23
▸ Const
preprocessTable(raw
): Pair
[][][]
Find the column splits
Name | Type |
---|---|
raw |
string [] |
Pair
[][][]
plugins/plugin-kubectl/src/lib/view/formatTable.ts:147
▸ registerApplySubcommands(registrar
, cmd
): void
Name | Type |
---|---|
registrar |
CommandRegistrar |
cmd |
string |
void
plugins/plugin-kubectl/src/controller/kubectl/apply-subcommands.ts:108
▸ registerConfig(registrar
, cmd
): void
Name | Type |
---|---|
registrar |
CommandRegistrar |
cmd |
string |
void
plugins/plugin-kubectl/src/controller/kubectl/config.ts:101
▸ registerEdit(registrar
, cmd
): void
Name | Type |
---|---|
registrar |
CommandRegistrar |
cmd |
string |
void
plugins/plugin-kubectl/src/controller/kubectl/edit.ts:279
▸ Const
stringToTable<O
>(decodedResult
, stderr
, args
, command?
, verb?
, entityType?
, nameColumn?
): Promise
<KubeTableResponse
>
Display the given string as a REPL table
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type |
---|---|
decodedResult |
string |
stderr |
string |
args |
EvaluatorArgs <O > |
command? |
string |
verb? |
string |
entityType? |
string |
nameColumn? |
string |
Promise
<KubeTableResponse
>
plugins/plugin-kubectl/src/lib/view/formatTable.ts:461
▸ watchRequestFrom(args
, forceWatch?
): ""
| "--watch"
| "-w"
| "--watch-only"
Name | Type | Default value |
---|---|---|
args |
EvaluatorArgs <KubeOptions > |
undefined |
forceWatch |
boolean |
false |
""
| "--watch"
| "-w"
| "--watch-only"
plugins/plugin-kubectl/src/controller/kubectl/options.ts:126
▸ withHelp<O
>(args
): string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> & Partial
<WithSourceReferences
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[] | Promise
<KResponse
<any
>>
Wrap the given command handler this
with a help dispatcher.
Name | Type |
---|---|
O |
extends KubeOptions |
Name | Type |
---|---|
args |
EvaluatorArgs <O > |
string
| number
| boolean
| HTMLElement
| Error
| MarkdownResponse
| ReactResponse
| MixedResponse
| CommentaryResponse
| TabLayoutModificationResponse
<NewSplitRequest
> | XtermResponse
| RandomErrorResponse1
| RandomErrorResponse2
| Table
<Row
> & Partial
<WithSourceReferences
> | AbortableResponse
<ScalarResponse
<Row
>> | NavResponse
| RadioTable
| UsageModel
| MetadataBearing
<any
> | RawResponse
<any
> | MetadataBearing
<any
>[] | Promise
<KResponse
<any
>>
plugins/plugin-kubectl/src/lib/util/help.ts:487
▸ withKubeconfigFrom(args
, cmdline
): string
Copy over any kubeconfig/context/cluster/namespace specifications from the given args
Name | Type |
---|---|
args |
Pick <EvaluatorArgs <KubeOptions >, "parsedOptions" > |
cmdline |
string |
string
plugins/plugin-kubectl/src/controller/kubectl/options.ts:322
▸ withNamespaceBreadcrumb(ns
, table
): MixedResponse
| Table
<Row
>
Change the namespace breadcrumb of the given maybe-Table
Name | Type |
---|---|
ns |
string |
table |
MixedResponse | Table <Row > |
MixedResponse
| Table
<Row
>