Skip to content

Commit affdaa3

Browse files
committed
Add additional shortNames for ImageRepository and ImagePolicy
Adds multiple shortName aliases for better user experience: - ImageRepository: imgrepo, imagerepo, ir - ImagePolicy: imgpol, imagepol, ip This provides users with more flexibility in choosing their preferred shorthand when using kubectl commands. Note: 'ip' conflicts with existing endpoints shortName but is included for completeness as requested. Signed-off-by: cappyzawa <[email protected]>
1 parent aacfab3 commit affdaa3

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

api/v1beta2/imagepolicy_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (in *ImagePolicy) SetConditions(conditions []metav1.Condition) {
205205
// +kubebuilder:storageversion
206206
// +kubebuilder:object:root=true
207207
// +kubebuilder:subresource:status
208-
// +kubebuilder:resource:shortName=imgpol
208+
// +kubebuilder:resource:shortName=imgpol;imagepol;ip
209209
// +kubebuilder:printcolumn:name="LatestImage",type=string,JSONPath=`.status.latestImage`
210210

211211
// ImagePolicy is the Schema for the imagepolicies API

api/v1beta2/imagerepository_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func (in ImageRepository) GetRequeueAfter() time.Duration {
197197
// +kubebuilder:storageversion
198198
// +kubebuilder:object:root=true
199199
// +kubebuilder:subresource:status
200-
// +kubebuilder:resource:shortName=imgrepo
200+
// +kubebuilder:resource:shortName=imgrepo;imagerepo;ir
201201
// +kubebuilder:printcolumn:name="Last scan",type=string,JSONPath=`.status.lastScanResult.scanTime`
202202
// +kubebuilder:printcolumn:name="Tags",type=string,JSONPath=`.status.lastScanResult.tagCount`
203203

config/crd/bases/image.toolkit.fluxcd.io_imagepolicies.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ spec:
1313
plural: imagepolicies
1414
shortNames:
1515
- imgpol
16+
- imagepol
17+
- ip
1618
singular: imagepolicy
1719
scope: Namespaced
1820
versions:

config/crd/bases/image.toolkit.fluxcd.io_imagerepositories.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ spec:
1313
plural: imagerepositories
1414
shortNames:
1515
- imgrepo
16+
- imagerepo
17+
- ir
1618
singular: imagerepository
1719
scope: Namespaced
1820
versions:

0 commit comments

Comments
 (0)