Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 45 additions & 24 deletions apis/installer/v1alpha1/appscodeOtelStack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ type AppscodeOtelStack struct {

// AppscodeOtelStackSpec is the schema for AppscodeOtelStack values file
type AppscodeOtelStackSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
OpentelemetryKubeStack OpentelemetryKubeStackSpec `json:"opentelemetry-kube-stack"`
OpentelemetryKubeStack OpentelemetryKubeStackValues `json:"opentelemetry-kube-stack"`
}

type OpentelemetryKubeStackSpec struct {
ClusterName string `json:"clusterName"`
type OpentelemetryKubeStackValues struct {
ClusterName string `json:"clusterName"`
// +optional
Crds OtelCrdsConfig `json:"crds"`
// +optional
OpentelemetryOperator *apiextensionsv1.JSON `json:"opentelemetry-operator"`
AdmissionWebhooks OtelAdmissionWebhooks `json:"admissionWebhooks"`
Collectors OpentelemetryKubeStackCollectors `json:"collectors"`
Instrumentation OpentelemetryFeatureFlag `json:"instrumentation"`
OpAMPBridge OpentelemetryFeatureFlag `json:"opAMPBridge"`
Expand All @@ -69,6 +70,18 @@ type OpentelemetryKubeStackSpec struct {
NodeExporter OpentelemetryFeatureFlag `json:"nodeExporter"`
}

type OtelCrdsConfig struct {
InstallOtel bool `json:"installOtel"`
}

type OtelAdmissionWebhooks struct {
AutoGenerateCert OtelAutoGenerateCert `json:"autoGenerateCert"`
}

type OtelAutoGenerateCert struct {
Enabled bool `json:"enabled"`
}

type OpentelemetryFeatureFlag struct {
Enabled bool `json:"enabled"`
}
Expand All @@ -80,29 +93,32 @@ type OpentelemetryKubeStackCollectors struct {

type OtelCollector struct {
//+optional
Suffix string `json:"suffix"`
Suffix string `json:"suffix,omitempty"`
Enabled bool `json:"enabled"`
//+optional
Env []core.EnvVar `json:"env"`
Env []core.EnvVar `json:"env,omitempty"`
//+optional
ScrapeConfigsFile string `json:"scrape_configs_file"`
ScrapeConfigsFile string `json:"scrape_configs_file,omitempty"`
//+optional
Labels map[string]string `json:"labels"`
Labels map[string]string `json:"labels,omitempty"`
//+optional
Image *OtelCollectorImage `json:"image"`
Image *OtelCollectorImage `json:"image,omitempty"`
// +optional
TargetAllocator *OtelTargetAllocator `json:"targetAllocator"`
// Config holds the arbitrary OpenTelemetry collector pipeline configuration
// (receivers, exporters, processors, service, extensions).
TargetAllocator *OtelTargetAllocator `json:"targetAllocator,omitempty"`
// Config holds the arbitrary OpenTelemetry collector pipeline configuration.
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Config *apiextensionsv1.JSON `json:"config"`
Config *apiextensionsv1.JSON `json:"config,omitempty"`
// +optional
Presets *OtelCollectorPresets `json:"presets"`
Presets *OtelCollectorPresets `json:"presets,omitempty"`
//+optional
VolumeMounts []core.VolumeMount `json:"volumeMounts"`
VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"`
//+optional
Volumes []core.Volume `json:"volumes"`
Volumes []core.Volume `json:"volumes,omitempty"`
// +optional
Resources core.ResourceRequirements `json:"resources,omitempty"`
// +optional
HostAliases []core.HostAlias `json:"hostAliases,omitempty"`
}

type OtelCollectorImage struct {
Expand Down Expand Up @@ -130,11 +146,16 @@ type OtelTargetAllocatorPromCR struct {
}

type OtelCollectorPresets struct {
LogsCollection *OtelPresetFlag `json:"logsCollection"`
HostMetrics *OtelPresetFlag `json:"hostMetrics"`
KubeletMetrics *OtelPresetFlag `json:"kubeletMetrics"`
KubernetesAttributes *OtelPresetFlag `json:"kubernetesAttributes"`
ClusterMetrics *OtelPresetFlag `json:"clusterMetrics"`
// +optional
LogsCollection *OtelPresetFlag `json:"logsCollection,omitempty"`
// +optional
HostMetrics *OtelPresetFlag `json:"hostMetrics,omitempty"`
// +optional
KubeletMetrics *OtelPresetFlag `json:"kubeletMetrics,omitempty"`
// +optional
KubernetesAttributes *OtelPresetFlag `json:"kubernetesAttributes,omitempty"`
// +optional
ClusterMetrics *OtelPresetFlag `json:"clusterMetrics,omitempty"`
}

type OtelPresetFlag struct {
Expand Down
75 changes: 71 additions & 4 deletions apis/installer/v1alpha1/perses_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1alpha1

import (
core "k8s.io/api/core/v1"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"kmodules.xyz/resource-metadata/apis/shared"
)
Expand Down Expand Up @@ -88,6 +89,22 @@ type PersesSpec struct {
TLS PersesTLS `json:"tls"`
// +optional
Distro shared.DistroSpec `json:"distro"`
// +optional
Datasources *apiextensionsv1.JSON `json:"datasources"`
// +optional
ExtraArgs *apiextensionsv1.JSON `json:"extraArgs"`
// +optional
ExtraObjects *apiextensionsv1.JSON `json:"extraObjects"`
// +optional
OciArtifacts *apiextensionsv1.JSON `json:"ociArtifacts"`
// +optional
TestFramework PersesTestFramework `json:"testFramework"`
// +optional
TopologySpreadConstraints []core.TopologySpreadConstraint `json:"topologySpreadConstraints"`
// +optional
VolumeMounts []core.VolumeMount `json:"volumeMounts"`
// +optional
Volumes []core.Volume `json:"volumes"`
}

type PersesImage struct {
Expand All @@ -112,9 +129,16 @@ type PersesServiceMonitor struct {
//+optional
Labels map[string]string `json:"labels"`
//+optional
Selector PersesServiceMonitorSelector `json:"selector"`
//+optional
Interval string `json:"interval"`
}

type PersesServiceMonitorSelector struct {
//+optional
MatchLabels map[string]string `json:"matchLabels"`
}

type PersesProbe struct {
Enabled bool `json:"enabled"`
InitialDelaySeconds int32 `json:"initialDelaySeconds"`
Expand All @@ -139,12 +163,32 @@ type PersesConfigSecurity struct {
Readonly bool `json:"readonly"`
EnableAuth bool `json:"enable_auth"`
Authentication PersesConfigAuthentication `json:"authentication"`
Cookie PersesConfigCookie `json:"cookie"`
// +optional
Authorization PersesConfigAuthorization `json:"authorization"`
Cookie PersesConfigCookie `json:"cookie"`
}

type PersesConfigAuthorization struct {
// +optional
GuestPermissions []PersesGuestPermission `json:"guest_permissions"`
}

type PersesGuestPermission struct {
// +optional
Actions []string `json:"actions"`
// +optional
Scopes []string `json:"scopes"`
}

type PersesConfigAuthentication struct {
AccessTokenTTL string `json:"access_token_ttl"`
RefreshTokenTTL string `json:"refresh_token_ttl"`
// +optional
Providers PersesConfigAuthenticationProviders `json:"providers"`
AccessTokenTTL string `json:"access_token_ttl"`
RefreshTokenTTL string `json:"refresh_token_ttl"`
}

type PersesConfigAuthenticationProviders struct {
EnableNative bool `json:"enable_native"`
}

type PersesConfigCookie struct {
Expand All @@ -156,6 +200,15 @@ type PersesConfigFrontend struct {
Explorer PersesConfigFrontendExplorer `json:"explorer"`
//+optional
Information string `json:"information"`
//+optional
ImportantDashboards []PersesImportantDashboard `json:"important_dashboards"`
}

type PersesImportantDashboard struct {
//+optional
Project string `json:"project"`
//+optional
Dashboard string `json:"dashboard"`
}

type PersesConfigFrontendExplorer struct {
Expand Down Expand Up @@ -213,7 +266,7 @@ type PersesSidecarImage struct {
type PersesPersistence struct {
Enabled bool `json:"enabled"`
//+optional
StorageClass string `json:"storageClass"`
StorageClass string `json:"storageClass,omitempty"`
//+optional
AccessModes []string `json:"accessModes"`
Size string `json:"size"`
Expand Down Expand Up @@ -266,6 +319,20 @@ type PersesTLSCert struct {
MountPath string `json:"mountPath"`
}

type PersesTestFramework struct {
Enabled bool `json:"enabled"`
Image PersesTestFrameworkImage `json:"image"`
//+optional
ImagePullPolicy string `json:"imagePullPolicy"`
}

type PersesTestFrameworkImage struct {
//+optional
Registry string `json:"registry"`
Repository string `json:"repository"`
Tag string `json:"tag"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PersesList is a list of Perses
Expand Down
Loading
Loading