Skip to content

Commit b9d0ebb

Browse files
committed
feat(api): add CRD categories for Alert and Provider
Add fluxcd notification categories to Alert and Provider storage-version CRDs so they appear in kubectl get fluxcd / fluxcd-notifications. Part of fluxcd/flux2#5947.
1 parent 3dbca6b commit b9d0ebb

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

api/v1beta3/alert_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ type AlertSpec struct {
8080
// +genclient
8181
// +kubebuilder:storageversion
8282
// +kubebuilder:object:root=true
83+
// +kubebuilder:resource:categories=all;fluxcd;fluxcd-notifications
8384
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
8485

8586
// Alert is the Schema for the alerts API

api/v1beta3/provider_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ type ProviderSpec struct {
170170
// +genclient
171171
// +kubebuilder:storageversion
172172
// +kubebuilder:object:root=true
173+
// +kubebuilder:resource:categories=all;fluxcd;fluxcd-notifications
173174
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
174175

175176
// Provider is the Schema for the providers API

config/crd/bases/notification.toolkit.fluxcd.io_alerts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ metadata:
88
spec:
99
group: notification.toolkit.fluxcd.io
1010
names:
11+
categories:
12+
- all
13+
- fluxcd
14+
- fluxcd-notifications
1115
kind: Alert
1216
listKind: AlertList
1317
plural: alerts

config/crd/bases/notification.toolkit.fluxcd.io_providers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ metadata:
88
spec:
99
group: notification.toolkit.fluxcd.io
1010
names:
11+
categories:
12+
- all
13+
- fluxcd
14+
- fluxcd-notifications
1115
kind: Provider
1216
listKind: ProviderList
1317
plural: providers

0 commit comments

Comments
 (0)