Skip to content

local-env incorporating last discussion #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scott-cotton
Copy link
Member

@scott-cotton scott-cotton commented Jun 27, 2025

depends on https://github.com/signadot/libconnect/pull/105

A draft due to some UX issues and a need for a cleanup pass.

  • no more file gc
  • by default, files storage relative to ${HOME}/.signadot/sandboxes/{sandboxName}/local/files
  • addition of sources in default output, and change of format for files
export SIGNADOT_BASELINE_KIND="Deployment"              # constant
export SIGNADOT_BASELINE_NAMESPACE="hotrod-devmesh"     # fieldRef: metadata.namespace
export SIGNADOT_BASELINE_NAME="location"                # constant
export OTEL_EXPORTER_OTLP_ENDPOINT="http://jaeger:4318" # constant
export MYSQL_HOST="localhost"                           # constant (override)
export MYSQL_PORT="3306"                                # constant
export MYSQL_PASS="abc"                                 # constant
export CUSTOM="CUSTOMVAL"                               # constant (override)
export CUSTOMCF="11"                                    # configMap: hotrod-devmesh/x[key] (override)
export RES="hello-world"                                # sandboxResource: myresource/step1.out (override)
/Users/scott/.signadot/sandboxes/local-env/local/files                   #
/Users/scott/.signadot/sandboxes/local-env/local/files/CUSTOM            # constant (override)
/Users/scott/.signadot/sandboxes/local-env/local/files/CUSTOMCF          # configMap: hotrod-devmesh/x[key] (override)
/Users/scott/.signadot/sandboxes/local-env/local/files/RES_ALL           #
/Users/scott/.signadot/sandboxes/local-env/local/files/RES_ALL/step1.out # sandboxResource: myresource/step1.out (override)
/Users/scott/.signadot/sandboxes/local-env/local/files/RES_KEYED         # sandboxResource: myresource/step1.out (override)

- no more file gc
- by default, files storage relative to
  ${HOME}/.signadot/data/sandboxes/{sandboxName}/local/files
- addition of sources in default output, and change of format for files

```
export SIGNADOT_BASELINE_KIND="Deployment"              # constant
export SIGNADOT_BASELINE_NAMESPACE="hotrod-devmesh"     # fieldRef: metadata.namespace
export SIGNADOT_BASELINE_NAME="location"                # constant
export OTEL_EXPORTER_OTLP_ENDPOINT="http://jaeger:4318" # constant
export MYSQL_HOST="localhost"                           # constant (override)
export MYSQL_PORT="3306"                                # constant
export MYSQL_PASS="abc"                                 # constant
export CUSTOM="CUSTOMVAL"                               # constant (override)
export CUSTOMCF="11"                                    # configMap: hotrod-devmesh/x[key] (override)
export RES="hello-world"                                # sandboxResource: myresource/step1.out (override)
```

```
/Users/scott/.signadot/data/sandboxes/local-env/local/files                   #
/Users/scott/.signadot/data/sandboxes/local-env/local/files/CUSTOM            # constant (override)
/Users/scott/.signadot/data/sandboxes/local-env/local/files/CUSTOMCF          # configMap: hotrod-devmesh/x[key] (override)
/Users/scott/.signadot/data/sandboxes/local-env/local/files/RES_ALL           #
/Users/scott/.signadot/data/sandboxes/local-env/local/files/RES_ALL/step1.out # sandboxResource: myresource/step1.out (override)
/Users/scott/.signadot/data/sandboxes/local-env/local/files/RES_KEYED         # sandboxResource: myresource/step1.out (override)
```
@scott-cotton scott-cotton requested a review from foxish June 27, 2025 12:53
@scott-cotton
Copy link
Member Author

scott-cotton commented Jun 27, 2025

I have kept the ability to specify the output directory on the command line, because I find the central location completely unusable due to non-locality and long paths.

Also, wanted to call out what it would look like with tree-ish output:

/Users/scott/.signadot/sandboxes/local-env/local/files #
├── CUSTOM                                                  # constant (override)
├── CUSTOMCF                                                # configMap: hotrod-devmesh/x[key] (override)
├── RES_ALL                                                 #
│   └── step1.out                                           # sandboxResource: myresource/step1.out (override)
└── RES_KEYED                                               # sandboxResource: myresource/step1.out (override)

which is much more readable to me than the suggested find-like output.

@scott-cotton scott-cotton changed the title incorporating review local-env incorporating last discussion Jun 27, 2025
- remove old centrally-stored sandbox local files
- remove config file variable and just use default or -d
- move central location to
  ${HOME}/.signadot/sandboxes/{sandbox}/local/files
@foxish
Copy link
Member

foxish commented Jun 27, 2025

I have kept the ability to specify the output directory on the command line, because I find the central location completely unusable due to non-locality and long paths.

Can it default to a specified location on the config file side? I think that would help a lot as that's the mode I'd like to encourage users to do to avoid the risk of checking in files they weren't supposed to.

@foxish
Copy link
Member

foxish commented Jun 27, 2025

Ah, just saw the PR description states that - that works

@scott-cotton
Copy link
Member Author

Ah, just saw the PR description states that - that works

I also just made a change that keeps the default to the central location but removes the config file value. The config file value just adds confusion when there is a -d, and it there are constraints on config file values that look hard to future proof due to the possibility of eventually storing other things in files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants