Skip to content

Commit

Permalink
Merge pull request #85 from Azure/skuznets/kubectl-get-output
Browse files Browse the repository at this point in the history
api: add printer columns for v1beta2 API
  • Loading branch information
stevekuznetsov authored Dec 27, 2024
2 parents 89178dd + c0b9831 commit d65813d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
6 changes: 6 additions & 0 deletions api/v1beta2/acrpullbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ type AcrPullBindingStatus struct {
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Server",type="string",JSONPath=".spec.acr.server",description="FQDN for the ACR.",priority=0
// +kubebuilder:printcolumn:name="Scope",type="string",JSONPath=".spec.acr.scope",description="Scope for the ACR token.",priority=1
// +kubebuilder:printcolumn:name="Target",type="string",JSONPath=".spec.serviceAccountName",description="ServiceAccount to which the pull credentials are attached.",priority=0
// +kubebuilder:printcolumn:name="Last Refresh",type="date",JSONPath=".status.lastTokenRefreshTime",description="Time the token was last refreshed.",priority=1
// +kubebuilder:printcolumn:name="Expiration",type="date",JSONPath=".status.tokenExpirationTime",description="Time the current token expires.",priority=0
// +kubebuilder:printcolumn:name="Error",type="string",JSONPath=".status.error",description="Errors encountered during token generation, if any.",priority=0

// AcrPullBinding is the Schema for the acrpullbindings API
type AcrPullBinding struct {
Expand Down
29 changes: 28 additions & 1 deletion config/helm/templates/acrpull.microsoft.com_acrpullbindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,34 @@ spec:
singular: acrpullbinding
scope: Namespaced
versions:
- name: v1beta2
- additionalPrinterColumns:
- description: FQDN for the ACR.
jsonPath: .spec.acr.server
name: Server
type: string
- description: Scope for the ACR token.
jsonPath: .spec.acr.scope
name: Scope
priority: 1
type: string
- description: ServiceAccount to which the pull credentials are attached.
jsonPath: .spec.serviceAccountName
name: Target
type: string
- description: Time the token was last refreshed.
jsonPath: .status.lastTokenRefreshTime
name: Last Refresh
priority: 1
type: date
- description: Time the current token expires.
jsonPath: .status.tokenExpirationTime
name: Expiration
type: date
- description: Errors encountered during token generation, if any.
jsonPath: .status.error
name: Error
type: string
name: v1beta2
schema:
openAPIV3Schema:
description: AcrPullBinding is the Schema for the acrpullbindings API
Expand Down

0 comments on commit d65813d

Please sign in to comment.