Alerting: Receiver API Get+List+Delete (#90384)

This commit is contained in:
Matthew Jacobson
2024-07-16 10:02:16 -04:00
committed by GitHub
parent efdb08ed8c
commit b7f422b68d
14 changed files with 233 additions and 67 deletions

View File

@@ -1,5 +1,7 @@
package v0alpha1
import "encoding/json"
// Integration defines model for Integration.
// +k8s:openapi-gen=true
type Integration struct {
@@ -7,9 +9,9 @@ type Integration struct {
// +mapType=atomic
SecureFields map[string]bool `json:"SecureFields,omitempty"`
// +listType=atomic
Settings []byte `json:"settings"`
Type string `json:"type"`
Uid *string `json:"uid,omitempty"`
Settings json.RawMessage `json:"settings"`
Type string `json:"type"`
Uid *string `json:"uid,omitempty"`
}
// ReceiverSpec defines model for Spec.

View File

@@ -8,6 +8,8 @@
package v0alpha1
import (
json "encoding/json"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@@ -28,7 +30,7 @@ func (in *Integration) DeepCopyInto(out *Integration) {
}
if in.Settings != nil {
in, out := &in.Settings, &out.Settings
*out = make([]byte, len(*in))
*out = make(json.RawMessage, len(*in))
copy(*out, *in)
}
if in.Uid != nil {