Skip to content

Commit 493930b

Browse files
committed
Fix sample and YAML annotated names
1 parent f60df57 commit 493930b

File tree

2 files changed

+131
-6
lines changed

2 files changed

+131
-6
lines changed

api/v1/atlasintegration_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ type DatadogIntegration struct {
121121
type MicrosoftTeamsIntegration struct {
122122
// URLSecret is the name of a secret containing the microsoft teams secret URL
123123
// +kubebuilder:validation:Required
124-
URLSecret string `json:"apiKeySecret"`
124+
URLSecret string `json:"urlSecret"`
125125
}
126126

127127
type NewRelicIntegration struct {
@@ -160,17 +160,17 @@ type PrometheusIntegration struct {
160160
// ServiceDiscovery to be used by Prometheus
161161
// +kubebuilder:validation:Enum:=file;http
162162
// +kubebuilder:validation:Required
163-
ServiceDiscovery string `json:"region"`
163+
ServiceDiscovery string `json:"serviceDiscovery"`
164164

165165
// Enabled flags whether or not Prometheus integration is enabled
166166
// +kubebuilder:validation:Required
167-
Enabled bool `json:"sendCollectionLatencyMetrics"`
167+
Enabled bool `json:"enabled"`
168168
}
169169

170170
type SlackIntegration struct {
171171
// APITokenSecret is the name of a secret containing the Slack API token
172172
// +kubebuilder:validation:Required
173-
APITokenSecret string `json:"usernameSecret"`
173+
APITokenSecret string `json:"apiTokenSecret"`
174174

175175
// ChannelName to be used by Prometheus
176176
// +kubebuilder:validation:Required
@@ -194,7 +194,7 @@ type VictorOpsIntegration struct {
194194
type WebhookIntegration struct {
195195
// URLSecret is the name of a secret containing Webhook URL and secret
196196
// +kubebuilder:validation:Required
197-
URLSecret string `json:"keySecret"`
197+
URLSecret string `json:"urlSecret"`
198198
}
199199

200200
// +kubebuilder:object:root=true

config/samples/atlas_v1_atlasintegration.yaml

Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,129 @@ metadata:
66
app.kubernetes.io/managed-by: kustomize
77
name: atlasintegration-sample
88
spec:
9-
# TODO(user): Add fields here
9+
projectRef:
10+
name: my-atlas-project
11+
type: DATADOG
12+
datadog:
13+
apiKeySecret: "datadog-apikey-secret-ref"
14+
region: "datadog-region"
15+
---
16+
apiVersion: atlas.mongodb.com/v1
17+
kind: AtlasIntegration
18+
metadata:
19+
labels:
20+
app.kubernetes.io/name: mongodb-atlas-kubernetes
21+
app.kubernetes.io/managed-by: kustomize
22+
name: atlasintegration-sample
23+
spec:
24+
externalProjectRef:
25+
id: "project-id"
26+
connectionSecret: "conn-secret-ref"
27+
type: MICROSOFT_TEAMS
28+
microsoftTeams:
29+
urlSecret: "ms-url-secret-ref"
30+
---
31+
apiVersion: atlas.mongodb.com/v1
32+
kind: AtlasIntegration
33+
metadata:
34+
labels:
35+
app.kubernetes.io/name: mongodb-atlas-kubernetes
36+
app.kubernetes.io/managed-by: kustomize
37+
name: atlasintegration-sample
38+
spec:
39+
projectRef:
40+
name: my-atlas-project
41+
type: NEW_RELIC
42+
newRelic:
43+
credentialsSecret: "ms-url-secret-ref"
44+
---
45+
apiVersion: atlas.mongodb.com/v1
46+
kind: AtlasIntegration
47+
metadata:
48+
labels:
49+
app.kubernetes.io/name: mongodb-atlas-kubernetes
50+
app.kubernetes.io/managed-by: kustomize
51+
name: atlasintegration-sample
52+
spec:
53+
projectRef:
54+
name: my-atlas-project
55+
type: OPS_GENIE
56+
opsGenie:
57+
apiKeySecret: "ops-genie-apikey-secret-ref"
58+
region: "ops-genie-region"
59+
---
60+
apiVersion: atlas.mongodb.com/v1
61+
kind: AtlasIntegration
62+
metadata:
63+
labels:
64+
app.kubernetes.io/name: mongodb-atlas-kubernetes
65+
app.kubernetes.io/managed-by: kustomize
66+
name: atlasintegration-sample
67+
spec:
68+
projectRef:
69+
name: my-atlas-project
70+
type: PAGER_DUTY
71+
pagerDuty:
72+
serviceKeySecret: "pagerduty-service-key-secret-ref"
73+
region: "pagerduty-region"
74+
---
75+
apiVersion: atlas.mongodb.com/v1
76+
kind: AtlasIntegration
77+
metadata:
78+
labels:
79+
app.kubernetes.io/name: mongodb-atlas-kubernetes
80+
app.kubernetes.io/managed-by: kustomize
81+
name: atlasintegration-sample
82+
spec:
83+
projectRef:
84+
name: my-atlas-project
85+
type: PROMETHEUS
86+
prometheus:
87+
prometheusCredentials: "prometheus-credentials-ref"
88+
serviceDiscovery: "serice-discovery"
89+
enabled: true
90+
---
91+
apiVersion: atlas.mongodb.com/v1
92+
kind: AtlasIntegration
93+
metadata:
94+
labels:
95+
app.kubernetes.io/name: mongodb-atlas-kubernetes
96+
app.kubernetes.io/managed-by: kustomize
97+
name: atlasintegration-sample
98+
spec:
99+
projectRef:
100+
name: my-atlas-project
101+
type: SLACK
102+
slack:
103+
apiTokenSecret: "slack-apitoken-secret-ref"
104+
channelName: "channel-name"
105+
teamName: "team-name"
106+
---
107+
apiVersion: atlas.mongodb.com/v1
108+
kind: AtlasIntegration
109+
metadata:
110+
labels:
111+
app.kubernetes.io/name: mongodb-atlas-kubernetes
112+
app.kubernetes.io/managed-by: kustomize
113+
name: atlasintegration-sample
114+
spec:
115+
projectRef:
116+
name: my-atlas-project
117+
type: VICTOR_OPS
118+
victorOps:
119+
routingKey: "victorops-routingkey"
120+
apiKeySecret: "victorops-apikey-secret-ref"
121+
---
122+
apiVersion: atlas.mongodb.com/v1
123+
kind: AtlasIntegration
124+
metadata:
125+
labels:
126+
app.kubernetes.io/name: mongodb-atlas-kubernetes
127+
app.kubernetes.io/managed-by: kustomize
128+
name: atlasintegration-sample
129+
spec:
130+
projectRef:
131+
name: my-atlas-project
132+
type: WEBHOOK
133+
webhook:
134+
urlSecret: "webhook-urlsecret-ref"

0 commit comments

Comments
 (0)