Skip to content

Commit

Permalink
Merge branch 'master' into feat/grafana-version-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
NissesSenap authored Apr 3, 2024
2 parents 1c13762 + 720e742 commit f077021
Show file tree
Hide file tree
Showing 30 changed files with 1,194 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- id: changed-files
name: Get changed files
uses: tj-actions/changed-files@20576b4b9ed46d41e2d45a2256e5e2316dde6834 #v43.0.1
uses: tj-actions/changed-files@2d756ea4c53f7f6b397767d8723b3a10a9f35bf2 #v44.0.0
with:
files_ignore: |
**/*.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: |
cd hugo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: |
cd hugo
Expand Down
13 changes: 13 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: integreatly.org
layout:
- go.kubebuilder.io/v3
Expand Down Expand Up @@ -51,4 +55,13 @@ resources:
kind: GrafanaAlertRuleGroup
path: github.com/grafana/grafana-operator/api/v1beta1
version: v1beta1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: integreatly.org
group: grafana
kind: GrafanaContactPoint
path: github.com/grafana/grafana-operator/api/v1beta1
version: v1beta1
version: "3"
84 changes: 84 additions & 0 deletions api/v1beta1/grafanacontactpoint_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
Copyright 2022.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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 v1beta1

import (
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// GrafanaContactPointSpec defines the desired state of GrafanaContactPoint
type GrafanaContactPointSpec struct {
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=duration
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
// +kubebuilder:default="10m"
ResyncPeriod metav1.Duration `json:"resyncPeriod,omitempty"`

// selects Grafanas for import
InstanceSelector *metav1.LabelSelector `json:"instanceSelector"`

// +optional
DisableResolveMessage bool `json:"disableResolveMessage,omitempty"`

// +kubebuilder:validation:type=string
Name string `json:"name"`

Settings *apiextensions.JSON `json:"settings"`

// +kubebuilder:validation:Enum=alertmanager;dingding;discord;email;googlechat;kafka;line;opsgenie;pagerduty;pushover;sensugo;slack;teams;telegram;threema;victorops;webhook;wecom
Type string `json:"type,omitempty"`

// +optional
AllowCrossNamespaceImport *bool `json:"allowCrossNamespaceImport,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

// GrafanaContactPoint is the Schema for the grafanacontactpoints API
type GrafanaContactPoint struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec GrafanaContactPointSpec `json:"spec,omitempty"`
Status GrafanaContactPointStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// GrafanaContactPointList contains a list of GrafanaContactPoint
type GrafanaContactPointList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GrafanaContactPoint `json:"items"`
}

func init() {
SchemeBuilder.Register(&GrafanaContactPoint{}, &GrafanaContactPointList{})
}
112 changes: 112 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

8 changes: 6 additions & 2 deletions bundle/manifests/grafana-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,11 @@ spec:
name: manager
- image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation
replaces: grafana-operator.v5.6.2
replaces: grafana-operator.v5.6.0
skips:
- grafana-operator.v5.6.1
version: 5.6.3
- grafana-operator.v5.6.2
- grafana-operator.v5.6.3
- grafana-operator.v5.7.0
- grafana-operator.v5.8.0
version: 5.8.1
Loading

0 comments on commit f077021

Please sign in to comment.