diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd2f39d..33faf510 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ CHANGELOG - Improved support for using custom program sources. [#741](https://github.com/pulumi/pulumi-kubernetes-operator/pull/741) - Improved Status logging. [#742](https://github.com/pulumi/pulumi-kubernetes-operator/pull/742) - Support for ReconcileRequest annotation. [#745](https://github.com/pulumi/pulumi-kubernetes-operator/pull/745) +- Show stack processing state in printer columns. [#747](https://github.com/pulumi/pulumi-kubernetes-operator/pull/747) ## 2.0.0-beta.1 (2024-10-18) diff --git a/deploy/crds/pulumi.com_stacks.yaml b/deploy/crds/pulumi.com_stacks.yaml index c0314460..9d6be642 100644 --- a/deploy/crds/pulumi.com_stacks.yaml +++ b/deploy/crds/pulumi.com_stacks.yaml @@ -15,11 +15,31 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp + - jsonPath: .spec.stack + name: Stack + priority: 10 + type: string + - jsonPath: .status.lastUpdate.state + name: Last Update + type: string + - jsonPath: .status.lastUpdate.lastResyncTime name: Age type: date - - jsonPath: .status.lastUpdate.state - name: State + - jsonPath: .status.lastUpdate.lastAttemptedCommit + name: Last Commit + priority: 10 + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .status.conditions[?(@.type=="Reconciling")].reason + name: Reconciling + type: string + - jsonPath: .status.conditions[?(@.type=="Stalled")].status + name: Stalled + type: string + - jsonPath: .status.lastUpdate.permalink + name: Permalink type: string name: v1 schema: diff --git a/deploy/helm/pulumi-operator/crds/pulumi.com_stacks.yaml b/deploy/helm/pulumi-operator/crds/pulumi.com_stacks.yaml index c0314460..9d6be642 100644 --- a/deploy/helm/pulumi-operator/crds/pulumi.com_stacks.yaml +++ b/deploy/helm/pulumi-operator/crds/pulumi.com_stacks.yaml @@ -15,11 +15,31 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp + - jsonPath: .spec.stack + name: Stack + priority: 10 + type: string + - jsonPath: .status.lastUpdate.state + name: Last Update + type: string + - jsonPath: .status.lastUpdate.lastResyncTime name: Age type: date - - jsonPath: .status.lastUpdate.state - name: State + - jsonPath: .status.lastUpdate.lastAttemptedCommit + name: Last Commit + priority: 10 + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .status.conditions[?(@.type=="Reconciling")].reason + name: Reconciling + type: string + - jsonPath: .status.conditions[?(@.type=="Stalled")].status + name: Stalled + type: string + - jsonPath: .status.lastUpdate.permalink + name: Permalink type: string name: v1 schema: diff --git a/deploy/yaml/install.yaml b/deploy/yaml/install.yaml index b6e8df06..b5889201 100644 --- a/deploy/yaml/install.yaml +++ b/deploy/yaml/install.yaml @@ -250,11 +250,31 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp + - jsonPath: .spec.stack + name: Stack + priority: 10 + type: string + - jsonPath: .status.lastUpdate.state + name: Last Update + type: string + - jsonPath: .status.lastUpdate.lastResyncTime name: Age type: date - - jsonPath: .status.lastUpdate.state - name: State + - jsonPath: .status.lastUpdate.lastAttemptedCommit + name: Last Commit + priority: 10 + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .status.conditions[?(@.type=="Reconciling")].reason + name: Reconciling + type: string + - jsonPath: .status.conditions[?(@.type=="Stalled")].status + name: Stalled + type: string + - jsonPath: .status.lastUpdate.permalink + name: Permalink type: string name: v1 schema: diff --git a/operator/api/pulumi/v1/stack_types.go b/operator/api/pulumi/v1/stack_types.go index 68c1f4c6..e95708d2 100644 --- a/operator/api/pulumi/v1/stack_types.go +++ b/operator/api/pulumi/v1/stack_types.go @@ -144,12 +144,17 @@ func (s *StackStatus) MarkReadyCondition() { }) } -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status // +kubebuilder:storageversion -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.lastUpdate.state" - +// +kubebuilder:printcolumn:name="Stack",priority=10,type="string",JSONPath=".spec.stack" +// +kubebuilder:printcolumn:name="Last Update",type="string",JSONPath=".status.lastUpdate.state" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".status.lastUpdate.lastResyncTime" +// +kubebuilder:printcolumn:name="Last Commit",priority=10,type="string",JSONPath=".status.lastUpdate.lastAttemptedCommit" +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +// +kubebuilder:printcolumn:name="Reconciling",type=string,JSONPath=`.status.conditions[?(@.type=="Reconciling")].reason` +// +kubebuilder:printcolumn:name="Stalled",type=string,JSONPath=`.status.conditions[?(@.type=="Stalled")].status` +// +kubebuilder:printcolumn:name="Permalink",type="string",JSONPath=".status.lastUpdate.permalink" // Stack is the Schema for the stacks API type Stack struct { metav1.TypeMeta `json:",inline"` diff --git a/operator/config/crd/bases/pulumi.com_stacks.yaml b/operator/config/crd/bases/pulumi.com_stacks.yaml index c0314460..9d6be642 100644 --- a/operator/config/crd/bases/pulumi.com_stacks.yaml +++ b/operator/config/crd/bases/pulumi.com_stacks.yaml @@ -15,11 +15,31 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp + - jsonPath: .spec.stack + name: Stack + priority: 10 + type: string + - jsonPath: .status.lastUpdate.state + name: Last Update + type: string + - jsonPath: .status.lastUpdate.lastResyncTime name: Age type: date - - jsonPath: .status.lastUpdate.state - name: State + - jsonPath: .status.lastUpdate.lastAttemptedCommit + name: Last Commit + priority: 10 + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .status.conditions[?(@.type=="Reconciling")].reason + name: Reconciling + type: string + - jsonPath: .status.conditions[?(@.type=="Stalled")].status + name: Stalled + type: string + - jsonPath: .status.lastUpdate.permalink + name: Permalink type: string name: v1 schema: