Skip to content
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

Support for ESC environments in the Stack custom resource #814

Open
ringods opened this issue Feb 12, 2025 · 3 comments
Open

Support for ESC environments in the Stack custom resource #814

ringods opened this issue Feb 12, 2025 · 3 comments
Labels
good-first-issue Start here if you'd like to start contributing to Pulumi kind/enhancement Improvements or new features

Comments

@ringods
Copy link
Member

ringods commented Feb 12, 2025

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

A normal stack config file can contain two top level entries:

config:
   <ns>:<key>: <value>
environment:
  - <name-of-esc-environment>
  - <name-of-other-esc-environment>

The current custom resource definition for Stack contains a property config that you can use to configure stack config values. But all usages of the word environment in the CRD yaml file refer to environment variables. As far as I can see from the CRD, there is no option to configure the list of ESC enviroments to use for the stack.

Affected area/feature

PKO Stack CRD

@ringods ringods added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Feb 12, 2025
@EronWright
Copy link
Contributor

This looks to be pretty straightforward. The autoapi appears to have support for adding environment(s) to a stack (see code).

@EronWright EronWright removed the needs-triage Needs attention from the triage team label Feb 12, 2025
@ringods
Copy link
Member Author

ringods commented Feb 12, 2025

Worth adding this before PKO 2.0 GA!

@EronWright EronWright added the good-first-issue Start here if you'd like to start contributing to Pulumi label Feb 12, 2025
@EronWright
Copy link
Contributor

EronWright commented Feb 12, 2025

Regarding the Stack API, I think the recommendation of adding an environment array aligns well with how one does it at the stack configuration level (see docs). Interesting that it isn't pluralized (environments).

environment:
  - <your-project-name>/<your-environment-name>

We should decide on how this input should merge with a source-controlled stack configuration. I believe that configuration values are generally merged into the source-controlled configuration, and I would advocate for doing the same here. But in what order? There would be new agent-level API needed to take the environment spec.

Another mentionable is that the workspace should be replaced whenever environment is updated, as is the case with config values. The underlying reason is to have a hermetic environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Start here if you'd like to start contributing to Pulumi kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants