Skip to content

Commit

Permalink
Merge pull request #1672 from Baarsgaard/master
Browse files Browse the repository at this point in the history
Move category annotation to the correct struct in GrafanaDashboard and Grafanas
  • Loading branch information
theSuess authored Sep 17, 2024
2 parents 1d51877 + 3b8fb66 commit 51ca705
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/grafana_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ type OperatorReconcileVars struct {
}

// GrafanaSpec defines the desired state of Grafana
// +kubebuilder:resource:categories={grafana-operator}
type GrafanaSpec struct {
// +kubebuilder:pruning:PreserveUnknownFields
// Config defines how your grafana ini file should looks like.
Expand Down Expand Up @@ -144,6 +143,7 @@ type GrafanaStatus struct {
// +kubebuilder:printcolumn:name="Stage",type="string",JSONPath=".status.stage",description=""
// +kubebuilder:printcolumn:name="Stage status",type="string",JSONPath=".status.stageStatus",description=""
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
// +kubebuilder:resource:categories={grafana-operator}
type Grafana struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/grafanadashboard_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ type GrafanaDashboardUrlAuthorization struct {
// GrafanaDashboardSpec defines the desired state of GrafanaDashboard
// +kubebuilder:validation:XValidation:rule="(has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef) && !(has(self.folderUID))) || !(has(self.folderRef) && (has(self.folderUID)))", message="Only one of folderUID or folderRef can be declared at the same time"
// +kubebuilder:validation:XValidation:rule="(has(self.folder) && !(has(self.folderRef) || has(self.folderUID))) || !(has(self.folder))", message="folder field cannot be set when folderUID or folderRef is already declared"
// +kubebuilder:resource:categories={grafana-operator}
type GrafanaDashboardSpec struct {
// dashboard json
// +optional
Expand Down Expand Up @@ -195,6 +194,7 @@ type GrafanaDashboardStatus struct {
// +kubebuilder:printcolumn:name="No matching instances",type="boolean",JSONPath=".status.NoMatchingInstances",description=""
// +kubebuilder:printcolumn:name="Last resync",type="date",format="date-time",JSONPath=".status.lastResync",description=""
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
// +kubebuilder:resource:categories={grafana-operator}
type GrafanaDashboard struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: grafana.integreatly.org
names:
categories:
- grafana-operator
kind: GrafanaDashboard
listKind: GrafanaDashboardList
plural: grafanadashboards
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/grafana.integreatly.org_grafanas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: grafana.integreatly.org
names:
categories:
- grafana-operator
kind: Grafana
listKind: GrafanaList
plural: grafanas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: grafana.integreatly.org
names:
categories:
- grafana-operator
kind: GrafanaDashboard
listKind: GrafanaDashboardList
plural: grafanadashboards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: grafana.integreatly.org
names:
categories:
- grafana-operator
kind: Grafana
listKind: GrafanaList
plural: grafanas
Expand Down
4 changes: 4 additions & 0 deletions deploy/kustomize/base/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ metadata:
spec:
group: grafana.integreatly.org
names:
categories:
- grafana-operator
kind: GrafanaDashboard
listKind: GrafanaDashboardList
plural: grafanadashboards
Expand Down Expand Up @@ -1781,6 +1783,8 @@ metadata:
spec:
group: grafana.integreatly.org
names:
categories:
- grafana-operator
kind: Grafana
listKind: GrafanaList
plural: grafanas
Expand Down

0 comments on commit 51ca705

Please sign in to comment.