Skip to content

Commit

Permalink
fix: add crd printcolumns
Browse files Browse the repository at this point in the history
  • Loading branch information
kernel164 committed Sep 27, 2023
1 parent ca2e743 commit 8e4b3d7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.21.x
# note: golangci-lint caches go mod
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: v1.54.1
- name: Unit test
run: make test
3 changes: 3 additions & 0 deletions api/v1alpha1/workloadidentity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ type WorkloadIdentityStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Provider",type="string",JSONPath=".spec.provider"
//+kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id"
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

// WorkloadIdentity is the Schema for the workloadidentities API
type WorkloadIdentity struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ spec:
singular: workloadidentity
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .spec.provider
name: Provider
type: string
- jsonPath: .status.id
name: ID
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: WorkloadIdentity is the Schema for the workloadidentities API
Expand Down

0 comments on commit 8e4b3d7

Please sign in to comment.