@@ -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"`
@@ -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+
248309type 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+
423489type InboxServerSettings struct {
424490 JmapURL string `json:"jmapURL"`
425491 WebAdminURL string `json:"webAdminURL"`
0 commit comments