Globals / "src/common/kube-helpers"
Module: "src/common/kube-helpers"#
Index#
Variables#
Functions#
- dumpConfigYaml
- getNodeWarningConditions
- loadConfig
- podHasIssues
- resolveTilde
- splitConfig
- validateConfig
- validateKubeConfig
Variables#
kubeConfigDefaultPath#
• Const kubeConfigDefaultPath: string = path.join(os.homedir(), '.kube', 'config')
Defined in src/common/kube-helpers.ts:10
Functions#
dumpConfigYaml#
▸ dumpConfigYaml(kubeConfig: Partial\
Defined in src/common/kube-helpers.ts:76
Parameters:
| Name | Type |
|---|---|
kubeConfig |
Partial\ |
Returns: string
getNodeWarningConditions#
▸ getNodeWarningConditions(node: V1Node): V1NodeCondition[]
Defined in src/common/kube-helpers.ts:140
Parameters:
| Name | Type |
|---|---|
node |
V1Node |
Returns: V1NodeCondition[]
loadConfig#
▸ loadConfig(pathOrContent?: string): KubeConfig
Defined in src/common/kube-helpers.ts:19
Parameters:
| Name | Type |
|---|---|
pathOrContent? |
string |
Returns: KubeConfig
podHasIssues#
▸ podHasIssues(pod: V1Pod): boolean
Defined in src/common/kube-helpers.ts:127
Parameters:
| Name | Type |
|---|---|
pod |
V1Pod |
Returns: boolean
resolveTilde#
▸ resolveTilde(filePath: string): string
Defined in src/common/kube-helpers.ts:12
Parameters:
| Name | Type |
|---|---|
filePath |
string |
Returns: string
splitConfig#
▸ splitConfig(kubeConfig: KubeConfig): KubeConfig[]
Defined in src/common/kube-helpers.ts:59
Breaks kube config into several configs. Each context as it own KubeConfig object
Parameters:
| Name | Type |
|---|---|
kubeConfig |
KubeConfig |
Returns: KubeConfig[]
validateConfig#
▸ validateConfig(config: KubeConfig | string): KubeConfig
Defined in src/common/kube-helpers.ts:38
KubeConfig is valid when there's at least one of each defined: - User - Cluster - Context
Parameters:
| Name | Type | Description |
|---|---|---|
config |
KubeConfig | string | KubeConfig to check |
Returns: KubeConfig
validateKubeConfig#
▸ validateKubeConfig(config: KubeConfig): void
Defined in src/common/kube-helpers.ts:150
Validates kubeconfig supplied in the add clusters screen. At present this will just validate the User struct, specifically the command passed to the exec substructure.
Parameters:
| Name | Type |
|---|---|
config |
KubeConfig |
Returns: void