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

Develop the workspace API and controller #619

Closed
EronWright opened this issue Jul 24, 2024 · 2 comments
Closed

Develop the workspace API and controller #619

EronWright opened this issue Jul 24, 2024 · 2 comments
Assignees

Comments

@EronWright
Copy link
Contributor

Implementation task for the Workspace API, per design doc.

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Jul 24, 2024
@cleverguy25
Copy link

Added to epic #586

@EronWright
Copy link
Contributor Author

The workspace controller is functionally complete, what's remaining is some test code and a good readme.

EronWright added a commit that referenced this issue Sep 6, 2024
<!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md)
    for Pulumi's contribution guidelines.

    Help us merge your changes more quickly by adding more details such
    as labels, milestones, and reviewers.-->

### Proposed changes

<!--Give us a brief description of what you've done and what it solves.
-->
This PR implements the `auto.pulumi.com` API Group, including the
`Workspace` and `Update` types.

Integration tests for the workspace controller are included.  

### Example
```yaml
apiVersion: auto.pulumi.com/v1alpha1
kind: Workspace
metadata:
  name: random-yaml-1e2fc47
spec:
  image: pulumi/pulumi:3.128.0-nonroot
  securityProfile: restricted  
  serviceAccountName: default
  git:
    url: https://github.com/pulumi/examples.git
    revision: 1e2fc471709448f3c9f7a250f28f1eafcde7017b
    dir: random-yaml
  env:
  - name: PULUMI_ACCESS_TOKEN
    valueFrom:
      secretKeyRef:
        name: pulumi-api-secret
        key: accessToken
  resources:
    requests:
      cpu: 1
      memory: 512Mi
    limits:
      cpu: 1
      memory: 512Mi

  # various extension points shown here.
  # - custom pod labels
  # - pod tolerations
  # - extra init container(s)
  # - extra volume(s) and volume mounts onto the 'pulumi' container
  podTemplate:
    metadata:
      labels:
        example.com/mylabel: bar
    spec:
      terminationGracePeriodSeconds: 3600
      tolerations:
        - key: "example.com/foo"
          operator: "Exists"
          effect: "NoSchedule"
      initContainers:
      - name: extra
        image: busybox
        command: ["sh", "-c", "echo 'Hello, extra init container!'"]
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            add:
            - NET_BIND_SERVICE
            drop:
            - ALL
        volumeMounts:
          - name: share
            mountPath: /share
      containers:
      - name: pulumi
        volumeMounts:
          - name: secret-volume
            mountPath: /etc/secret-volume
            readOnly: true
      volumes:
        - name: secret-volume
          secret:
            secretName: test-secret
```

### Specific Changes

- (agent) git source support
- (operator) scaffolding
- (operator) workspace api and controller and tests
- (operator) update api and controller
- (experimental) configuration block in `Environment` spec 
- (experimental) dockerfile for non-root pu/pu

### Related issues (optional)

<!--Refer to related PRs or issues: #1234, or 'Fixes #1234' or 'Closes
#1234'.
Or link to full URLs to issues or pull requests in other GitHub
repositories. -->

Closes #619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: In Progress
Development

No branches or pull requests

3 participants