Skip to content

Commit ebfeb99

Browse files
committed
Add central monitoring system
Signed-off-by: RokibulHasan7 <mdrokibulhasan@appscode.com>
1 parent 30b1795 commit ebfeb99

16 files changed

Lines changed: 786 additions & 3 deletions

File tree

apis/installer/v1alpha1/ace_ace_types.go

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type AceSpec struct {
5555
PlatformUi AcePlatformUi `json:"platform-ui"`
5656
ClusterUi AceClusterUi `json:"cluster-ui"`
5757
Grafana AceGrafana `json:"grafana"`
58+
Perses AcePerses `json:"perses"`
5859
KubedbUi AceKubedbUi `json:"kubedb-ui"`
5960
PlatformApi AcePlatformApi `json:"platform-api"`
6061
IngressNginx AceIngressNginx `json:"ingress-nginx"`
@@ -123,6 +124,11 @@ type AceGrafana struct {
123124
*GrafanaSpec `json:",inline,omitempty"`
124125
}
125126

127+
type AcePerses struct {
128+
Enabled bool `json:"enabled"`
129+
*PersesSpec `json:",inline,omitempty"`
130+
}
131+
126132
type AceKubedbUi struct {
127133
Enabled bool `json:"enabled"`
128134
*KubedbUiSpec `json:",inline,omitempty"`
@@ -245,6 +251,61 @@ type KubeStashSpec struct {
245251
StorageSecret wizardsapi.OptionalResource `json:"storageSecret"`
246252
}
247253

254+
type PersesSpec struct {
255+
Config PersesConfig `json:"config"`
256+
Env []core.EnvVar `json:"env"`
257+
ImageRef PersesImageRef `json:"image"`
258+
PodAnnotations map[string]string `json:"podAnnotations"`
259+
}
260+
261+
type PersesImageRef struct {
262+
Name string `json:"name"`
263+
Version string `json:"version"`
264+
PullPolicy string `json:"pullPolicy"`
265+
}
266+
267+
type PersesConfig struct {
268+
APIPrefix string `json:"api_prefix,omitempty"`
269+
Security SecurityConfig `json:"security,omitempty"`
270+
Database DatabaseConfig `json:"database,omitempty"`
271+
}
272+
273+
type SecurityConfig struct {
274+
EnableAuth bool `json:"enable_auth,omitempty"`
275+
EncryptionKey string `json:"encryption_key,omitempty"`
276+
Authentication AuthenticationConfig `json:"authentication,omitempty"`
277+
Authorization AuthorizationConfig `json:"authorization,omitempty"`
278+
}
279+
280+
type AuthenticationConfig struct {
281+
Providers AuthProviders `json:"providers,omitempty"`
282+
}
283+
284+
type AuthProviders struct {
285+
EnableNative bool `json:"enable_native,omitempty"`
286+
}
287+
288+
type AuthorizationConfig struct {
289+
GuestPermissions []Permission `json:"guest_permissions,omitempty"`
290+
}
291+
292+
type Permission struct {
293+
Actions []string `json:"actions,omitempty"`
294+
Scopes []string `json:"scopes,omitempty"`
295+
}
296+
297+
type DatabaseConfig struct {
298+
SQL SQLConfig `json:"sql,omitempty"`
299+
}
300+
301+
type SQLConfig struct {
302+
User string `json:"user,omitempty"`
303+
Password string `json:"password,omitempty"`
304+
Address string `json:"addr,omitempty"`
305+
DBName string `json:"db_name,omitempty"`
306+
AllowNativePasswords bool `json:"allow_native_passwords,omitempty"`
307+
}
308+
248309
type InfraDns struct {
249310
catgwapi.GatewayDns `json:",inline,omitempty"`
250311
// +optional
@@ -310,6 +371,7 @@ type Settings struct {
310371
Platform PlatformSettings `json:"platform"`
311372
Security SecuritySettings `json:"security"`
312373
Grafana GrafanaSettings `json:"grafana"`
374+
Perses PersesSettings `json:"perses"`
313375
InboxServer InboxServerSettings `json:"inboxServer"`
314376
Contract ContractStorage `json:"contract"`
315377
Firebase FirebaseSettings `json:"firebase"`
@@ -420,6 +482,10 @@ type GrafanaSettings struct {
420482
SecretKey string `json:"secretKey"`
421483
}
422484

485+
type PersesSettings struct {
486+
EncryptionKey string `json:"encryptionKey"`
487+
}
488+
423489
type InboxServerSettings struct {
424490
JmapURL string `json:"jmapURL"`
425491
WebAdminURL string `json:"webAdminURL"`

apis/installer/v1alpha1/ace_options_types.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ type AceOptionsSpec struct {
6464
PlatformUi AceOptionsComponentSpec `json:"platform-ui"`
6565
ClusterUi AceOptionsComponentSpec `json:"cluster-ui"`
6666
Grafana AceOptionsComponentSpec `json:"grafana"`
67+
Perses AceOptionsComponentSpec `json:"perses"`
6768
KubedbUi AceOptionsComponentSpec `json:"kubedb-ui"`
6869
PlatformApi AceOptionsComponentSpec `json:"platform-api"`
6970
Ingress AceOptionsIngressNginx `json:"ingress"`
@@ -514,9 +515,11 @@ type GeneratedValues struct {
514515
// +optional
515516
JKSPassword string `json:"jksPassword"`
516517
// +optional
517-
GrafanaSecretKey string `json:"grafanaSecretKey"`
518-
InboxServer InboxServerValues `json:"inboxServer"`
519-
OpenFGAServer OpenFGAServerValues `json:"openfga"`
518+
GrafanaSecretKey string `json:"grafanaSecretKey"`
519+
// +optional
520+
PersesEncryptionKey string `json:"persesEncryptionKey"`
521+
InboxServer InboxServerValues `json:"inboxServer"`
522+
OpenFGAServer OpenFGAServerValues `json:"openfga"`
520523
// InstallerSecret used by hosted mode (prod and ninja)
521524
// to generate and validate marketplace self-hosted installer options
522525
// +optional

0 commit comments

Comments
 (0)