diff --git a/api/v1beta1/common.go b/api/v1beta1/common.go index bb7df5ffb..621bd260e 100644 --- a/api/v1beta1/common.go +++ b/api/v1beta1/common.go @@ -5,6 +5,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// WARN Run `make` on all file changes + type ValueFrom struct { TargetPath string `json:"targetPath"` ValueFrom ValueFromSource `json:"valueFrom"` @@ -49,3 +51,11 @@ type CommonResource interface { AllowCrossNamespace() bool ResyncPeriodHasElapsed() bool } + +// The most recent observed state of a Grafana resource +type GrafanaCommonStatus struct { + // Results when synchonizing resource with Grafana instances + Conditions []metav1.Condition `json:"conditions,omitempty"` + // Last time the resource was synchronized with Grafana instances + LastResync metav1.Time `json:"lastResync,omitempty"` +} diff --git a/api/v1beta1/grafanaalertrulegroup_types.go b/api/v1beta1/grafanaalertrulegroup_types.go index e37d73286..da052dee3 100644 --- a/api/v1beta1/grafanaalertrulegroup_types.go +++ b/api/v1beta1/grafanaalertrulegroup_types.go @@ -117,11 +117,6 @@ type AlertQuery struct { RelativeTimeRange *models.RelativeTimeRange `json:"relativeTimeRange,omitempty"` } -// GrafanaAlertRuleGroupStatus defines the observed state of GrafanaAlertRuleGroup -type GrafanaAlertRuleGroupStatus struct { - Conditions []metav1.Condition `json:"conditions"` -} - //+kubebuilder:object:root=true //+kubebuilder:subresource:status @@ -131,8 +126,8 @@ type GrafanaAlertRuleGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec GrafanaAlertRuleGroupSpec `json:"spec,omitempty"` - Status GrafanaAlertRuleGroupStatus `json:"status,omitempty"` + Spec GrafanaAlertRuleGroupSpec `json:"spec,omitempty"` + Status GrafanaCommonStatus `json:"status,omitempty"` } // GroupName returns the name of alert rule group. diff --git a/api/v1beta1/grafanacontactpoint_types.go b/api/v1beta1/grafanacontactpoint_types.go index d6073f422..863f89315 100644 --- a/api/v1beta1/grafanacontactpoint_types.go +++ b/api/v1beta1/grafanacontactpoint_types.go @@ -49,13 +49,6 @@ type GrafanaContactPointSpec struct { Type string `json:"type,omitempty"` } -// GrafanaContactPointStatus defines the observed state of GrafanaContactPoint -type GrafanaContactPointStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file - Conditions []metav1.Condition `json:"conditions"` -} - //+kubebuilder:object:root=true //+kubebuilder:subresource:status @@ -65,8 +58,8 @@ type GrafanaContactPoint struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec GrafanaContactPointSpec `json:"spec,omitempty"` - Status GrafanaContactPointStatus `json:"status,omitempty"` + Spec GrafanaContactPointSpec `json:"spec,omitempty"` + Status GrafanaCommonStatus `json:"status,omitempty"` } //+kubebuilder:object:root=true diff --git a/api/v1beta1/grafanadashboard_types.go b/api/v1beta1/grafanadashboard_types.go index fa32993c9..9704191be 100644 --- a/api/v1beta1/grafanadashboard_types.go +++ b/api/v1beta1/grafanadashboard_types.go @@ -165,17 +165,15 @@ type GrafanaComDashboardReference struct { // GrafanaDashboardStatus defines the observed state of GrafanaDashboard type GrafanaDashboardStatus struct { + GrafanaCommonStatus `json:",inline"` + ContentCache []byte `json:"contentCache,omitempty"` ContentTimestamp metav1.Time `json:"contentTimestamp,omitempty"` ContentUrl string `json:"contentUrl,omitempty"` Hash string `json:"hash,omitempty"` // The dashboard instanceSelector can't find matching grafana instances - NoMatchingInstances bool `json:"NoMatchingInstances,omitempty"` - // Last time the dashboard was resynced - LastResync metav1.Time `json:"lastResync,omitempty"` - UID string `json:"uid,omitempty"` - - Conditions []metav1.Condition `json:"conditions,omitempty"` + NoMatchingInstances bool `json:"NoMatchingInstances,omitempty"` + UID string `json:"uid,omitempty"` } //+kubebuilder:object:root=true diff --git a/api/v1beta1/grafanadatasource_types.go b/api/v1beta1/grafanadatasource_types.go index d2e47b6f9..4ef917346 100644 --- a/api/v1beta1/grafanadatasource_types.go +++ b/api/v1beta1/grafanadatasource_types.go @@ -81,13 +81,13 @@ type GrafanaDatasourceSpec struct { // GrafanaDatasourceStatus defines the observed state of GrafanaDatasource type GrafanaDatasourceStatus struct { + GrafanaCommonStatus `json:",inline"` + Hash string `json:"hash,omitempty"` LastMessage string `json:"lastMessage,omitempty"` // The datasource instanceSelector can't find matching grafana instances - NoMatchingInstances bool `json:"NoMatchingInstances,omitempty"` - // Last time the datasource was resynced - LastResync metav1.Time `json:"lastResync,omitempty"` - UID string `json:"uid,omitempty"` + NoMatchingInstances bool `json:"NoMatchingInstances,omitempty"` + UID string `json:"uid,omitempty"` } //+kubebuilder:object:root=true diff --git a/api/v1beta1/grafanafolder_types.go b/api/v1beta1/grafanafolder_types.go index a9996f841..1688334d5 100644 --- a/api/v1beta1/grafanafolder_types.go +++ b/api/v1beta1/grafanafolder_types.go @@ -58,14 +58,11 @@ type GrafanaFolderSpec struct { // GrafanaFolderStatus defines the observed state of GrafanaFolder type GrafanaFolderStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file + GrafanaCommonStatus `json:",inline"` + Hash string `json:"hash,omitempty"` // The folder instanceSelector can't find matching grafana instances NoMatchingInstances bool `json:"NoMatchingInstances,omitempty"` - // Last time the folder was resynced - LastResync metav1.Time `json:"lastResync,omitempty"` - Conditions []metav1.Condition `json:"conditions,omitempty"` } //+kubebuilder:object:root=true diff --git a/api/v1beta1/grafananotificationpolicy_types.go b/api/v1beta1/grafananotificationpolicy_types.go index 2a11ada30..447257c1b 100644 --- a/api/v1beta1/grafananotificationpolicy_types.go +++ b/api/v1beta1/grafananotificationpolicy_types.go @@ -126,11 +126,6 @@ func (r *Route) ToModelRoute() *models.Route { return out } -// GrafanaNotificationPolicyStatus defines the observed state of GrafanaNotificationPolicy -type GrafanaNotificationPolicyStatus struct { - Conditions []metav1.Condition `json:"conditions"` -} - //+kubebuilder:object:root=true //+kubebuilder:subresource:status @@ -140,8 +135,8 @@ type GrafanaNotificationPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec GrafanaNotificationPolicySpec `json:"spec,omitempty"` - Status GrafanaNotificationPolicyStatus `json:"status,omitempty"` + Spec GrafanaNotificationPolicySpec `json:"spec,omitempty"` + Status GrafanaCommonStatus `json:"status,omitempty"` } func (np *GrafanaNotificationPolicy) NamespacedResource() string { diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index c67cc5ed4..3ec1c658c 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -503,28 +503,6 @@ func (in *GrafanaAlertRuleGroupSpec) DeepCopy() *GrafanaAlertRuleGroupSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GrafanaAlertRuleGroupStatus) DeepCopyInto(out *GrafanaAlertRuleGroupStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaAlertRuleGroupStatus. -func (in *GrafanaAlertRuleGroupStatus) DeepCopy() *GrafanaAlertRuleGroupStatus { - if in == nil { - return nil - } - out := new(GrafanaAlertRuleGroupStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaClient) DeepCopyInto(out *GrafanaClient) { *out = *in @@ -603,6 +581,29 @@ func (in *GrafanaCommonSpec) DeepCopy() *GrafanaCommonSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GrafanaCommonStatus) DeepCopyInto(out *GrafanaCommonStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.LastResync.DeepCopyInto(&out.LastResync) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaCommonStatus. +func (in *GrafanaCommonStatus) DeepCopy() *GrafanaCommonStatus { + if in == nil { + return nil + } + out := new(GrafanaCommonStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaContactPoint) DeepCopyInto(out *GrafanaContactPoint) { *out = *in @@ -690,28 +691,6 @@ func (in *GrafanaContactPointSpec) DeepCopy() *GrafanaContactPointSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GrafanaContactPointStatus) DeepCopyInto(out *GrafanaContactPointStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaContactPointStatus. -func (in *GrafanaContactPointStatus) DeepCopy() *GrafanaContactPointStatus { - if in == nil { - return nil - } - out := new(GrafanaContactPointStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaDashboard) DeepCopyInto(out *GrafanaDashboard) { *out = *in @@ -896,20 +875,13 @@ func (in *GrafanaDashboardSpec) DeepCopy() *GrafanaDashboardSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaDashboardStatus) DeepCopyInto(out *GrafanaDashboardStatus) { *out = *in + in.GrafanaCommonStatus.DeepCopyInto(&out.GrafanaCommonStatus) if in.ContentCache != nil { in, out := &in.ContentCache, &out.ContentCache *out = make([]byte, len(*in)) copy(*out, *in) } in.ContentTimestamp.DeepCopyInto(&out.ContentTimestamp) - in.LastResync.DeepCopyInto(&out.LastResync) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaDashboardStatus. @@ -1107,7 +1079,7 @@ func (in *GrafanaDatasourceSpec) DeepCopy() *GrafanaDatasourceSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaDatasourceStatus) DeepCopyInto(out *GrafanaDatasourceStatus) { *out = *in - in.LastResync.DeepCopyInto(&out.LastResync) + in.GrafanaCommonStatus.DeepCopyInto(&out.GrafanaCommonStatus) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaDatasourceStatus. @@ -1198,14 +1170,7 @@ func (in *GrafanaFolderSpec) DeepCopy() *GrafanaFolderSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaFolderStatus) DeepCopyInto(out *GrafanaFolderStatus) { *out = *in - in.LastResync.DeepCopyInto(&out.LastResync) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.GrafanaCommonStatus.DeepCopyInto(&out.GrafanaCommonStatus) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaFolderStatus. @@ -1335,28 +1300,6 @@ func (in *GrafanaNotificationPolicySpec) DeepCopy() *GrafanaNotificationPolicySp return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GrafanaNotificationPolicyStatus) DeepCopyInto(out *GrafanaNotificationPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaNotificationPolicyStatus. -func (in *GrafanaNotificationPolicyStatus) DeepCopy() *GrafanaNotificationPolicyStatus { - if in == nil { - return nil - } - out := new(GrafanaNotificationPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GrafanaPlugin) DeepCopyInto(out *GrafanaPlugin) { *out = *in diff --git a/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml b/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml index 052d70824..34a2f0d2b 100644 --- a/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml @@ -248,10 +248,10 @@ spec: rule: ((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable))) status: - description: GrafanaAlertRuleGroupStatus defines the observed state of - GrafanaAlertRuleGroup + description: The most recent observed state of a Grafana resource properties: conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -307,8 +307,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/config/crd/bases/grafana.integreatly.org_grafanacontactpoints.yaml b/config/crd/bases/grafana.integreatly.org_grafanacontactpoints.yaml index 9089d28a0..22ecf8201 100644 --- a/config/crd/bases/grafana.integreatly.org_grafanacontactpoints.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafanacontactpoints.yaml @@ -217,12 +217,10 @@ spec: rule: ((!has(oldSelf.uid) && !has(self.uid)) || (has(oldSelf.uid) && has(self.uid))) status: - description: GrafanaContactPointStatus defines the observed state of GrafanaContactPoint + description: The most recent observed state of a Grafana resource properties: conditions: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -278,8 +276,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/config/crd/bases/grafana.integreatly.org_grafanadashboards.yaml b/config/crd/bases/grafana.integreatly.org_grafanadashboards.yaml index 7286b6c4a..8822b8b88 100644 --- a/config/crd/bases/grafana.integreatly.org_grafanadashboards.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafanadashboards.yaml @@ -417,6 +417,7 @@ spec: instances type: boolean conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -483,7 +484,8 @@ spec: hash: type: string lastResync: - description: Last time the dashboard was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string uid: diff --git a/config/crd/bases/grafana.integreatly.org_grafanadatasources.yaml b/config/crd/bases/grafana.integreatly.org_grafanadatasources.yaml index 9fe26a93b..27b35ce48 100644 --- a/config/crd/bases/grafana.integreatly.org_grafanadatasources.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafanadatasources.yaml @@ -252,12 +252,70 @@ spec: description: The datasource instanceSelector can't find matching grafana instances type: boolean + conditions: + description: Results when synchonizing resource with Grafana instances + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array hash: type: string lastMessage: type: string lastResync: - description: Last time the datasource was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string uid: diff --git a/config/crd/bases/grafana.integreatly.org_grafanafolders.yaml b/config/crd/bases/grafana.integreatly.org_grafanafolders.yaml index 3cae6d726..ca4a88a15 100644 --- a/config/crd/bases/grafana.integreatly.org_grafanafolders.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafanafolders.yaml @@ -149,6 +149,7 @@ spec: instances type: boolean conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -205,12 +206,10 @@ spec: type: object type: array hash: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file type: string lastResync: - description: Last time the folder was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string type: object diff --git a/config/crd/bases/grafana.integreatly.org_grafananotificationpolicies.yaml b/config/crd/bases/grafana.integreatly.org_grafananotificationpolicies.yaml index c10fc0193..99be2d0e4 100644 --- a/config/crd/bases/grafana.integreatly.org_grafananotificationpolicies.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafananotificationpolicies.yaml @@ -192,10 +192,10 @@ spec: rule: ((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable))) status: - description: GrafanaNotificationPolicyStatus defines the observed state - of GrafanaNotificationPolicy + description: The most recent observed state of a Grafana resource properties: conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -251,8 +251,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml index 052d70824..34a2f0d2b 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml @@ -248,10 +248,10 @@ spec: rule: ((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable))) status: - description: GrafanaAlertRuleGroupStatus defines the observed state of - GrafanaAlertRuleGroup + description: The most recent observed state of a Grafana resource properties: conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -307,8 +307,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanacontactpoints.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanacontactpoints.yaml index 9089d28a0..22ecf8201 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanacontactpoints.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanacontactpoints.yaml @@ -217,12 +217,10 @@ spec: rule: ((!has(oldSelf.uid) && !has(self.uid)) || (has(oldSelf.uid) && has(self.uid))) status: - description: GrafanaContactPointStatus defines the observed state of GrafanaContactPoint + description: The most recent observed state of a Grafana resource properties: conditions: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -278,8 +276,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadashboards.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadashboards.yaml index 7286b6c4a..8822b8b88 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadashboards.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadashboards.yaml @@ -417,6 +417,7 @@ spec: instances type: boolean conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -483,7 +484,8 @@ spec: hash: type: string lastResync: - description: Last time the dashboard was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string uid: diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadatasources.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadatasources.yaml index 9fe26a93b..27b35ce48 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadatasources.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanadatasources.yaml @@ -252,12 +252,70 @@ spec: description: The datasource instanceSelector can't find matching grafana instances type: boolean + conditions: + description: Results when synchonizing resource with Grafana instances + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array hash: type: string lastMessage: type: string lastResync: - description: Last time the datasource was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string uid: diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanafolders.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanafolders.yaml index 3cae6d726..ca4a88a15 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanafolders.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanafolders.yaml @@ -149,6 +149,7 @@ spec: instances type: boolean conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -205,12 +206,10 @@ spec: type: object type: array hash: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file type: string lastResync: - description: Last time the folder was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string type: object diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafananotificationpolicies.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafananotificationpolicies.yaml index c10fc0193..99be2d0e4 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafananotificationpolicies.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafananotificationpolicies.yaml @@ -192,10 +192,10 @@ spec: rule: ((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable))) status: - description: GrafanaNotificationPolicyStatus defines the observed state - of GrafanaNotificationPolicy + description: The most recent observed state of a Grafana resource properties: conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -251,8 +251,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/deploy/kustomize/base/crds.yaml b/deploy/kustomize/base/crds.yaml index 5d29c3165..177242e55 100644 --- a/deploy/kustomize/base/crds.yaml +++ b/deploy/kustomize/base/crds.yaml @@ -247,10 +247,10 @@ spec: rule: ((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable))) status: - description: GrafanaAlertRuleGroupStatus defines the observed state of - GrafanaAlertRuleGroup + description: The most recent observed state of a Grafana resource properties: conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -306,8 +306,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true @@ -533,12 +536,10 @@ spec: rule: ((!has(oldSelf.uid) && !has(self.uid)) || (has(oldSelf.uid) && has(self.uid))) status: - description: GrafanaContactPointStatus defines the observed state of GrafanaContactPoint + description: The most recent observed state of a Grafana resource properties: conditions: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -594,8 +595,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true @@ -1021,6 +1025,7 @@ spec: instances type: boolean conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -1087,7 +1092,8 @@ spec: hash: type: string lastResync: - description: Last time the dashboard was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string uid: @@ -1352,12 +1358,70 @@ spec: description: The datasource instanceSelector can't find matching grafana instances type: boolean + conditions: + description: Results when synchonizing resource with Grafana instances + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array hash: type: string lastMessage: type: string lastResync: - description: Last time the datasource was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string uid: @@ -1519,6 +1583,7 @@ spec: instances type: boolean conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -1575,12 +1640,10 @@ spec: type: object type: array hash: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file type: string lastResync: - description: Last time the folder was resynced + description: Last time the resource was synchronized with Grafana + instances format: date-time type: string type: object @@ -1783,10 +1846,10 @@ spec: rule: ((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable))) status: - description: GrafanaNotificationPolicyStatus defines the observed state - of GrafanaNotificationPolicy + description: The most recent observed state of a Grafana resource properties: conditions: + description: Results when synchonizing resource with Grafana instances items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -1842,8 +1905,11 @@ spec: - type type: object type: array - required: - - conditions + lastResync: + description: Last time the resource was synchronized with Grafana + instances + format: date-time + type: string type: object type: object served: true diff --git a/docs/docs/api.md b/docs/docs/api.md index 679ebdb42..b77cdf249 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -77,7 +77,7 @@ GrafanaAlertRuleGroup is the Schema for the grafanaalertrulegroups API status object - GrafanaAlertRuleGroupStatus defines the observed state of GrafanaAlertRuleGroup
+ The most recent observed state of a Grafana resource
false @@ -525,7 +525,7 @@ relative time range -GrafanaAlertRuleGroupStatus defines the observed state of GrafanaAlertRuleGroup +The most recent observed state of a Grafana resource @@ -540,9 +540,18 @@ GrafanaAlertRuleGroupStatus defines the observed state of GrafanaAlertRuleGroup + + + + + - +
conditions []object + Results when synchonizing resource with Grafana instances
+
false
lastResyncstring + Last time the resource was synchronized with Grafana instances

+ Format: date-time
truefalse
@@ -672,7 +681,7 @@ GrafanaContactPoint is the Schema for the grafanacontactpoints API status object - GrafanaContactPointStatus defines the observed state of GrafanaContactPoint
+ The most recent observed state of a Grafana resource
false @@ -1024,7 +1033,7 @@ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/nam -GrafanaContactPointStatus defines the observed state of GrafanaContactPoint +The most recent observed state of a Grafana resource @@ -1039,10 +1048,18 @@ GrafanaContactPointStatus defines the observed state of GrafanaContactPoint - + + + + + +
conditions []object - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster -Important: Run "make" to regenerate code after modifying this file
+ Results when synchonizing resource with Grafana instances
truefalse
lastResyncstring + Last time the resource was synchronized with Grafana instances
+
+ Format: date-time
+
false
@@ -2103,7 +2120,7 @@ GrafanaDashboardStatus defines the observed state of GrafanaDashboard conditions []object -
+ Results when synchonizing resource with Grafana instances
false @@ -2142,7 +2159,7 @@ GrafanaDashboardStatus defines the observed state of GrafanaDashboard lastResync string - Last time the dashboard was resynced
+ Last time the resource was synchronized with Grafana instances

Format: date-time
@@ -2791,6 +2808,13 @@ GrafanaDatasourceStatus defines the observed state of GrafanaDatasource The datasource instanceSelector can't find matching grafana instances
false + + conditions + []object + + Results when synchonizing resource with Grafana instances
+ + false hash string @@ -2809,7 +2833,7 @@ GrafanaDatasourceStatus defines the observed state of GrafanaDatasource lastResync string - Last time the datasource was resynced
+ Last time the resource was synchronized with Grafana instances

Format: date-time
@@ -2824,6 +2848,83 @@ GrafanaDatasourceStatus defines the observed state of GrafanaDatasource + +### GrafanaDatasource.status.conditions[index] +[↩ Parent](#grafanadatasourcestatus) + + + +Condition contains details for one aspect of the current state of this API Resource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
lastTransitionTimestring + lastTransitionTime is the last time the condition transitioned from one status to another. +This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
+
+ Format: date-time
+
true
messagestring + message is a human readable message indicating details about the transition. +This may be an empty string.
+
true
reasonstring + reason contains a programmatic identifier indicating the reason for the condition's last transition. +Producers of specific condition types may define expected values and meanings for this field, +and whether the values are considered a guaranteed API. +The value should be a CamelCase string. +This field may not be empty.
+
true
statusenum + status of the condition, one of True, False, Unknown.
+
+ Enum: True, False, Unknown
+
true
typestring + type of condition in CamelCase or in foo.example.com/CamelCase.
+
true
observedGenerationinteger + observedGeneration represents the .metadata.generation that the condition was set based upon. +For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date +with respect to the current state of the instance.
+
+ Format: int64
+ Minimum: 0
+
false
+ ## GrafanaFolder [↩ Parent](#grafanaintegreatlyorgv1beta1 ) @@ -3074,22 +3175,21 @@ GrafanaFolderStatus defines the observed state of GrafanaFolder conditions []object -
+ Results when synchonizing resource with Grafana instances
false hash string - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster -Important: Run "make" to regenerate code after modifying this file
+
false lastResync string - Last time the folder was resynced
+ Last time the resource was synchronized with Grafana instances

Format: date-time
@@ -3223,7 +3323,7 @@ GrafanaNotificationPolicy is the Schema for the GrafanaNotificationPolicy API status object - GrafanaNotificationPolicyStatus defines the observed state of GrafanaNotificationPolicy
+ The most recent observed state of a Grafana resource
false @@ -3533,7 +3633,7 @@ Routes for alerts to match against -GrafanaNotificationPolicyStatus defines the observed state of GrafanaNotificationPolicy +The most recent observed state of a Grafana resource @@ -3548,9 +3648,18 @@ GrafanaNotificationPolicyStatus defines the observed state of GrafanaNotificatio + + + + + - +
conditions []object + Results when synchonizing resource with Grafana instances
+
false
lastResyncstring + Last time the resource was synchronized with Grafana instances

+ Format: date-time
truefalse