Skip to content

Commit a48fb43

Browse files
kloud-botbdsoha
authored andcommitted
πŸ”„ Sync updated workspace manifests (#123)
1 parent c86e79b commit a48fb43

9 files changed

Lines changed: 72 additions & 48 deletions

File tree

β€Ž.vitepress/data/dependencies.yamlβ€Ž

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,6 @@ dependencies:
311311
package: helm/helm
312312
version: 4.1.1
313313

314-
helm-diff:
315-
cmd: helm diff version
316-
datasource: github-releases
317-
group: Docker & Kubernetes
318-
home: https://github.com/databus23/helm-diff
319-
license: Apache 2
320-
package: databus23/helm-diff
321-
version: 3.15.0
322-
track: false
323-
324314
htop:
325315
cmd: htop --version
326316
datasource: deb
@@ -711,7 +701,7 @@ dependencies:
711701
home: https://github.com/kloudkit/ws-cli
712702
license: MIT
713703
package: github.com/kloudkit/ws-cli
714-
version: 0.0.48
704+
version: 0.0.49
715705

716706
yamllint:
717707
cmd: yamllint --version

β€Ž.vitepress/data/env.reference.yamlβ€Ž

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ envs:
181181
additional_vs_extensions_dir:
182182
type: string
183183
default: null
184+
deprecated: 0.2.0
184185
reference: /editor/extensions
185186
example: /additional-extensions
186187
description: Installs `.vsix` file found in this directory.
@@ -452,10 +453,10 @@ envs:
452453
453454
vault:
454455
type: string
455-
default: null
456-
example: /workspace/.ws/vault.yaml
456+
default: ~/.ws/vault/secrets.yaml
457+
example: /custom/path/vault/secrets.yaml
457458
since: 0.1.1
458-
description: Path to the secrets vault file.
459+
description: Path to the secrets vault manifest file.
459460
longDescription: |
460461
A YAML file containing encrypted secrets that can be decrypted and
461462
deployed to various destinations during startup.
@@ -533,6 +534,7 @@ envs:
533534
When `true`, the autoloader stops at the first failing startup
534535
or entrypoint and the container startup exits non-zero.
535536
537+
536538
terminal:
537539
properties:
538540
prompt_hide_docker_context:
@@ -687,6 +689,11 @@ deprecated:
687689
since: 0.0.20
688690
removed: 0.1.0
689691

692+
WS_EDITOR_ADDITIONAL_VS_EXTENSIONS_DIR:
693+
since: 0.2.0
694+
removed: 0.3.0
695+
message: place .vsix files in `~/.ws/extensions/` instead
696+
690697
WS_EXTRA_CA_CERT_ENDPOINTS:
691698
use: WS_CA_ADDITIONAL_CERT_ENDPOINTS
692699
since: 0.0.20

β€Ž.vitepress/data/envs.data.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface EnvVar {
1212
description: string
1313
longDescription?: string
1414
since?: string
15+
deprecated?: string
1516
key: string
1617
md: {
1718
description: string

β€Ž.vitepress/theme/components/EnvVarSection.vueβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const anchor = computed(() => env.value.key.toLowerCase().replaceAll('_', '-'))
1212
<template>
1313
<h3 :id="anchor" class="header">
1414
<code>{{ env.key }}</code>
15+
<Badge v-if="env.deprecated" type="warning" text="Deprecated" />
1516

1617
<a class="header-anchor" :href="`#${anchor}`" :aria-label="`Permalink to &quot;${env.key}&quot;`"></a>
1718
</h3>
@@ -33,6 +34,11 @@ const anchor = computed(() => env.value.key.toLowerCase().replaceAll('_', '-'))
3334
<dt>Since</dt>
3435
<dd><Badge type="info" :text="`v${env.since}`" /></dd>
3536
</template>
37+
38+
<template v-if="env.deprecated">
39+
<dt>Deprecated</dt>
40+
<dd><Badge type="warning" :text="`v${env.deprecated}`" /></dd>
41+
</template>
3642
</dl>
3743

3844
<div v-if="env.example" v-html="env.md.example" />

β€Ždocs/editor/extensions.mdβ€Ž

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,26 @@ To gain the most from all the new features and upgrades, we suggest using the
3232

3333
### Install at Boot
3434

35-
Upon startup, Kloud Workspace evaluates several environment variables to automate the
36-
installation of additional *user-defined* VSCode extensions.
37-
Both options below can be used in unison:
35+
Upon startup, Kloud Workspace automatically scans `~/.ws/extensions/` for `.vsix` files
36+
and installs them.
3837

39-
- <EnvVar group="editor" name="additional_vs_extensions" />
40-
- <EnvVar group="editor" name="additional_vs_extensions_dir" />
38+
You can also install additional extensions by marketplace ID:
4139

42-
::: code-group
40+
- <EnvVar group="editor" name="additional_vs_extensions" />
4341

44-
```sh{2} [list]
42+
```sh{2}
4543
docker run \
4644
-e WS_EDITOR_ADDITIONAL_VS_EXTENSIONS="dbaeumer.vscode-eslint esbenp.prettier-vscode" \
4745
ghcr.io/kloudkit/workspace:v0.1.2
4846
```
4947

50-
```sh{2,3} [directory]
51-
docker run \
52-
-e WS_EDITOR_ADDITIONAL_VS_EXTENSIONS_DIR=/additional-extensions \
53-
-v /path/to/my-additional-extensions:/additional-extensions \
54-
ghcr.io/kloudkit/workspace:v0.1.2
55-
```
48+
::: warning DEPRECATED β€” `WS_EDITOR_ADDITIONAL_VS_EXTENSIONS_DIR`
49+
50+
`WS_EDITOR_ADDITIONAL_VS_EXTENSIONS_DIR` is deprecated since `v0.2.0` and will be removed
51+
in `v0.3.0`.
52+
53+
Place your `.vsix` files directly in `~/.ws/extensions/` instead, no environment
54+
variable required.
5655

5756
:::
5857

β€Ždocs/editor/features.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@ For more information, visit our [contribution guide](/contribute/).
163163
| `continue` | cn CLI and continue extension | | |
164164
| `cpp` | C++ and related tools | | βœ… |
165165
| `dagger` | dagger.io CLI and SDK | | |
166-
| `doctl` | DigitalOcean CLI | *v0.1.3* | βœ… |
166+
| `doctl` | DigitalOcean CLI | *v0.1.3* | |
167167
| `dotnet` | .NET framework and related extensions | | βœ… |
168168
| `gcloud` | Google Cloud CLI for GCP | | βœ… |
169169
| `gh` | GitHub CLI | | βœ… |
170+
| `helm-extras` | Helm plugins and related extensions | *v0.1.3* | βœ… |
170171
| `jf` | JFrog CLI | | βœ… |
171172
| `jupyter` | Jupyter packages and related extensions | | |
172173
| `opencode` | OpenCode CLI and related extension | *v0.1.1* | |

β€Ždocs/settings/autoload-scripts.mdβ€Ž

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,16 @@ Startup scripts are defined at two levels:
2929
On startup, the predefined entrypoint scripts stored in `/usr/libexec/workspace/startup.d/*`
3030
are executed in lexicographical order to initialize the workspace environment.
3131

32-
To add additional functionality during startup, mount your scripts to `/entrypoint/*`.
32+
To add additional functionality during startup, place executable scripts in
33+
`~/.ws/startup.d/` *(i.e. `/home/kloud/.ws/startup.d`)*.
34+
The directories are created automatically on startup.
35+
3336
These scripts are executed as follows:
3437

3538
- Only scripts with an executable file permission *(i.e. `+x`)* are considered.
3639
- Executed in lexicographical order.
3740
- Scripts are executed as the `kloud` user.
3841

39-
```sh{2}
40-
docker run \
41-
-v /my-entrypoint-scripts:/entrypoint \
42-
ghcr.io/kloudkit/workspace:v0.1.2
43-
```
44-
4542
### Available Languages
4643

4744
Feel free to write you entrypoint scripts in the language of your choice, considering it
@@ -67,10 +64,13 @@ Refer to the specific [documentation for `ws-cli`](/tools/ws-cli) for more detai
6764

6865
Similar to entrypoint scripts, the workspace will load startup scripts for every new shell
6966
session.
70-
On shell startup, the predefined scripts stored in `/usr/lib/ohmyzsh/custom/*` are executed in
71-
lexicographical order.
67+
On shell startup, the predefined scripts stored in `/usr/lib/ohmyzsh/custom/*` are executed
68+
in lexicographical order.
69+
70+
To add additional functionality during startup, place `.zsh` files in
71+
`~/.ws/session.d/` *(i.e. `/home/kloud/.ws/session.d`)*.
72+
The directories are created automatically on startup.
7273

73-
To add additional functionality during startup, mount your scripts to `~/.session/*.zsh`.
7474
These scripts are executed as follows:
7575

7676
- Both executable and not executable scripts are considered.

β€Ždocs/settings/secrets.mdβ€Ž

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,22 @@ ws secrets vault --input vault.yaml --key database-password --master .master.key
155155
ws secrets vault --input vault.yaml --stdout --master .master.key
156156
```
157157

158-
Vault location can be set via environment variable:
158+
### Autoloading
159+
160+
At startup the workspace automatically processes `~/.ws/vault/secrets.yaml` when it exists.
161+
Place your vault manifest and any referenced encrypted files together in that directory:
162+
163+
```text
164+
~/.ws/vault/
165+
β”œβ”€β”€ secrets.yaml # vault manifest
166+
β”œβ”€β”€ db-password.enc # encrypted file referenced via file:
167+
└── ssh-key.enc
168+
```
169+
170+
To use a different location, set `WS_SECRETS_VAULT`:
159171

160172
```sh
161-
export WS_SECRETS_VAULT=/workspace/vault.yaml
173+
export WS_SECRETS_VAULT=/custom/path/vault/secrets.yaml
162174
ws secrets vault
163175
```
164176

@@ -192,7 +204,7 @@ See [authentication documentation](/editor/authentication) for details.
192204

193205
### Vault Specific Flags
194206

195-
- **`--input <file>`:** Vault file path *(or set `WS_SECRETS_VAULT`)*.
207+
- **`--input <file>`:** Vault file path *(defaults to `~/.ws/vault/secrets.yaml`; override with `WS_SECRETS_VAULT`)*.
196208
- **`--key <name>`:** Process specific secret *(repeatable)*.
197209
- **`--stdout`:** Inspect without writing.
198210

β€Žscripts/generate-deprecated-variables.mjsβ€Ž

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ import fs from 'node:fs'
22
import { resolve } from 'node:path'
33
import { load } from 'js-yaml'
44

5+
const replacement = (use, message) => {
6+
if (use) {
7+
const anchor = use
8+
.toLowerCase()
9+
.replace(/[^a-z0-9]+/g, '-')
10+
.replace(/^-|-$|--+/g, '')
11+
12+
return `[\`${use}\`](#${anchor})`
13+
}
14+
15+
return message ? `*${message}*` : 'β€”'
16+
}
17+
518
const configs = load(
619
fs.readFileSync(resolve('.vitepress/data/env.reference.yaml'), 'utf8')
720
)
@@ -16,15 +29,10 @@ sections.push(
1629
Object.keys(configs.deprecated)
1730
.sort()
1831
.forEach(env => {
19-
const { use, since, removed } = configs.deprecated[env]
20-
21-
const anchor = use
22-
.toLowerCase()
23-
.replace(/[^a-z0-9]+/g, '-')
24-
.replace(/^-|-$|--+/g, '')
32+
const { use, since, removed, message } = configs.deprecated[env]
2533

2634
sections.push(
27-
`| ~~*\`${env}\`*~~ | [\`${use}\`](#${anchor}) | *v${since}* | *v${removed}* |`
35+
`| ~~*\`${env}\`*~~ | ${replacement(use, message)} | *v${since}* | *v${removed}* |`
2836
)
2937
})
3038

0 commit comments

Comments
Β (0)