Skip to content

Commit b1e8a93

Browse files
feat: Introduce Notifications Configuration CR for managing argocd-notifications-cm
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
1 parent b125af9 commit b1e8a93

File tree

11 files changed

+853
-120
lines changed

11 files changed

+853
-120
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.6.1
6+
creationTimestamp: null
7+
name: notificationsconfigurations.argoproj.io
8+
spec:
9+
group: argoproj.io
10+
names:
11+
kind: NotificationsConfiguration
12+
listKind: NotificationsConfigurationList
13+
plural: notificationsconfigurations
14+
singular: notificationsconfiguration
15+
scope: Namespaced
16+
versions:
17+
- name: v1alpha1
18+
schema:
19+
openAPIV3Schema:
20+
description: NotificationsConfiguration is the Schema for the NotificationsConfiguration
21+
API
22+
properties:
23+
apiVersion:
24+
description: 'APIVersion defines the versioned schema of this representation
25+
of an object. Servers should convert recognized schemas to the latest
26+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
27+
type: string
28+
kind:
29+
description: 'Kind is a string value representing the REST resource this
30+
object represents. Servers may infer this from the endpoint the client
31+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
32+
type: string
33+
metadata:
34+
type: object
35+
spec:
36+
description: NotificationsConfigurationSpec allows users to define the
37+
triggers, templates, services, context and subscriptions for the notifications
38+
properties:
39+
services:
40+
additionalProperties:
41+
type: string
42+
description: Services are used to deliver message
43+
type: object
44+
subscriptions:
45+
additionalProperties:
46+
type: string
47+
description: Subscriptions contain centrally managed global application
48+
subscriptions
49+
type: object
50+
templates:
51+
additionalProperties:
52+
type: string
53+
description: Templates are used to generate the notification template
54+
message
55+
type: object
56+
triggers:
57+
additionalProperties:
58+
type: string
59+
description: Triggers define the condition when the notification should
60+
be sent and list of templates required to generate the message Recipients
61+
can subscribe to the trigger and specify the required message template
62+
and destination notification service.
63+
type: object
64+
type: object
65+
type: object
66+
served: true
67+
storage: true
68+
subresources:
69+
status: {}
70+
status:
71+
acceptedNames:
72+
kind: ""
73+
plural: ""
74+
conditions: []
75+
storedVersions: []

bundle/manifests/gitops-operator.clusterserviceversion.yaml

Lines changed: 39 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.6.1
6+
creationTimestamp: null
7+
name: notificationsconfigurations.argoproj.io
8+
spec:
9+
group: argoproj.io
10+
names:
11+
kind: NotificationsConfiguration
12+
listKind: NotificationsConfigurationList
13+
plural: notificationsconfigurations
14+
singular: notificationsconfiguration
15+
scope: Namespaced
16+
versions:
17+
- name: v1alpha1
18+
schema:
19+
openAPIV3Schema:
20+
description: NotificationsConfiguration is the Schema for the NotificationsConfiguration
21+
API
22+
properties:
23+
apiVersion:
24+
description: 'APIVersion defines the versioned schema of this representation
25+
of an object. Servers should convert recognized schemas to the latest
26+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
27+
type: string
28+
kind:
29+
description: 'Kind is a string value representing the REST resource this
30+
object represents. Servers may infer this from the endpoint the client
31+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
32+
type: string
33+
metadata:
34+
type: object
35+
spec:
36+
description: NotificationsConfigurationSpec allows users to define the
37+
triggers, templates, services, context and subscriptions for the notifications
38+
properties:
39+
services:
40+
additionalProperties:
41+
type: string
42+
description: Services are used to deliver message
43+
type: object
44+
subscriptions:
45+
additionalProperties:
46+
type: string
47+
description: Subscriptions contain centrally managed global application
48+
subscriptions
49+
type: object
50+
templates:
51+
additionalProperties:
52+
type: string
53+
description: Templates are used to generate the notification template
54+
message
55+
type: object
56+
triggers:
57+
additionalProperties:
58+
type: string
59+
description: Triggers define the condition when the notification should
60+
be sent and list of templates required to generate the message Recipients
61+
can subscribe to the trigger and specify the required message template
62+
and destination notification service.
63+
type: object
64+
type: object
65+
type: object
66+
served: true
67+
storage: true
68+
subresources:
69+
status: {}
70+
status:
71+
acceptedNames:
72+
kind: ""
73+
plural: ""
74+
conditions: []
75+
storedVersions: []

config/crd/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ resources:
77
- bases/argoproj.io_appprojects.yaml
88
- bases/argoproj.io_applicationsets.yaml
99
- bases/argoproj.io_argocds.yaml
10+
- bases/argoproj.io_notificationsconfigurations.yaml
1011
- bases/analysis-run-crd.yaml
1112
- bases/analysis-template-crd.yaml
1213
- bases/argoproj.io_rolloutmanagers.yaml

config/rbac/role.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@ rules:
218218
- patch
219219
- update
220220
- watch
221+
- apiGroups:
222+
- argoproj.io
223+
resources:
224+
- notificationsconfigurations
225+
- notificationsconfigurations/finalizers
226+
verbs:
227+
- '*'
221228
- apiGroups:
222229
- argoproj.io
223230
resources:

0 commit comments

Comments
 (0)