Skip to content

# Class: ResourceStack

Renderer.K8sApi.ResourceStack

## Table of contents

### Constructors

- constructor

### Properties

- cluster
- name

### Methods

- appendKubectlArgs
- applyResources
- deleteResources
- kubectlApplyFolder
- kubectlDeleteFolder
- renderTemplates

## Constructors

### constructor

• new ResourceStack(`cluster`, `name`)

#### Parameters

Name | Type
--- | ---
`cluster` | KubernetesCluster
`name` | `string`

## Properties

### cluster

• `Protected` cluster: KubernetesCluster

### name

• `Protected` name: `string`

## Methods

### appendKubectlArgs

▸ `Protected` appendKubectlArgs(`kubectlArgs`): `string`[]

#### Parameters

Name | Type
--- | ---
`kubectlArgs` | `string`[]

#### Returns

`string`[]

### applyResources

▸ `Protected` applyResources(`resources`, `extraArgs?`): `Promise`<string>

#### Parameters

Name | Type
--- | ---
`resources` | `string`[]
`extraArgs?` | `string`[]

#### Returns

`Promise`<string>

### deleteResources

▸ `Protected` deleteResources(`resources`, `extraArgs?`): `Promise`<string>

#### Parameters

Name | Type
--- | ---
`resources` | `string`[]
`extraArgs?` | `string`[]

#### Returns

`Promise`<string>

### kubectlApplyFolder

▸ kubectlApplyFolder(`folderPath`, `templateContext?`, `extraArgs?`): `Promise`<string>

#### Parameters

Name | Type | Description
--- | --- | ---
`folderPath` | `string` | folder path that is searched for files defining kubernetes resources.
`templateContext?` | `any` | sets the template parameters that are to be applied to any templated kubernetes resources that are to be applied.
`extraArgs?` | `string`[] | -

#### Returns

`Promise`<string>

### kubectlDeleteFolder

▸ kubectlDeleteFolder(`folderPath`, `templateContext?`, `extraArgs?`): `Promise`<string>

#### Parameters

Name | Type | Description
--- | --- | ---
`folderPath` | `string` | folder path that is searched for files defining kubernetes resources.
`templateContext?` | `any` | sets the template parameters that are to be applied to any templated kubernetes resources that are to be applied.
`extraArgs?` | `string`[] | -

#### Returns

`Promise`<string>

### renderTemplates

▸ `Protected` renderTemplates(`folderPath`, `templateContext`): `Promise`<string[]>

#### Parameters

Name | Type
--- | ---
`folderPath` | `string`
`templateContext` | `any`

#### Returns

`Promise`<string[]>