Skip to content

Commit 4b11958

Browse files
Add alertManager in ace-options
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent 359e7af commit 4b11958

9 files changed

Lines changed: 236 additions & 87 deletions

File tree

apis/installer/v1alpha1/ace_options_types.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
configapi "go.bytebuilders.dev/resource-model/apis/config/v1alpha1"
2626
wizardsapi "go.bytebuilders.dev/ui-wizards/apis/wizards/v1alpha1"
2727

28+
openviz_installer "go.openviz.dev/installer/apis/installer/v1alpha1"
2829
core "k8s.io/api/core/v1"
2930
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3031
store "kmodules.xyz/objectstore-api/api/v1"
@@ -57,7 +58,7 @@ type AceOptionsSpec struct {
5758
Context AceDeploymentContext `json:"context"`
5859
Release ObjectReference `json:"release"`
5960
Registry RegistrySpec `json:"registry"`
60-
Monitoring GlobalMonitoring `json:"monitoring"`
61+
Monitoring AceOptionsMonitoring `json:"monitoring"`
6162
Infra AceOptionsPlatformInfra `json:"infra"`
6263
Settings AceOptionsSettings `json:"settings"`
6364
PlatformUi AceOptionsComponentSpec `json:"platform-ui"`
@@ -220,6 +221,11 @@ type AceOptionsNatsSettings struct {
220221
NodeSelector map[string]string `json:"nodeSelector"`
221222
}
222223

224+
type AceOptionsMonitoring struct {
225+
Prometheus GlobalMonitoring `json:"prometheus"`
226+
//+optional
227+
AlertManager openviz_installer.Alertmanager `json:"alertManager"`
228+
}
223229
type AceOptionsPlatformInfra struct {
224230
StorageClass LocalObjectReference `json:"storageClass,omitempty"`
225231
KubeStash KubeStashOptions `json:"kubestash"`

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
go.bytebuilders.dev/catalog v0.0.21-0.20260310064619-b60c91703ff4
77
go.bytebuilders.dev/resource-model v0.4.0
88
go.bytebuilders.dev/ui-wizards v0.31.0
9-
go.openviz.dev/installer v0.0.0-20260104052502-5deb6915c7d6
9+
go.openviz.dev/installer v0.0.0-20260408131258-3023af9e16ae
1010
gomodules.xyz/go-sh v0.2.0
1111
k8s.io/api v0.34.3
1212
k8s.io/apimachinery v0.34.3
@@ -16,7 +16,7 @@ require (
1616
kmodules.xyz/objectstore-api v0.34.0
1717
kmodules.xyz/resource-metadata v0.43.0
1818
kmodules.xyz/schema-checker v0.4.3
19-
kubeops.dev/external-dns-operator v0.3.0
19+
kubeops.dev/external-dns-operator v0.3.1-0.20260409053434-d3838ac10fdf
2020
kubeops.dev/installer v0.0.0-20260313185651-062077f97cb4
2121
sigs.k8s.io/gateway-api v1.4.1
2222
sigs.k8s.io/kustomize/kyaml v0.20.1

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ go.bytebuilders.dev/resource-model v0.4.0 h1:wDXg4SGYn3zNRuOj17gGo0qeSE//ytdzGPS
217217
go.bytebuilders.dev/resource-model v0.4.0/go.mod h1:wGndjj3y+Yjh7+e8Wjc6joqzZCC16WZfKNx9adAFVkw=
218218
go.bytebuilders.dev/ui-wizards v0.31.0 h1:jLKOZEdUQbyA6r0iFe9khwB5U46Ad2HfgBlqmysc73o=
219219
go.bytebuilders.dev/ui-wizards v0.31.0/go.mod h1:od0U+2LentkkvTNxRPtVnx4bDWehdzIsMFbmC5FIQ8A=
220-
go.openviz.dev/installer v0.0.0-20260104052502-5deb6915c7d6 h1:71aGKgbPoKqJWD4tTOVbe8p+hkhvsELsGPwuOCon3Wg=
221-
go.openviz.dev/installer v0.0.0-20260104052502-5deb6915c7d6/go.mod h1:a+eNwY1tC1B2eAD/K/8sAv7EJhs+KigwQHBz2fgG+1w=
220+
go.openviz.dev/installer v0.0.0-20260408131258-3023af9e16ae h1:L9zvhgJJVWqFYrgd5s9BzQ8SHCo897/+Xmt72pHvd6o=
221+
go.openviz.dev/installer v0.0.0-20260408131258-3023af9e16ae/go.mod h1:lGQ+iSgf2XHY2lTpPsuyIEp9Dfp6cLpjqzTgvy+XDmo=
222222
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
223223
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
224224
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
@@ -351,8 +351,8 @@ kmodules.xyz/resource-metadata v0.43.0 h1:MSUeMku47f1NhpTptkbWZbyGqp1oASTh/I2sBJ
351351
kmodules.xyz/resource-metadata v0.43.0/go.mod h1:bqm4/ZqHxA04H1/Mz79YhHgrePSKJfUVL7cpG8teKsA=
352352
kmodules.xyz/schema-checker v0.4.3 h1:LKXKNWwJ0bFOqCMbyfZk38uVJIejXsANdp7l+fkIiJQ=
353353
kmodules.xyz/schema-checker v0.4.3/go.mod h1:JjUB6Ih4gnrBwzJNO91Dz9xa8J92UHyvPSyfX++sksM=
354-
kubeops.dev/external-dns-operator v0.3.0 h1:KIWX0C+5en8levhkdlM9htZ+EsowIWm9mgLTdsJYUzo=
355-
kubeops.dev/external-dns-operator v0.3.0/go.mod h1:hJgsshVGN68A4eXPjGYCuKaWLgYbaYFCD9E+vydYJoE=
354+
kubeops.dev/external-dns-operator v0.3.1-0.20260409053434-d3838ac10fdf h1:mx8EWPxhDZkNM+knVHjEVxxUYDOwOCR18Rf85vHCA78=
355+
kubeops.dev/external-dns-operator v0.3.1-0.20260409053434-d3838ac10fdf/go.mod h1:hJgsshVGN68A4eXPjGYCuKaWLgYbaYFCD9E+vydYJoE=
356356
kubeops.dev/installer v0.0.0-20260313185651-062077f97cb4 h1:65oo3cimnAHgmP2PFnYU+NKsVYj5vJ8KAeoIi438H88=
357357
kubeops.dev/installer v0.0.0-20260313185651-062077f97cb4/go.mod h1:8X06Mr3+df3YsE1PMRSDBPaplOOS4js7tBBFK3Sx1Ug=
358358
kubeops.dev/scanner v0.0.19 h1:J8C94k4j3NY3Y8UGHcG4nCZtmpSqPneCmkuvGNUOv4s=

schema/ace-options/values.openapiv3_schema.yaml

Lines changed: 132 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,98 +1411,153 @@ properties:
14111411
type: object
14121412
monitoring:
14131413
properties:
1414-
agent:
1415-
type: string
1416-
exporter:
1414+
alertManager:
14171415
properties:
1418-
resources:
1419-
description: ResourceRequirements describes the compute resource requirements.
1416+
email:
14201417
properties:
1421-
claims:
1422-
description: 'Claims lists the names of resources, defined in spec.resourceClaims,
1423-
1424-
that are used by this container.
1425-
1426-
1427-
This field depends on the
1428-
1429-
DynamicResourceAllocation feature gate.
1430-
1418+
authUsername:
1419+
type: string
1420+
enabled:
1421+
type: boolean
1422+
from:
1423+
type: string
1424+
password:
1425+
type: string
1426+
requireTLS:
1427+
type: boolean
1428+
sendResolved:
1429+
type: boolean
1430+
smarthost:
1431+
type: string
1432+
to:
1433+
type: string
1434+
required:
1435+
- authUsername
1436+
- enabled
1437+
- from
1438+
- password
1439+
- requireTLS
1440+
- sendResolved
1441+
- smarthost
1442+
- to
1443+
type: object
1444+
webhook:
1445+
properties:
1446+
enabled:
1447+
type: boolean
1448+
sendResolved:
1449+
type: boolean
1450+
url:
1451+
type: string
1452+
required:
1453+
- enabled
1454+
- sendResolved
1455+
- url
1456+
type: object
1457+
required:
1458+
- email
1459+
- webhook
1460+
type: object
1461+
prometheus:
1462+
properties:
1463+
agent:
1464+
type: string
1465+
exporter:
1466+
properties:
1467+
resources:
1468+
description: ResourceRequirements describes the compute resource requirements.
1469+
properties:
1470+
claims:
1471+
description: 'Claims lists the names of resources, defined in
1472+
spec.resourceClaims,
14311473
1432-
This field is immutable. It can only be set for containers.'
1433-
items:
1434-
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
1435-
properties:
1436-
name:
1437-
description: 'Name must match the name of one entry in pod.spec.resourceClaims
1438-
of
1474+
that are used by this container.
14391475
1440-
the Pod where this field is used. It makes that resource available
14411476
1442-
inside a container.'
1443-
type: string
1444-
request:
1445-
description: 'Request is the name chosen for a request in the
1446-
referenced claim.
1477+
This field depends on the
14471478
1448-
If empty, everything from the claim is made available, otherwise
1479+
DynamicResourceAllocation feature gate.
14491480
1450-
only the result of this request.'
1451-
type: string
1452-
required:
1453-
- name
1454-
type: object
1455-
type: array
1456-
x-kubernetes-list-map-keys:
1457-
- name
1458-
x-kubernetes-list-type: map
1459-
limits:
1460-
additionalProperties:
1461-
anyOf:
1462-
- type: integer
1463-
- type: string
1464-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1465-
x-kubernetes-int-or-string: true
1466-
description: 'Limits describes the maximum amount of compute resources
1467-
allowed.
14681481
1469-
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1482+
This field is immutable. It can only be set for containers.'
1483+
items:
1484+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
1485+
properties:
1486+
name:
1487+
description: 'Name must match the name of one entry in pod.spec.resourceClaims
1488+
of
1489+
1490+
the Pod where this field is used. It makes that resource
1491+
available
1492+
1493+
inside a container.'
1494+
type: string
1495+
request:
1496+
description: 'Request is the name chosen for a request in
1497+
the referenced claim.
1498+
1499+
If empty, everything from the claim is made available,
1500+
otherwise
1501+
1502+
only the result of this request.'
1503+
type: string
1504+
required:
1505+
- name
1506+
type: object
1507+
type: array
1508+
x-kubernetes-list-map-keys:
1509+
- name
1510+
x-kubernetes-list-type: map
1511+
limits:
1512+
additionalProperties:
1513+
anyOf:
1514+
- type: integer
1515+
- type: string
1516+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1517+
x-kubernetes-int-or-string: true
1518+
description: 'Limits describes the maximum amount of compute resources
1519+
allowed.
1520+
1521+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1522+
type: object
1523+
requests:
1524+
additionalProperties:
1525+
anyOf:
1526+
- type: integer
1527+
- type: string
1528+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1529+
x-kubernetes-int-or-string: true
1530+
description: 'Requests describes the minimum amount of compute
1531+
resources required.
1532+
1533+
If Requests is omitted for a container, it defaults to Limits
1534+
if that is explicitly specified,
1535+
1536+
otherwise to an implementation-defined value. Requests cannot
1537+
exceed Limits.
1538+
1539+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1540+
type: object
14701541
type: object
1471-
requests:
1542+
required:
1543+
- resources
1544+
type: object
1545+
serviceMonitor:
1546+
properties:
1547+
labels:
14721548
additionalProperties:
1473-
anyOf:
1474-
- type: integer
1475-
- type: string
1476-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1477-
x-kubernetes-int-or-string: true
1478-
description: 'Requests describes the minimum amount of compute resources
1479-
required.
1480-
1481-
If Requests is omitted for a container, it defaults to Limits if
1482-
that is explicitly specified,
1483-
1484-
otherwise to an implementation-defined value. Requests cannot exceed
1485-
Limits.
1486-
1487-
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1549+
type: string
14881550
type: object
1551+
required:
1552+
- labels
14891553
type: object
14901554
required:
1491-
- resources
1492-
type: object
1493-
serviceMonitor:
1494-
properties:
1495-
labels:
1496-
additionalProperties:
1497-
type: string
1498-
type: object
1499-
required:
1500-
- labels
1555+
- agent
1556+
- exporter
1557+
- serviceMonitor
15011558
type: object
15021559
required:
1503-
- agent
1504-
- exporter
1505-
- serviceMonitor
1560+
- prometheus
15061561
type: object
15071562
nats:
15081563
properties:

vendor/go.openviz.dev/installer/apis/installer/v1alpha1/monitoring_operator_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ type MonitoringOperatorSpec struct {
7878
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
7979
Apiserver EASSpec `json:"apiserver"`
8080
Monitoring EASMonitoring `json:"monitoring"`
81+
Alertmanager Alertmanager `json:"alertmanager"`
8182
Platform PlatformSpec `json:"platform"`
8283
HubUID string `json:"hubUID"`
8384
Rancher PlatformSpec `json:"rancher"`

vendor/go.openviz.dev/installer/apis/installer/v1alpha1/types.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,28 @@ type ServiceMonitorLabels struct {
7979
Labels map[string]string `json:"labels"`
8080
}
8181

82+
type Alertmanager struct {
83+
Email AlertmanagerEmailSpec `json:"email"`
84+
Webhook AlertmanagerWebhookSpec `json:"webhook"`
85+
}
86+
87+
type AlertmanagerEmailSpec struct {
88+
Enabled bool `json:"enabled"`
89+
To string `json:"to"`
90+
From string `json:"from"`
91+
Smarthost string `json:"smarthost"`
92+
AuthUsername string `json:"authUsername"`
93+
Password string `json:"password"`
94+
RequireTLS bool `json:"requireTLS"`
95+
SendResolved bool `json:"sendResolved"`
96+
}
97+
98+
type AlertmanagerWebhookSpec struct {
99+
Enabled bool `json:"enabled"`
100+
URL string `json:"url"`
101+
SendResolved bool `json:"sendResolved"`
102+
}
103+
82104
type EASSpec struct {
83105
GroupPriorityMinimum int32 `json:"groupPriorityMinimum"`
84106
VersionPriority int32 `json:"versionPriority"`

0 commit comments

Comments
 (0)