From 294eb968538ef64ad1eca79a3f0e3e67767bf6c3 Mon Sep 17 00:00:00 2001 From: Vihas Splunk Date: Mon, 28 Aug 2023 14:36:55 +0530 Subject: [PATCH] fix: temprorily disable local installion for splunk --- .github/workflows/ci_build_test.yaml | 7 ++++--- Gemfile.lock | 8 ++++---- ci_scripts/k8s-splunk.yml | 2 +- docker/Gemfile | 2 +- docker/Gemfile.lock | 8 ++++---- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_build_test.yaml b/.github/workflows/ci_build_test.yaml index 1e5ff51..5209968 100644 --- a/.github/workflows/ci_build_test.yaml +++ b/.github/workflows/ci_build_test.yaml @@ -63,13 +63,12 @@ jobs: CI_SPLUNK_PORT: 8089 CI_SPLUNK_USERNAME: admin CI_SPLUNK_HEC_TOKEN: a6b5e77f-d5f6-415a-bd43-930cecb12959 - CI_SPLUNK_PASSWORD: helloworld + CI_SPLUNK_PASSWORD: changeme2 CI_INDEX_EVENTS: ci_events CI_INDEX_OBJECTS: ci_objects CI_INDEX_METRICS: ci_metrics - # CI_SPLUNK_HOST: ${{ secrets.CI_SPLUNK_HOST }} KUBERNETES_VERSION: v1.23.2 - MINIKUBE_VERSION: v1.24.0 + MINIKUBE_VERSION: latest MINIKUBE_NODE_COUNTS: 2 GITHUB_ACTIONS: true @@ -159,6 +158,8 @@ jobs: curl -X POST -u $CI_SPLUNK_USERNAME:$CI_SPLUNK_PASSWORD -k https://$CI_SPLUNK_HOST:$CI_SPLUNK_PORT/servicesNS/nobody/splunk_httpinput/data/inputs/http/http/enable # Create new HEC token curl -X POST -u $CI_SPLUNK_USERNAME:$CI_SPLUNK_PASSWORD -k -d "name=splunk_hec_token&token=a6b5e77f-d5f6-415a-bd43-930cecb12959&disabled=0&index=default-events&indexes=default-events,$CI_INDEX_METRICS,$CI_INDEX_OBJECTS,$CI_INDEX_EVENTS,ns-anno,pod-anno" https://$CI_SPLUNK_HOST:$CI_SPLUNK_PORT/servicesNS/nobody/splunk_httpinput/data/inputs/http + # lower the limit to 50MiB. Higher limits throws error 'Search not executed XXXX' + kubectl exec -it splunk -- bash -c 'echo -e "\n[diskUsage]\nminFreeSpace = 50" >> /opt/splunk/etc/system/local/server.conf' # Restart Splunk curl -k -u $CI_SPLUNK_USERNAME:$CI_SPLUNK_PASSWORD https://$CI_SPLUNK_HOST:$CI_SPLUNK_PORT/services/server/control/restart -X POST diff --git a/Gemfile.lock b/Gemfile.lock index 51f9566..cf2bbef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,9 +13,9 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activesupport (7.0.4.3) + activemodel (7.0.7.2) + activesupport (= 7.0.7.2) + activesupport (7.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -89,7 +89,7 @@ GEM power_assert (2.0.1) prometheus-client (4.0.0) public_suffix (4.0.6) - rack (3.0.6.1) + rack (3.0.8) rack-oauth2 (1.21.2) activesupport attr_required diff --git a/ci_scripts/k8s-splunk.yml b/ci_scripts/k8s-splunk.yml index 543c6ca..e3c0883 100644 --- a/ci_scripts/k8s-splunk.yml +++ b/ci_scripts/k8s-splunk.yml @@ -26,6 +26,6 @@ spec: - name: SPLUNK_USER value: root - name: SPLUNK_PASSWORD - value: helloworld + value: changeme2 - name: SPLUNK_LAUNCH_CONF value: OPTIMISTIC_ABOUT_FILE_LOCKING=1 diff --git a/docker/Gemfile b/docker/Gemfile index 2890093..4d7f4d3 100644 --- a/docker/Gemfile +++ b/docker/Gemfile @@ -15,13 +15,13 @@ gem 'multi_json', '~> 1.13' gem 'net-http-persistent', '~> 4.0' gem 'openid_connect', '~> 1.1.8' gem 'prometheus-client', '=2.1.0' -gem 'activesupport', '~> 7.0.4.3' gem 'http_parser.rb', '=0.8.0' gem "rack", ">=3.0.0" gem "fluent-plugin-record-modifier", ">=2.1" gem 'json-jwt', '~> 1.15.0' gem 'rack-oauth2', '~> 1.19' gem 'cgi', '~> 0.3.6' +gem 'date', '~> 3.3.3' gem 'fluent-plugin-splunk-hec', path: 'gem/' diff --git a/docker/Gemfile.lock b/docker/Gemfile.lock index 0078b27..db80b6d 100644 --- a/docker/Gemfile.lock +++ b/docker/Gemfile.lock @@ -24,9 +24,9 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activesupport (7.0.4.3) + activemodel (7.0.7.2) + activesupport (= 7.0.7.2) + activesupport (7.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -172,8 +172,8 @@ PLATFORMS ruby DEPENDENCIES - activesupport (~> 7.0.4.3) cgi (~> 0.3.6) + date (~> 3.3.3) fluent-plugin-concat (= 2.4.0) fluent-plugin-jq (= 0.5.1) fluent-plugin-kubernetes_metadata_filter (~> 3.1)