@@ -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+
126132type AceKubedbUi struct {
127133 Enabled bool `json:"enabled"`
128134 * KubedbUiSpec `json:",inline,omitempty"`
@@ -246,6 +252,54 @@ type KubeStashSpec struct {
246252 StorageSecret wizardsapi.OptionalResource `json:"storageSecret"`
247253}
248254
255+ type PersesSpec struct {
256+ Config PersesConfig `json:"config"`
257+ Env []core.EnvVar `json:"env"`
258+ PodAnnotations map [string ]string `json:"podAnnotations"`
259+ }
260+
261+ type PersesConfig struct {
262+ APIPrefix string `json:"api_prefix,omitempty"`
263+ Security SecurityConfig `json:"security,omitempty"`
264+ Database DatabaseConfig `json:"database,omitempty"`
265+ }
266+
267+ type SecurityConfig struct {
268+ EnableAuth bool `json:"enable_auth,omitempty"`
269+ EncryptionKey string `json:"encryption_key,omitempty"`
270+ Authentication AuthenticationConfig `json:"authentication,omitempty"`
271+ Authorization AuthorizationConfig `json:"authorization,omitempty"`
272+ }
273+
274+ type AuthenticationConfig struct {
275+ Providers AuthProviders `json:"providers,omitempty"`
276+ }
277+
278+ type AuthProviders struct {
279+ EnableNative bool `json:"enable_native,omitempty"`
280+ }
281+
282+ type AuthorizationConfig struct {
283+ GuestPermissions []Permission `json:"guest_permissions,omitempty"`
284+ }
285+
286+ type Permission struct {
287+ Actions []string `json:"actions,omitempty"`
288+ Scopes []string `json:"scopes,omitempty"`
289+ }
290+
291+ type DatabaseConfig struct {
292+ SQL SQLConfig `json:"sql,omitempty"`
293+ }
294+
295+ type SQLConfig struct {
296+ User string `json:"user,omitempty"`
297+ Password string `json:"password,omitempty"`
298+ Address string `json:"addr,omitempty"`
299+ DBName string `json:"db_name,omitempty"`
300+ AllowNativePasswords bool `json:"allow_native_passwords,omitempty"`
301+ }
302+
249303type InfraDns struct {
250304 catgwapi.GatewayDns `json:",inline,omitempty"`
251305 // +optional
@@ -311,6 +365,7 @@ type Settings struct {
311365 Platform PlatformSettings `json:"platform"`
312366 Security SecuritySettings `json:"security"`
313367 Grafana GrafanaSettings `json:"grafana"`
368+ Perses PersesSettings `json:"perses"`
314369 InboxServer InboxServerSettings `json:"inboxServer"`
315370 Contract ContractStorage `json:"contract"`
316371 Firebase FirebaseSettings `json:"firebase"`
@@ -421,6 +476,10 @@ type GrafanaSettings struct {
421476 SecretKey string `json:"secretKey"`
422477}
423478
479+ type PersesSettings struct {
480+ EncryptionKey string `json:"encryptionKey"`
481+ }
482+
424483type InboxServerSettings struct {
425484 JmapURL string `json:"jmapURL"`
426485 WebAdminURL string `json:"webAdminURL"`
0 commit comments