Skip to content

Commit 1daa224

Browse files
authored
Merge pull request #100 from DataDog/add-k8s-rum
Add k8s rum
2 parents a9c0b44 + 920d7fa commit 1daa224

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

k8s-manifests/README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ helm install my-datadog-operator datadog/datadog-operator
160160
2. Create a Kubernetes secret with your Datadog API and app keys:
161161

162162
```bash
163-
kubectl create secret generic datadog-secret --from-literal api-key=$DD_API_KEY --from-literal app-key=$DD_APP_KEY
163+
kubectl create secret generic datadog-secret \
164+
--from-literal api-key=$DD_API_KEY \
165+
--from-literal app-key=$DD_APP_KEY
164166
```
165167

166168
2. Apply the Datadog Agent definition:
@@ -183,30 +185,51 @@ kubectl apply -R -f k8s-manifests/cluster-setup/
183185

184186
2. **Deploy the Storedog Application:**
185187

186-
This command creates a `storedog` namespace and deploys all application components into it.
188+
The following command creates a `storedog` namespace.
187189

188190
```bash
189191
kubectl create namespace storedog
192+
```
193+
194+
3. **Create Secrets for Datadog RUM:**
195+
196+
The following command creates a Kubernetes secret with your Datadog RUM app id and client token keys:
197+
198+
> [!IMPORTANT]
199+
> Change the namespace from `storedog` if needed.
200+
201+
```bash
202+
kubectl create secret generic datadog-secret \
203+
--from-literal=dd_application_id=${DD_APPLICATION_ID} \
204+
--from-literal=dd_client_token=${DD_CLIENT_TOKEN} \
205+
-n storedog
206+
```
207+
208+
3. **Deploy the Storedog Application:**
209+
210+
The following command deploys all application components into it.
211+
212+
```bash
190213
for file in k8s-manifests/storedog-app/**/*.yaml; do envsubst < "$file" | kubectl apply -n storedog -f -; done
191214
```
192215

193-
3. **Apply manifest changes to one service:**
216+
4. **Apply manifest changes to one service:**
194217

195218
While testing, you might change one manifest file. Rather than update all at once, you can apply the change like this.
196219

197220
```bash
198221
envsubst < k8s-manifests/storedog-app/deployments/backend.yaml | kubectl apply -n storedog -f -
199222
```
200223

201-
4. **To reset the all Storedog:**
224+
5. **To reset the all Storedog:**
202225

203226
You only need to delete the application's namespace. The cluster components can remain installed.
204227

205228
```bash
206229
kubectl delete namespace storedog
207230
```
208231

209-
5. **To restart one service:**
232+
6. **To restart one service:**
210233

211234
After rebuilding a container image, it's faster to restart only the service you need.
212235

k8s-manifests/storedog-app/deployments/frontend.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ spec:
8484
configMapKeyRef:
8585
name: storedog-config
8686
key: NEXT_PUBLIC_SPREE_ALLOWED_IMAGE_DOMAIN
87+
- name: NEXT_PUBLIC_DD_APPLICATION_ID
88+
valueFrom:
89+
secretKeyRef:
90+
name: datadog-secret
91+
key: dd_application_id
92+
- name: NEXT_PUBLIC_DD_CLIENT_TOKEN
93+
valueFrom:
94+
secretKeyRef:
95+
name: datadog-secret
96+
key: dd_client_token
8797
- name: DD_ENV
8898
value: ${DD_ENV}
8999
- name: DD_SERVICE

services/dbm/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ helm install my-datadog-operator datadog/datadog-operator
186186
2. Create a Kubernetes secret with your Datadog API and app keys:
187187

188188
```bash
189-
kubectl create secret generic datadog-secret --from-literal api-key=$DD_API_KEY --from-literal app-key=$DD_APP_KEY
189+
kubectl create secret generic datadog-secret \
190+
--from-literal api-key=$DD_API_KEY \
191+
--from-literal app-key=$DD_APP_KEY \
192+
--from-literal=dd_application_id=${DD_APPLICATION_ID} \
193+
--from-literal=dd_client_token=${DD_CLIENT_TOKEN}
190194
```
191195

192196
#### Deploy Storedog with store-dbm

0 commit comments

Comments
 (0)