Skip to content

Commit

Permalink
Merge branch 'alertmanager-config' into alertmanager-config-helm
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte authored Dec 10, 2024
2 parents 11abd5f + dd4872a commit ed829e1
Show file tree
Hide file tree
Showing 14 changed files with 647 additions and 33 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.10.0] - 2024-12-10

### Added

- Add Mimir Alertmanager datasource
- Add Mimir Alertmanager datasource.
- Add tenant ids field to the grafana organization CR to be able to support multiple tenants into one organization.

### Changed

- Removed organization OwnerReference on grafana-user-values configmap, this fixes an issue where the configmap is removed when the last organization is deleted which prevent Grafana from starting.

### Fixed

- Fix grafana organization deletion

## [0.9.1] - 2024-11-21

### Fixed
Expand Down Expand Up @@ -181,7 +188,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initialize project and create heartbeat for the installation.

[Unreleased]: https://github.com/giantswarm/observability-operator/compare/v0.9.1...HEAD
[Unreleased]: https://github.com/giantswarm/observability-operator/compare/v0.10.0...HEAD
[0.10.0]: https://github.com/giantswarm/observability-operator/compare/v0.9.1...v0.10.0
[0.9.1]: https://github.com/giantswarm/observability-operator/compare/v0.9.0...v0.9.1
[0.9.0]: https://github.com/giantswarm/observability-operator/compare/v0.8.1...v0.9.0
[0.8.1]: https://github.com/giantswarm/observability-operator/compare/v0.8.0...v0.8.1
Expand Down
13 changes: 12 additions & 1 deletion api/v1alpha1/grafanaorganization_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ type GrafanaOrganizationSpec struct {
DisplayName string `json:"displayName"`

// Access rules defines user permissions for interacting with the organization in Grafana.
RBAC *RBAC `json:"rbac,omitempty"`
RBAC *RBAC `json:"rbac"`

// Tenants is a list of tenants that are associated with the Grafana organization.
// +kubebuilder:example={"giantswarm"}
Tenants []TenantID `json:"tenants,omitempty"`
}

// TenantID is a unique identifier for a tenant. It must be lowercase.
// +kubebuilder:validation:Pattern="^[a-z]*$"
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
type TenantID string

// RBAC defines the RoleBasedAccessControl configuration for the Grafana organization.
// Each fields represents the mapping to a Grafana role:
//
Expand Down Expand Up @@ -62,6 +72,7 @@ type RBAC struct {
// GrafanaOrganizationStatus defines the observed state of GrafanaOrganization
type GrafanaOrganizationStatus struct {
// OrgID is the actual organisation ID in grafana.
// +optional
OrgID int64 `json:"orgID"`

// DataSources is a list of grafana data sources that are available to the Grafana organization.
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions config/crd/observability.giantswarm.io_grafanaorganizations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,22 @@ spec:
required:
- admins
type: object
tenants:
description: Tenants is a list of tenants that are associated with
the Grafana organization.
example:
- giantswarm
items:
description: TenantID is a unique identifier for a tenant. It must
be lowercase.
maxLength: 63
minLength: 1
pattern: ^[a-z]*$
type: string
type: array
required:
- displayName
- rbac
type: object
status:
description: GrafanaOrganizationStatus defines the observed state of GrafanaOrganization
Expand All @@ -104,8 +118,6 @@ spec:
description: OrgID is the actual organisation ID in grafana.
format: int64
type: integer
required:
- orgID
type: object
type: object
served: true
Expand Down
12 changes: 10 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ require (
github.com/go-logr/logr v1.4.2
github.com/grafana/grafana-openapi-client-go v0.0.0-20241126111151-59d2d35e24eb
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.0
github.com/onsi/gomega v1.36.1
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.23
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.78.2
github.com/prometheus/alertmanager v0.27.0
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/common v0.61.0
github.com/sirupsen/logrus v1.9.3
Expand Down Expand Up @@ -79,7 +80,7 @@ require (
k8s.io/apiextensions-apiserver v0.31.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078
k8s.io/utils v0.0.0-20241210054802-24370beab758
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Expand All @@ -89,7 +90,10 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.50.8 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
Expand All @@ -99,12 +103,16 @@ require (
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/validate v0.24.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
Expand Down
Loading

0 comments on commit ed829e1

Please sign in to comment.