diff --git a/k8s-manifests/README.md b/k8s-manifests/README.md index 9c776a47..7bdc7606 100644 --- a/k8s-manifests/README.md +++ b/k8s-manifests/README.md @@ -165,7 +165,7 @@ kubectl create secret generic datadog-secret \ --from-literal app-key=$DD_APP_KEY ``` -2. Apply the Datadog Agent definition: +3. Apply the Datadog Agent definition: ```bash kubectl apply -f k8s-manifests/datadog/datadog-agent.yaml @@ -205,7 +205,7 @@ kubectl create secret generic datadog-secret \ -n storedog ``` -3. **Deploy the Storedog Application:** +4. **Deploy the Storedog Application:** This command deploys all application components into it. @@ -213,31 +213,49 @@ This command deploys all application components into it. for file in k8s-manifests/storedog-app/**/*.yaml; do envsubst < "$file" | kubectl apply -n storedog -f -; done ``` -4. **Apply manifest changes to one service:** + - **Apply manifest changes to one service:** -While testing, you might change one manifest file. Rather than update all at once, you can apply the change like this. + While testing, you might change one manifest file. Rather than update all at once, you can apply the change like this. + + ```bash + envsubst < k8s-manifests/storedog-app/deployments/backend.yaml | kubectl apply -n storedog -f - + ``` + +5. **Deploy Puppeteer:** + +The following command creates a `fake-traffic` namespace. ```bash -envsubst < k8s-manifests/storedog-app/deployments/backend.yaml | kubectl apply -n storedog -f - +kubectl create namespace fake-traffic ``` -5. **To reset the all Storedog:** +6. **Deploy Puppeteer:** -You only need to delete the application's namespace. The cluster components can remain installed. +> [!IMPORTANT] +> If you're using a namespace other than `storedog`, you must edit the `STOREDOG_URL` in `puppeteer.yaml`. + +The following command sets variables and deploys Puppeteer. ```bash -kubectl delete namespace storedog +envsubst < k8s-manifests/fake-traffic/puppeteer.yaml | kubectl apply -f - ``` -6. **To restart one service:** +## Troubleshooting + +- Reset the all Storedog: -After rebuilding a container image, it's faster to restart only the service you need. +> [!NOTE] +> You only need to delete the application's namespace. The cluster components can remain installed. ```bash -kubectl rollout restart deployment backend -n storedog +kubectl delete namespace storedog ``` -## Troubleshooting +- Restart one service: + +```bash +kubectl rollout restart deployment -n storedog ads +``` - Check pod status in the namespace: diff --git a/k8s-manifests/storedog-app/deployments/puppeteer.yaml b/k8s-manifests/fake-traffic/puppeteer.yaml similarity index 88% rename from k8s-manifests/storedog-app/deployments/puppeteer.yaml rename to k8s-manifests/fake-traffic/puppeteer.yaml index b39feed2..6db673a3 100644 --- a/k8s-manifests/storedog-app/deployments/puppeteer.yaml +++ b/k8s-manifests/fake-traffic/puppeteer.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: puppeteer + namespace: fake-traffic spec: replicas: 1 selector: @@ -17,7 +18,8 @@ spec: image: ${REGISTRY_URL}/puppeteer:${SD_TAG} env: - name: STOREDOG_URL - value: "http://service-proxy" + # Change namespace as needed + value: "http://service-proxy.storedog.svc.cluster.local" - name: PUPPETEER_TIMEOUT value: "30000" - name: SKIP_SESSION_CLOSE