Skip to content

Commit

Permalink
Register the API resources into the "pulumi" kubectl category (#765)
Browse files Browse the repository at this point in the history
<!--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.
-->

Adds the PKO API resources to a "pulumi" category for convenience:

```
❯ kubectl get pulumi
NAME                                                         WORKSPACE                 PROGRESSING   FAILED   COMPLETE   URL      
update.auto.pulumi.com/kubernetes-py-guestbook-1936f1e00d3   kubernetes-py-guestbook   False         False    True       https://app.pulumi.com/eron-pulumi-corp/kubernetes-py-guestbook/kubernetes-py-guestbook/updates/118
update.auto.pulumi.com/kubernetes-py-guestbook-1936f31172a   kubernetes-py-guestbook   False         False    True       https://app.pulumi.com/eron-pulumi-corp/kubernetes-py-guestbook/kubernetes-py-guestbook/updates/119
update.auto.pulumi.com/kubernetes-py-guestbook-1936fefd0de   kubernetes-py-guestbook   False         False    True       https://app.pulumi.com/eron-pulumi-corp/kubernetes-py-guestbook/kubernetes-py-guestbook/updates/120

NAME                                                IMAGE                           READY   ADDRESS
workspace.auto.pulumi.com/kubernetes-py-guestbook   pulumi/pulumi:3.134.1-nonroot   True    kubernetes-py-guestbook-workspace.default:50051

NAME                             AGE   URL
program.pulumi.com/random-yaml   70m   http://pulumi-kubernetes-operator.pulumi-kubernetes-operator:80/programs/default/random-yaml

NAME                                       LAST UPDATE   AGE   READY   RECONCILING   STALLED   PERMALINK
stack.pulumi.com/kubernetes-py-guestbook   succeeded     75m   True                            https://app.pulumi.com/eron-pulumi-corp/kubernetes-py-guestbook/kubernetes-py-guestbook/updates/120

```

### 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 #758
  • Loading branch information
EronWright authored Nov 28, 2024
1 parent b648f73 commit 92416e3
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CHANGELOG
- Stack Controller: watch for delete events. [#756](https://github.com/pulumi/pulumi-kubernetes-operator/pull/756)
- Stack Controller: fix an issue where new commits weren't detected when using git sources. https://github.com/pulumi/pulumi-kubernetes-operator/issues/762
- Ensure cleanup of Stack in foreground deletion. [#760](https://github.com/pulumi/pulumi-kubernetes-operator/pull/760)
- Register API resources into the "pulumi" category [#765](https://github.com/pulumi/pulumi-kubernetes-operator/pull/765)

## 2.0.0-beta.2 (2024-11-11)

Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/auto.pulumi.com_updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Update
listKind: UpdateList
plural: updates
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/auto.pulumi.com_workspaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Workspace
listKind: WorkspaceList
plural: workspaces
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/pulumi.com_programs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Program
listKind: ProgramList
plural: programs
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/pulumi.com_stacks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Stack
listKind: StackList
plural: stacks
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/pulumi-operator/crds/auto.pulumi.com_updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Update
listKind: UpdateList
plural: updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Workspace
listKind: WorkspaceList
plural: workspaces
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/pulumi-operator/crds/pulumi.com_programs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Program
listKind: ProgramList
plural: programs
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/pulumi-operator/crds/pulumi.com_stacks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Stack
listKind: StackList
plural: stacks
Expand Down
8 changes: 8 additions & 0 deletions deploy/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Program
listKind: ProgramList
plural: programs
Expand Down Expand Up @@ -243,6 +245,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Stack
listKind: StackList
plural: stacks
Expand Down Expand Up @@ -19330,6 +19334,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Update
listKind: UpdateList
plural: updates
Expand Down Expand Up @@ -19555,6 +19561,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Workspace
listKind: WorkspaceList
plural: workspaces
Expand Down
1 change: 1 addition & 0 deletions operator/api/auto/v1alpha1/update_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ type UpdateStatus struct {
}

//+kubebuilder:object:root=true
//+kubebuilder:resource:categories=pulumi
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Workspace",type=string,JSONPath=`.spec.workspaceName`
//+kubebuilder:printcolumn:name="Type",type=string,priority=10,JSONPath=`.spec.type`
Expand Down
1 change: 1 addition & 0 deletions operator/api/auto/v1alpha1/workspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ type WorkspaceStatus struct {

//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:resource:categories=pulumi
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image`
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
Expand Down
1 change: 1 addition & 0 deletions operator/api/pulumi/v1/program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ type ProgramStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:resource:categories=pulumi
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.artifact.url"
Expand Down
1 change: 1 addition & 0 deletions operator/api/pulumi/v1/stack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func (s *StackStatus) MarkReadyCondition() {
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=pulumi
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Stack",priority=10,type="string",JSONPath=".spec.stack"
Expand Down
1 change: 1 addition & 0 deletions operator/api/pulumi/v1alpha1/stack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

//+kubebuilder:object:root=true
//+kubebuilder:resource:categories=pulumi
//+kubebuilder:subresource:status

// Stack is the Schema for the stacks API.
Expand Down
2 changes: 2 additions & 0 deletions operator/config/crd/bases/auto.pulumi.com_updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Update
listKind: UpdateList
plural: updates
Expand Down
2 changes: 2 additions & 0 deletions operator/config/crd/bases/auto.pulumi.com_workspaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: auto.pulumi.com
names:
categories:
- pulumi
kind: Workspace
listKind: WorkspaceList
plural: workspaces
Expand Down
2 changes: 2 additions & 0 deletions operator/config/crd/bases/pulumi.com_programs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Program
listKind: ProgramList
plural: programs
Expand Down
2 changes: 2 additions & 0 deletions operator/config/crd/bases/pulumi.com_stacks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: pulumi.com
names:
categories:
- pulumi
kind: Stack
listKind: StackList
plural: stacks
Expand Down

0 comments on commit 92416e3

Please sign in to comment.