Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the sentry-operator.io v1alpha1 API group. +kubebuilder:object:generate=true +groupName=sentry-operator.io
Index ¶
Constants ¶
const ( ConditionReady = "Ready" ReasonProjectProvisioned = "ProjectProvisioned" ReasonProvisionFailed = "ProvisionFailed" ReasonSecretSynced = "SecretSynced" ReasonDeleting = "Deleting" )
Condition type constants.
const (
ReasonRefProjectNotFound = "ProjectNotFound"
)
Condition reason specific to SentryProjectRef.
Variables ¶
var ( GroupVersion = schema.GroupVersion{Group: "sentry-operator.io", Version: "v1alpha1"} SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type KeySpec ¶
type KeySpec struct {
// Name is the label given to this key in Sentry.
Name string `json:"name"`
// SecretKey is the key name written into the Kubernetes Secret.
// Defaults to "SENTRY_DSN" for the first key, "SENTRY_DSN_<NAME>" for subsequent ones.
// +optional
SecretKey string `json:"secretKey,omitempty"`
// RateLimit configures the inbound event rate limit for this key.
// Overrides spec.defaultRateLimit if set.
// +optional
RateLimit *RateLimitSpec `json:"rateLimit,omitempty"`
}
KeySpec defines a Sentry DSN key to create or manage.
func (*KeySpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeySpec.
func (*KeySpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KeyStatus ¶
type KeyStatus struct {
// Name is the key label as specified in spec.keys.
Name string `json:"name"`
// ID is the Sentry key ID.
ID string `json:"id"`
// SecretKey is the key name written into the Kubernetes Secret.
SecretKey string `json:"secretKey"`
}
KeyStatus records the Sentry key ID for a managed DSN key. This allows the operator to match keys by ID rather than label on subsequent reconciles, so externally renamed keys are adopted rather than duplicated.
func (*KeyStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyStatus.
func (*KeyStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RateLimitSpec ¶
type RateLimitSpec struct {
// Count is the maximum number of events allowed per window.
// +kubebuilder:validation:Minimum=1
Count int `json:"count"`
// Window is the rate limit window in seconds.
// +kubebuilder:default=3600
// +kubebuilder:validation:Minimum=1
Window int `json:"window"`
}
RateLimitSpec configures the inbound event rate limit for a Sentry DSN key.
func (*RateLimitSpec) DeepCopy ¶
func (in *RateLimitSpec) DeepCopy() *RateLimitSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitSpec.
func (*RateLimitSpec) DeepCopyInto ¶
func (in *RateLimitSpec) DeepCopyInto(out *RateLimitSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeysSpec ¶
type SecretKeysSpec struct {
// DSN is the key name for the Sentry DSN value.
// Defaults to "SENTRY_DSN".
// +optional
// +kubebuilder:default="SENTRY_DSN"
DSN string `json:"dsn,omitempty"`
// Environment is the key name for the Sentry environment value.
// Only written if spec.environment is set.
// Defaults to "SENTRY_ENVIRONMENT".
// +optional
// +kubebuilder:default="SENTRY_ENVIRONMENT"
Environment string `json:"environment,omitempty"`
// Release is the key name for the Sentry release value.
// Only written if spec.release is set.
// Defaults to "SENTRY_RELEASE".
// +optional
// +kubebuilder:default="SENTRY_RELEASE"
Release string `json:"release,omitempty"`
}
SecretKeysSpec configures the key names written into the output Secret. All fields default to standard environment variable names used by Sentry SDKs.
func (*SecretKeysSpec) DeepCopy ¶
func (in *SecretKeysSpec) DeepCopy() *SecretKeysSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeysSpec.
func (*SecretKeysSpec) DeepCopyInto ¶
func (in *SecretKeysSpec) DeepCopyInto(out *SecretKeysSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentryProject ¶
type SentryProject struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec SentryProjectSpec `json:"spec,omitempty"`
Status SentryProjectStatus `json:"status,omitempty"`
}
SentryProject is the Schema for the sentryprojects API. Creating a SentryProject causes the operator to provision a project in Sentry and write a Secret containing SENTRY_DSN (and other optional values) into the same namespace.
func (*SentryProject) DeepCopy ¶
func (in *SentryProject) DeepCopy() *SentryProject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProject.
func (*SentryProject) DeepCopyInto ¶
func (in *SentryProject) DeepCopyInto(out *SentryProject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SentryProject) DeepCopyObject ¶
func (in *SentryProject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SentryProjectList ¶
type SentryProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SentryProject `json:"items"`
}
SentryProjectList contains a list of SentryProject.
func (*SentryProjectList) DeepCopy ¶
func (in *SentryProjectList) DeepCopy() *SentryProjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectList.
func (*SentryProjectList) DeepCopyInto ¶
func (in *SentryProjectList) DeepCopyInto(out *SentryProjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SentryProjectList) DeepCopyObject ¶
func (in *SentryProjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SentryProjectRef ¶
type SentryProjectRef struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec SentryProjectRefSpec `json:"spec,omitempty"`
Status SentryProjectRefStatus `json:"status,omitempty"`
}
SentryProjectRef references an existing Sentry project and writes its DSN into a Kubernetes Secret. Unlike SentryProject, it never creates or deletes the Sentry project itself.
func (*SentryProjectRef) DeepCopy ¶
func (in *SentryProjectRef) DeepCopy() *SentryProjectRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectRef.
func (*SentryProjectRef) DeepCopyInto ¶
func (in *SentryProjectRef) DeepCopyInto(out *SentryProjectRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SentryProjectRef) DeepCopyObject ¶
func (in *SentryProjectRef) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SentryProjectRefList ¶
type SentryProjectRefList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SentryProjectRef `json:"items"`
}
SentryProjectRefList contains a list of SentryProjectRef.
func (*SentryProjectRefList) DeepCopy ¶
func (in *SentryProjectRefList) DeepCopy() *SentryProjectRefList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectRefList.
func (*SentryProjectRefList) DeepCopyInto ¶
func (in *SentryProjectRefList) DeepCopyInto(out *SentryProjectRefList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SentryProjectRefList) DeepCopyObject ¶
func (in *SentryProjectRefList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SentryProjectRefSpec ¶
type SentryProjectRefSpec struct {
// Organization is the Sentry organization slug.
// Falls back to the operator's --default-organization flag if unset.
// +optional
Organization string `json:"organization,omitempty"`
// ProjectSlug is the slug of the existing Sentry project to reference.
// +kubebuilder:validation:Required
ProjectSlug string `json:"projectSlug"`
// SecretName is the name of the Kubernetes Secret created in this namespace.
// Defaults to "<metadata.name>-sentry".
// +optional
SecretName string `json:"secretName,omitempty"`
// Keys defines the Sentry DSN keys to fetch for this project.
// Each key must already exist in Sentry; keys are not created.
// If empty, the first existing key is used and written as SENTRY_DSN.
// +optional
// +listType=atomic
Keys []KeySpec `json:"keys,omitempty"`
// SecretKeys controls the key names written into the output Secret.
// Only applies when spec.keys is empty (single-key fallback mode).
// +optional
SecretKeys *SecretKeysSpec `json:"secretKeys,omitempty"`
// DefaultRateLimit applies to all keys in spec.keys that do not have their
// own rateLimit set.
// +optional
DefaultRateLimit *RateLimitSpec `json:"defaultRateLimit,omitempty"`
}
SentryProjectRefSpec defines the desired state of a SentryProjectRef. Unlike SentryProject, this resource references an existing Sentry project and never creates or deletes it.
func (*SentryProjectRefSpec) DeepCopy ¶
func (in *SentryProjectRefSpec) DeepCopy() *SentryProjectRefSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectRefSpec.
func (*SentryProjectRefSpec) DeepCopyInto ¶
func (in *SentryProjectRefSpec) DeepCopyInto(out *SentryProjectRefSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentryProjectRefStatus ¶
type SentryProjectRefStatus struct {
// Conditions represent the latest available observations of the resource's state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ProjectSlug is the slug of the referenced Sentry project.
// +optional
ProjectSlug string `json:"projectSlug,omitempty"`
// SecretName is the name of the Kubernetes Secret that was created.
// +optional
SecretName string `json:"secretName,omitempty"`
// Keys tracks the Sentry key IDs for each managed DSN key.
// Used to match keys by ID on subsequent reconciles, surviving label renames.
// +optional
// +listType=atomic
Keys []KeyStatus `json:"keys,omitempty"`
// LastSyncTime is the timestamp of the last successful reconciliation.
// +optional
LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
// ObservedGeneration is the generation last processed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
SentryProjectRefStatus defines the observed state of a SentryProjectRef.
func (*SentryProjectRefStatus) DeepCopy ¶
func (in *SentryProjectRefStatus) DeepCopy() *SentryProjectRefStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectRefStatus.
func (*SentryProjectRefStatus) DeepCopyInto ¶
func (in *SentryProjectRefStatus) DeepCopyInto(out *SentryProjectRefStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentryProjectSpec ¶
type SentryProjectSpec struct {
// Organization is the Sentry organization slug.
// Falls back to the operator's --default-organization flag if unset.
// +optional
Organization string `json:"organization,omitempty"`
// Team is the Sentry team slug that owns this project.
// Falls back to the operator's --default-team flag if unset.
// +optional
Team string `json:"team,omitempty"`
// Platform is the Sentry platform identifier (e.g. "go", "python-django", "javascript").
// See https://docs.sentry.io/platforms/ for valid values.
// Falls back to the operator's --default-platform flag if unset.
// +optional
Platform string `json:"platform,omitempty"`
// ProjectSlug overrides the Sentry project slug.
// Defaults to the resource's metadata.name.
// +optional
ProjectSlug string `json:"projectSlug,omitempty"`
// SecretName is the name of the Kubernetes Secret created in this namespace.
// Defaults to "<metadata.name>-sentry".
// +optional
SecretName string `json:"secretName,omitempty"`
// RetainOnDelete controls whether the Sentry project is deleted when this
// resource is deleted. Defaults to true (project is retained).
// Set to false to cascade-delete the Sentry project.
// +optional
// +kubebuilder:default=true
RetainOnDelete *bool `json:"retainOnDelete,omitempty"`
// SecretKeys controls the key names written into the output Secret.
// Only applies when spec.keys is empty (single-key fallback mode).
// +optional
SecretKeys *SecretKeysSpec `json:"secretKeys,omitempty"`
// Keys defines the Sentry DSN keys to create and manage for this project.
// Each key is created in Sentry if it does not exist, and its DSN is written
// into the output Secret under the configured key name.
// If empty, the first existing key is used and written as SENTRY_DSN.
// +optional
// +listType=atomic
Keys []KeySpec `json:"keys,omitempty"`
// DefaultRateLimit applies to all keys in spec.keys that do not have their
// own rateLimit set.
// +optional
DefaultRateLimit *RateLimitSpec `json:"defaultRateLimit,omitempty"`
}
SentryProjectSpec defines the desired state of a SentryProject.
func (*SentryProjectSpec) DeepCopy ¶
func (in *SentryProjectSpec) DeepCopy() *SentryProjectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectSpec.
func (*SentryProjectSpec) DeepCopyInto ¶
func (in *SentryProjectSpec) DeepCopyInto(out *SentryProjectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentryProjectStatus ¶
type SentryProjectStatus struct {
// Conditions represent the latest available observations of the resource's state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ProjectSlug is the slug of the provisioned Sentry project.
// +optional
ProjectSlug string `json:"projectSlug,omitempty"`
// SecretName is the name of the Kubernetes Secret that was created.
// +optional
SecretName string `json:"secretName,omitempty"`
// Keys tracks the Sentry key IDs for each managed DSN key.
// Used to match keys by ID on subsequent reconciles, surviving label renames.
// +optional
// +listType=atomic
Keys []KeyStatus `json:"keys,omitempty"`
// LastSyncTime is the timestamp of the last successful reconciliation.
// +optional
LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
// ObservedGeneration is the generation of the resource last processed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
SentryProjectStatus defines the observed state of a SentryProject.
func (*SentryProjectStatus) DeepCopy ¶
func (in *SentryProjectStatus) DeepCopy() *SentryProjectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryProjectStatus.
func (*SentryProjectStatus) DeepCopyInto ¶
func (in *SentryProjectStatus) DeepCopyInto(out *SentryProjectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.