-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Neaj Morshad <neaj@appscode.com>
- Loading branch information
1 parent
9699323
commit caf8a0a
Showing
16 changed files
with
2,391 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
Copyright AppsCode Inc. and Contributors | ||
Licensed under the AppsCode Community License 1.0.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
mona "kmodules.xyz/monitoring-agent-api/api/v1" | ||
api "x-helm.dev/apimachinery/apis/releases/v1alpha1" | ||
) | ||
|
||
const ( | ||
ResourceKindMSSQLServerAlerts = "MSSQLServerAlerts" | ||
ResourceMSSQLServerAlerts = "mssqlserveralerts" | ||
ResourceMSSQLServerAlertss = "mssqlserveralertss" | ||
) | ||
|
||
// MSSQLServerAlerts defines the schema for KubeDB Ops Manager Operator Installer. | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:path=mssqlserveralertss,singular=mssqlserveralerts,categories={kubedb,appscode} | ||
type MSSQLServerAlerts struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
Spec MSSQLServerAlertsSpec `json:"spec,omitempty"` | ||
} | ||
|
||
// MSSQLServerAlertsSpec is the schema for kubedb-autoscaler chart values file | ||
type MSSQLServerAlertsSpec struct { | ||
api.Metadata `json:"metadata,omitempty"` | ||
Form MSSQLServerAlertsSpecForm `json:"form"` | ||
Grafana MemcachedGrafana `json:"grafana"` | ||
} | ||
|
||
type MSSQLServerAlertsSpecForm struct { | ||
Alert MSSQLServerAlert `json:"alert"` | ||
} | ||
|
||
type MSSQLServerAlert struct { | ||
Enabled mona.SeverityFlag `json:"enabled"` | ||
Labels map[string]string `json:"labels"` | ||
// +optional | ||
Annotations map[string]string `json:"annotations"` | ||
// +optional | ||
AdditionalRuleLabels map[string]string `json:"additionalRuleLabels"` | ||
Groups MSSQLServerAlertGroups `json:"groups"` | ||
} | ||
|
||
type MSSQLServerAlertGroups struct { | ||
Database MSSQLServerDatabaseAlert `json:"database"` | ||
Provisioner ProvisionerAlert `json:"provisioner"` | ||
KubeStash KubeStashAlert `json:"kubeStash"` | ||
} | ||
|
||
type MSSQLServerDatabaseAlert struct { | ||
Enabled mona.SeverityFlag `json:"enabled"` | ||
Rules MSSQLServerDatabaseAlertRules `json:"rules"` | ||
} | ||
|
||
type MSSQLServerDatabaseAlertRules struct { | ||
MSSQLServerInstanceDown FixedAlert `json:"mssqlserverInstanceDown"` | ||
MSSSQLServerServiceDown FixedAlert `json:"mssqlserverServiceDown"` | ||
MSSQLServerRestarted IntValAlert `json:"mssqlserverRestarted"` | ||
MSSQLServerTooManyConnections IntValAlert `json:"mssqlserverTooManyConnections"` | ||
DiskUsageHigh IntValAlert `json:"diskUsageHigh"` | ||
DiskAlmostFull IntValAlert `json:"diskAlmostFull"` | ||
} | ||
|
||
type MSSQLServerGrafana struct { | ||
Enabled bool `json:"enabled"` | ||
Version string `json:"version"` | ||
JobName string `json:"jobName"` | ||
URL string `json:"url"` | ||
ApiKey string `json:"apikey"` | ||
} | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// MSSQLServerAlertsList is a list of MSSQLServerAlertss | ||
type MSSQLServerAlertsList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
// Items is a list of MSSQLServerAlerts CRD objects | ||
Items []MSSQLServerAlerts `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v2 | ||
name: mssqlserver-alerts | ||
description: A Helm chart for MSSQLServer Alert by AppsCode | ||
type: application | ||
version: v2023.05.09 | ||
appVersion: v0.2.0 | ||
home: https://github.com/appscode/alerts | ||
icon: https://cdn.appscode.com/images/products/kubedb/kubedb-icon.png | ||
sources: | ||
- https://github.com/appscode/alerts | ||
maintainers: | ||
- name: appscode | ||
email: support@appscode.com |
Oops, something went wrong.