Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 53f9540

Browse files
Merge pull request #2333 from ibuildthecloud/main
Add secret update and secret create --replace/--update
2 parents 117e72e + 4c9bf68 commit 53f9540

21 files changed

+197
-27
lines changed

docs/docs/100-reference/01-command-line/acorn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ acorn [flags]
3434
* [acorn credential](acorn_credential.md) - Manage registry credentials
3535
* [acorn dashboard](acorn_dashboard.md) - Open the web dashboard for the project
3636
* [acorn dev](acorn_dev.md) - Run an app from an image or Acornfile in dev mode or attach a dev session to a currently running app
37-
* [acorn edit](acorn_edit.md) - Edits an acorn or secret
37+
* [acorn edit](acorn_edit.md) - Edits an acorn or secret interactively
3838
* [acorn events](acorn_events.md) - List events about Acorn resources
3939
* [acorn exec](acorn_exec.md) - Run a command in a container
4040
* [acorn fmt](acorn_fmt.md) - Format an Acornfile

docs/docs/100-reference/01-command-line/acorn_dev.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ acorn dev --name wandering-sound --clone [acorn args]
3131
--clone Clone the vcs repository and infer the build context for the given app allowing for local development
3232
--compute-class strings Set computeclass for a workload in the format of workload=computeclass. Specify a single computeclass to set all workloads. (ex foo=example-class or example-class)
3333
-e, --env strings Environment variables to set on running containers
34+
--env-file string Default env vars to apply (default ".acorn.env")
3435
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
3536
-h, --help help for dev
3637
--interval string If configured for auto-upgrade, this is the time interval at which to check for new releases (ex: 1h, 5m)

docs/docs/100-reference/01-command-line/acorn_edit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "acorn edit"
33
---
44
## acorn edit
55

6-
Edits an acorn or secret
6+
Edits an acorn or secret interactively
77

88
```
99
acorn edit ACORN_NAME|SECRET_NAME [flags]

docs/docs/100-reference/01-command-line/acorn_run.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Volume Syntax
7070
--dangerous Automatically approve all privileges requested by the application
7171
-i, --dev Enable interactive dev mode: build image, stream logs/status in the foreground and stop on exit
7272
-e, --env strings Environment variables to set on running containers
73+
--env-file string Default env vars to apply (default ".acorn.env")
7374
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
7475
-h, --help help for run
7576
--interval string If configured for auto-upgrade, this is the time interval at which to check for new releases (ex: 1h, 5m)

docs/docs/100-reference/01-command-line/acorn_secret.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ acorn secret
3838

3939
* [acorn](acorn.md) -
4040
* [acorn secret create](acorn_secret_create.md) - Create a secret
41-
* [acorn secret edit](acorn_secret_edit.md) - Edits a secret
41+
* [acorn secret edit](acorn_secret_edit.md) - Edits a secret interactively
4242
* [acorn secret encrypt](acorn_secret_encrypt.md) - Encrypt string information with clusters public key
4343
* [acorn secret reveal](acorn_secret_reveal.md) - Manage secrets
4444
* [acorn secret rm](acorn_secret_rm.md) - Delete a secret
45+
* [acorn secret update](acorn_secret_update.md) - Update a secret
4546

docs/docs/100-reference/01-command-line/acorn_secret_create.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ acorn secret create [flags] SECRET_NAME
1616
# Create secret with specific keys
1717
acorn secret create --data key-name=value --data key-name2=value2 my-secret
1818
19-
# Read full secret from a file
19+
# Read full secret from a file. The file should have a type and data field.
2020
acorn secret create --file secret.yaml my-secret
2121
2222
# Read key value from a file
@@ -27,9 +27,11 @@ acorn secret create --data @key-name=secret.yaml my-secret
2727

2828
```
2929
--data strings Secret data format key=value or @key=filename to read from file
30-
--file string File to read for entire secret in cue/yaml/json format
30+
--file string File to read for entire secret in aml/yaml/json format
3131
-h, --help help for create
32+
--replace Replace the secret with only defined values, resetting undefined fields to default values
3233
--type string Secret type
34+
-u, --update Update the secret if it already exists
3335
```
3436

3537
### Options inherited from parent commands

docs/docs/100-reference/01-command-line/acorn_secret_edit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "acorn secret edit"
33
---
44
## acorn secret edit
55

6-
Edits a secret
6+
Edits a secret interactively
77

88
```
99
acorn secret edit SECRET_NAME [flags]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "acorn secret update"
3+
---
4+
## acorn secret update
5+
6+
Update a secret
7+
8+
```
9+
acorn secret update [flags] SECRET_NAME
10+
```
11+
12+
### Examples
13+
14+
```
15+
16+
# Create secret with specific keys
17+
acorn secret update --data key-name=value --data key-name2=value2 my-secret
18+
19+
# Read full secret from a file. The file should have a type and data field.
20+
acorn secret update --file secret.yaml my-secret
21+
22+
# Read key value from a file
23+
acorn secret update --data @key-name=secret.yaml my-secret
24+
```
25+
26+
### Options
27+
28+
```
29+
--data strings Secret data format key=value or @key=filename to read from file
30+
--file string File to read for entire secret in aml/yaml/json format
31+
-h, --help help for update
32+
--type string Secret type
33+
```
34+
35+
### Options inherited from parent commands
36+
37+
```
38+
--config-file string Path of the acorn config file to use
39+
--debug Enable debug logging
40+
--debug-level int Debug log level (valid 0-9) (default 7)
41+
--kubeconfig string Explicitly use kubeconfig file, overriding the default context
42+
-o, --output string Output format (json, yaml, {{gotemplate}})
43+
-j, --project string Project to work in
44+
-q, --quiet Output only names
45+
```
46+
47+
### SEE ALSO
48+
49+
* [acorn secret](acorn_secret.md) - Manage secrets
50+

docs/docs/100-reference/01-command-line/acorn_update.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ acorn update [flags] ACORN_NAME [deploy flags]
3333
--confirm-upgrade When an auto-upgrade app is marked as having an upgrade available, pass this flag to confirm the upgrade. Used in conjunction with --notify-upgrade.
3434
--dangerous Automatically approve all privileges requested by the application
3535
-e, --env strings Environment variables to set on running containers
36+
--env-file string Default env vars to apply to update command
3637
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
3738
-h, --help help for update
3839
--image string Acorn image name

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ replace (
1212
require (
1313
cuelang.org/go v0.6.0
1414
github.com/AlecAivazis/survey/v2 v2.3.6
15-
github.com/acorn-io/aml v0.0.0-20231115002431-c08b165964de
15+
github.com/acorn-io/aml v0.0.0-20231115044900-37e80122de99
1616
github.com/acorn-io/aml/cli v0.0.0-20231113171943-4844e2f3e1a2
1717
github.com/acorn-io/aml/legacy v0.0.0-20230929081514-1e9f3394432e
1818
github.com/acorn-io/baaah v0.0.0-20231009165317-af2b68361b8a

0 commit comments

Comments
 (0)