From ddf0de47dd100b0cadd1f941bc9a5eb8c121a060 Mon Sep 17 00:00:00 2001
From: Nicolas Pernoud <github@ninico.fr>
Date: Fri, 17 Mar 2023 11:18:27 +0100
Subject: [PATCH] fix: dashboard ingress

---
 debug/ubuntu.yml                                 | 16 ++++++++++++++++
 .../wazuh-dashboard/dashboard-ingress.yaml       |  5 ++---
 .../wazuh-dashboard/dashboard-svc.yaml           |  2 +-
 .../dashboard_conf/opensearch_dashboards.yml     | 10 +++++-----
 4 files changed, 24 insertions(+), 9 deletions(-)
 create mode 100644 debug/ubuntu.yml

diff --git a/debug/ubuntu.yml b/debug/ubuntu.yml
new file mode 100644
index 0000000..1ab14b8
--- /dev/null
+++ b/debug/ubuntu.yml
@@ -0,0 +1,16 @@
+apiVersion: v1
+kind: Pod
+metadata:
+  namespace: wazuh
+  name: ubuntu
+  labels:
+    app: ubuntu
+spec:
+  containers:
+    - image: ubuntu
+      command:
+        - "sleep"
+        - "604800"
+      imagePullPolicy: IfNotPresent
+      name: ubuntu
+  restartPolicy: Always
diff --git a/wazuh/indexer_stack/wazuh-dashboard/dashboard-ingress.yaml b/wazuh/indexer_stack/wazuh-dashboard/dashboard-ingress.yaml
index b9e344a..6a28d89 100644
--- a/wazuh/indexer_stack/wazuh-dashboard/dashboard-ingress.yaml
+++ b/wazuh/indexer_stack/wazuh-dashboard/dashboard-ingress.yaml
@@ -37,7 +37,6 @@ spec:
             pathType: Prefix
             backend:
               service:
-                name: wazuh-dashboard
+                name: dashboard
                 port:
-                  name: dashboard-https
-
+                  name: dashboard-http
diff --git a/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml b/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml
index 7313799..b9dacad 100644
--- a/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml
+++ b/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml
@@ -18,6 +18,6 @@ spec:
   selector:
     app: wazuh-dashboard
   ports:
-    - name: dashboard
+    - name: dashboard-http
       port: 80
       targetPort: 5601
diff --git a/wazuh/indexer_stack/wazuh-dashboard/dashboard_conf/opensearch_dashboards.yml b/wazuh/indexer_stack/wazuh-dashboard/dashboard_conf/opensearch_dashboards.yml
index 86ab25c..0361f23 100644
--- a/wazuh/indexer_stack/wazuh-dashboard/dashboard_conf/opensearch_dashboards.yml
+++ b/wazuh/indexer_stack/wazuh-dashboard/dashboard_conf/opensearch_dashboards.yml
@@ -1,13 +1,13 @@
-
 server.host: 0.0.0.0
 server.port: 5601
 opensearch.hosts: https://indexer:9200
 opensearch.ssl.verificationMode: none
-opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]
+opensearch.requestHeadersWhitelist: [authorization, securitytenant]
 opensearch_security.multitenancy.enabled: false
 opensearch_security.readonly_mode.roles: ["kibana_read_only"]
-server.ssl.enabled: true
+server.ssl.enabled: false
 server.ssl.key: "/usr/share/wazuh-dashboard/config/certs/key.pem"
 server.ssl.certificate: "/usr/share/wazuh-dashboard/config/certs/cert.pem"
-opensearch.ssl.certificateAuthorities: ["/usr/share/wazuh-dashboard/config/certs/root-ca.pem"]
-uiSettings.overrides.defaultRoute: /app/wazuh
\ No newline at end of file
+opensearch.ssl.certificateAuthorities:
+  ["/usr/share/wazuh-dashboard/config/certs/root-ca.pem"]
+uiSettings.overrides.defaultRoute: /app/wazuh
-- 
GitLab