-
Notifications
You must be signed in to change notification settings - Fork 56
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
Implement the Program API #651
Labels
Milestone
Comments
Added to epic #586 |
5 tasks
7 tasks
rquitales
added a commit
that referenced
this issue
Sep 24, 2024
### Proposed changes This PR enables a Workspace pod to fetch a Program object in a similar fashion to how it fetches Flux artifacts. We do this by exposing a HTTP server that serves tarballs of a fully formed `Pulumi.yaml` file, incorporating the requested Program spec. Unlike the approach with the Flux source-controller, I've opted **not to** create/store these tar files in local ephemeral storage in the controller pod. Instead, when the artifact URL is accessed, the file server will fetch the requested Program resource from the Kubernetes API server, and wrap it up in a `Pulumi.yaml` file and tarred. This approach ensures that the most recent Program spec is always served, and it also greatly simplifies storage since we do not need to create a local duplicate of these Program objects. Since the source of truth is always on cluster, we do not need to continuously reconcile and generate new artifacts for new generations of Programs. Should we choose to change this implementation in the future, the current strategy using the status field to convey the URL should make it easy to do so. - [x] Add status field to the Program resource to advertise a downloadable URL for the program - [x] Scaffold a program-controller to reconcile the status/URL - [x] Create a simple file server to serve the fully-formed Pulumi.yaml from a Program URL - [x] Update deployment manifests to expose the file server - [x] Additional unit tests - [x] Rebase PR to take in test changes - [x] Integrate with stack-controller ### Related issues (optional) Closes: #651
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The Program API serves as way to write an inline YAML program to be deployed via the Stack API (see docs).
We need a way to feed the program to the workspace pod, during pod initialization. A couple of possible ways:
Program
object directly from the API server. This has an RBAC implication.GitRepository
serves an artifact, and download the artifact as we do with Flux.I have a preference for (2). Note that the
Program
CRD doesn't have a status block as of yet, nor does it have a controller.For reference, here's how the
GitRepository
CR works:The text was updated successfully, but these errors were encountered: