From c1edd1411418aa7d5d5655a34a36071c0b82559f Mon Sep 17 00:00:00 2001 From: Gabriel J Mendoza Date: Fri, 20 Mar 2026 10:45:18 -0400 Subject: [PATCH 1/9] Update Splunk Enterprise version from 10.0.0 to 10.2.0 Co-Authored-By: Claude Opus 4.6 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 28360f2d8..599249271 100644 --- a/.env +++ b/.env @@ -8,4 +8,4 @@ EKSCTL_VERSION=v0.215.0 EKS_CLUSTER_K8_VERSION=1.34 EKS_INSTANCE_TYPE=m5.2xlarge EKS_INSTANCE_TYPE_ARM64=c6g.4xlarge -SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:10.0.0 \ No newline at end of file +SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:10.2.0 \ No newline at end of file From 8336d9b2d78ad1c847e17d9d0e41a37d9aeb824f Mon Sep 17 00:00:00 2001 From: Gabriel J Mendoza Date: Mon, 23 Mar 2026 10:42:51 -0400 Subject: [PATCH 2/9] fixing splunk enterprise version for helm-charts --- helm-chart/splunk-operator/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/splunk-operator/values.yaml b/helm-chart/splunk-operator/values.yaml index 8fda5dc76..8df1be052 100644 --- a/helm-chart/splunk-operator/values.yaml +++ b/helm-chart/splunk-operator/values.yaml @@ -3,7 +3,7 @@ splunk-operator: # Splunk image image: - repository: docker.io/splunk/splunk:10.0.0 + repository: docker.io/splunk/splunk:10.2.0 # Splunk Operator configurations splunkOperator: From c3828cd00276d4f2f378d5fb39097569e7c7bb56 Mon Sep 17 00:00:00 2001 From: vivekr-splunk <94569031+vivekr-splunk@users.noreply.github.com> Date: Wed, 8 Apr 2026 12:59:42 -0700 Subject: [PATCH 3/9] fix: handle app download dir stat errors (#1817) * fix: handle app download dir stat errors * cleanup createAppDownloadDir review feedback --- pkg/splunk/enterprise/util.go | 12 +++--------- pkg/splunk/enterprise/util_test.go | 9 ++++++++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pkg/splunk/enterprise/util.go b/pkg/splunk/enterprise/util.go index fd7900787..3c16f0d81 100644 --- a/pkg/splunk/enterprise/util.go +++ b/pkg/splunk/enterprise/util.go @@ -543,18 +543,12 @@ func getBundlePushState(afwPipeline *AppInstallPipeline) enterpriseApi.BundlePus } // createAppDownloadDir creates the app download directory on the operator pod -func createAppDownloadDir(ctx context.Context, path string) error { - reqLogger := log.FromContext(ctx) - scopedLog := reqLogger.WithName("createAppDownloadDir").WithValues("path", path) +func createAppDownloadDir(_ context.Context, path string) error { _, err := os.Stat(path) if errors.Is(err, os.ErrNotExist) { - errDir := os.MkdirAll(path, 0700) - if errDir != nil { - scopedLog.Error(errDir, "Unable to create directory at path") - return errDir - } + return os.MkdirAll(path, 0700) } - return nil + return err } // getAvailableDiskSpace returns the disk space available to download apps at volume "/opt/splunk/appframework" diff --git a/pkg/splunk/enterprise/util_test.go b/pkg/splunk/enterprise/util_test.go index 7168e366a..9e1ce9d16 100644 --- a/pkg/splunk/enterprise/util_test.go +++ b/pkg/splunk/enterprise/util_test.go @@ -22,6 +22,7 @@ import ( //"io" "os" + "path/filepath" "strconv" "strings" "testing" @@ -1196,7 +1197,13 @@ func TestCreateAppDownloadDir(t *testing.T) { t.Errorf("Didn't expect error") } - err = createAppDownloadDir(ctx, "/xyzzz.txt") + blockerFile, err := os.CreateTemp(t.TempDir(), "app-download-dir-blocker") + if err != nil { + t.Fatalf("failed to create blocker file: %v", err) + } + defer blockerFile.Close() + + err = createAppDownloadDir(ctx, filepath.Join(blockerFile.Name(), "child")) if err == nil { t.Errorf("Expected error") } From 0e9e2d32bcd914b1b381508c4904436a7c498b22 Mon Sep 17 00:00:00 2001 From: vivekr-splunk <94569031+vivekr-splunk@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:17:04 -0700 Subject: [PATCH 4/9] migration: add GitHub intake workflows for GitLab handoff (#1810) * migration: add GitHub intake workflows for GitLab handoff * intake: move GitHub intake scripts under tools * intake: preserve script modes after move --- .github/workflows/github-intake-issue.yml | 37 ++++++ .github/workflows/github-intake-pr.yml | 39 +++++++ tools/github-intake/issue-intake.sh | 81 +++++++++++++ tools/github-intake/lib/intake-common.sh | 136 ++++++++++++++++++++++ tools/github-intake/pr-intake.sh | 102 ++++++++++++++++ 5 files changed, 395 insertions(+) create mode 100644 .github/workflows/github-intake-issue.yml create mode 100644 .github/workflows/github-intake-pr.yml create mode 100755 tools/github-intake/issue-intake.sh create mode 100755 tools/github-intake/lib/intake-common.sh create mode 100755 tools/github-intake/pr-intake.sh diff --git a/.github/workflows/github-intake-issue.yml b/.github/workflows/github-intake-issue.yml new file mode 100644 index 000000000..4b2fa0b04 --- /dev/null +++ b/.github/workflows/github-intake-issue.yml @@ -0,0 +1,37 @@ +name: GitHub Issue Intake + +on: + issues: + types: + - opened + - reopened + - edited + +permissions: + contents: read + issues: write + +concurrency: + group: github-intake-issue-${{ github.event.issue.number }} + cancel-in-progress: false + +jobs: + intake: + runs-on: ubuntu-latest + steps: + - name: Checkout trusted automation from default branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.repository.default_branch }} + persist-credentials: false + + - name: Sync issue metadata into GitLab + env: + GITHUB_BACKLINK_MODE: ${{ vars.INTAKE_BACKLINK_MODE || 'none' }} + GITHUB_API_URL: ${{ github.api_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITLAB_BASE_URL: ${{ vars.GITLAB_BASE_URL }} + GITLAB_PROJECT_PATH: ${{ vars.GITLAB_PROJECT_PATH }} + GITLAB_API_TOKEN: ${{ secrets.GITLAB_INTAKE_TOKEN }} + GITLAB_INTAKE_LABEL: ${{ vars.GITLAB_INTAKE_LABEL || 'github-intake,github-intake::issue' }} + run: bash tools/github-intake/issue-intake.sh diff --git a/.github/workflows/github-intake-pr.yml b/.github/workflows/github-intake-pr.yml new file mode 100644 index 000000000..509b7a3a5 --- /dev/null +++ b/.github/workflows/github-intake-pr.yml @@ -0,0 +1,39 @@ +name: GitHub PR Intake + +on: + pull_request_target: + types: + - opened + - reopened + - synchronize + - edited + +permissions: + contents: read + issues: write + pull-requests: write + +concurrency: + group: github-intake-pr-${{ github.event.pull_request.number }} + cancel-in-progress: false + +jobs: + intake: + runs-on: ubuntu-latest + steps: + - name: Checkout trusted base-repository automation only + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.base.sha }} + persist-credentials: false + + - name: Sync PR metadata into GitLab intake record + env: + GITHUB_BACKLINK_MODE: ${{ vars.INTAKE_BACKLINK_MODE || 'none' }} + GITHUB_API_URL: ${{ github.api_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITLAB_BASE_URL: ${{ vars.GITLAB_BASE_URL }} + GITLAB_PROJECT_PATH: ${{ vars.GITLAB_PROJECT_PATH }} + GITLAB_API_TOKEN: ${{ secrets.GITLAB_INTAKE_TOKEN }} + GITLAB_INTAKE_LABEL: ${{ vars.GITLAB_INTAKE_LABEL || 'github-intake,github-intake::pr' }} + run: bash tools/github-intake/pr-intake.sh diff --git a/tools/github-intake/issue-intake.sh b/tools/github-intake/issue-intake.sh new file mode 100755 index 000000000..b19185fd7 --- /dev/null +++ b/tools/github-intake/issue-intake.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +. "${ROOT_DIR}/github-intake/lib/intake-common.sh" + +require_env GITHUB_EVENT_PATH +require_env GITHUB_REPOSITORY +require_env GITHUB_SERVER_URL +require_env GITHUB_API_URL +require_env GITLAB_BASE_URL +require_env GITLAB_PROJECT_PATH +require_env GITLAB_API_TOKEN + +EVENT_JSON="$(python3 - "${GITHUB_EVENT_PATH}" <<'PY' +import json +import sys + +event = json.load(open(sys.argv[1])) +issue = event["issue"] +payload = { + "number": issue["number"], + "title": issue["title"], + "body": issue.get("body") or "", + "html_url": issue["html_url"], + "author": issue["user"]["login"], + "state": issue["state"], +} +print(json.dumps(payload)) +PY +)" + +ISSUE_NUMBER="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["number"])' "${EVENT_JSON}")" +ISSUE_TITLE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["title"])' "${EVENT_JSON}")" +ISSUE_BODY="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["body"])' "${EVENT_JSON}")" +ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["html_url"])' "${EVENT_JSON}")" +ISSUE_AUTHOR="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["author"])' "${EVENT_JSON}")" +ISSUE_STATE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["state"])' "${EVENT_JSON}")" + +MARKER="github-intake:issue:${GITHUB_REPOSITORY}#${ISSUE_NUMBER}" +LABELS="${GITLAB_INTAKE_LABEL:-github-intake,github-intake::issue}" +EXISTING="$(gitlab_find_issue_by_marker "${MARKER}")" + +if [[ -n "${EXISTING}" ]]; then + GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${EXISTING}")" + echo "GitLab issue already exists: ${GITLAB_ISSUE_URL}" +else + DESCRIPTION="$(cat < +# GitHub Issue Intake + +- Source issue: ${ISSUE_URL} +- Source repository: ${GITHUB_REPOSITORY} +- Source author: ${ISSUE_AUTHOR} +- Source state: ${ISSUE_STATE} +- Intake marker: \`${MARKER}\` + +## GitHub Body + +\`\`\` +${ISSUE_BODY} +\`\`\` +EOF +)" + + CREATED="$(gitlab_create_issue "[GitHub Issue #${ISSUE_NUMBER}] ${ISSUE_TITLE}" "${DESCRIPTION}" "${LABELS}")" + GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${CREATED}")" + echo "Created GitLab issue: ${GITLAB_ISSUE_URL}" +fi + +maybe_post_backlink_comment \ + "${ISSUE_NUMBER}" \ + "${MARKER}" \ + "Tracked in GitLab: ${GITLAB_ISSUE_URL}\n\nMarker: \`${MARKER}\`" + +cat <&2 + exit 1 + fi +} + +urlencode() { + python3 - "$1" <<'PY' +import sys +import urllib.parse + +print(urllib.parse.quote(sys.argv[1], safe="")) +PY +} + +gitlab_project_api() { + local encoded + encoded="$(urlencode "${GITLAB_PROJECT_PATH}")" + printf '%s/api/v4/projects/%s' "${GITLAB_BASE_URL%/}" "${encoded}" +} + +gitlab_auth_header() { + printf 'PRIVATE-TOKEN: %s' "${GITLAB_API_TOKEN}" +} + +gitlab_find_issue_by_marker() { + local marker="$1" + local search_url + + search_url="$(gitlab_project_api)/issues?search=$(urlencode "${marker}")&per_page=100" + curl -fsSL \ + --header "$(gitlab_auth_header)" \ + "${search_url}" \ + | python3 - "${marker}" <<'PY' +import json +import sys + +marker = sys.argv[1] +issues = json.load(sys.stdin) +for issue in issues: + description = issue.get("description") or "" + if marker in description: + print(json.dumps({ + "iid": issue["iid"], + "web_url": issue["web_url"], + "title": issue["title"], + })) + raise SystemExit(0) +print("") +PY +} + +gitlab_create_issue() { + local title="$1" + local description="$2" + local labels="$3" + + curl -fsSL \ + --request POST \ + --header "$(gitlab_auth_header)" \ + --data-urlencode "title=${title}" \ + --data-urlencode "description=${description}" \ + --data-urlencode "labels=${labels}" \ + "$(gitlab_project_api)/issues" +} + +github_comments_api() { + local issue_number="$1" + printf '%s/repos/%s/issues/%s/comments' "${GITHUB_API_URL%/}" "${GITHUB_REPOSITORY}" "${issue_number}" +} + +github_comment_exists() { + local issue_number="$1" + local marker="$2" + + curl -fsSL \ + --header "Authorization: Bearer ${GITHUB_TOKEN}" \ + --header "Accept: application/vnd.github+json" \ + "$(github_comments_api "${issue_number}")" \ + | python3 - "${marker}" <<'PY' +import json +import sys + +marker = sys.argv[1] +comments = json.load(sys.stdin) +for comment in comments: + if marker in (comment.get("body") or ""): + raise SystemExit(0) +raise SystemExit(1) +PY +} + +github_post_comment() { + local issue_number="$1" + local body="$2" + + python3 - "${body}" <<'PY' >/tmp/github-intake-comment.json +import json +import sys + +print(json.dumps({"body": sys.argv[1]})) +PY + + curl -fsSL \ + --request POST \ + --header "Authorization: Bearer ${GITHUB_TOKEN}" \ + --header "Accept: application/vnd.github+json" \ + --header "Content-Type: application/json" \ + --data @/tmp/github-intake-comment.json \ + "$(github_comments_api "${issue_number}")" >/dev/null +} + +maybe_post_backlink_comment() { + local issue_number="$1" + local marker="$2" + local body="$3" + local mode="${GITHUB_BACKLINK_MODE:-none}" + + if [[ "${mode}" != "comment" ]]; then + echo "GitHub backlink comment skipped: mode=${mode}" + return 0 + fi + + if github_comment_exists "${issue_number}" "${marker}"; then + echo "GitHub backlink comment already present for ${marker}" + return 0 + fi + + github_post_comment "${issue_number}" "${body}" + echo "GitHub backlink comment posted for ${marker}" +} diff --git a/tools/github-intake/pr-intake.sh b/tools/github-intake/pr-intake.sh new file mode 100755 index 000000000..7b2d77904 --- /dev/null +++ b/tools/github-intake/pr-intake.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +. "${ROOT_DIR}/github-intake/lib/intake-common.sh" + +require_env GITHUB_EVENT_PATH +require_env GITHUB_REPOSITORY +require_env GITHUB_SERVER_URL +require_env GITHUB_API_URL +require_env GITLAB_BASE_URL +require_env GITLAB_PROJECT_PATH +require_env GITLAB_API_TOKEN + +EVENT_JSON="$(python3 - "${GITHUB_EVENT_PATH}" <<'PY' +import json +import sys + +event = json.load(open(sys.argv[1])) +pr = event["pull_request"] +payload = { + "number": pr["number"], + "title": pr["title"], + "body": pr.get("body") or "", + "html_url": pr["html_url"], + "author": pr["user"]["login"], + "state": pr["state"], + "draft": pr["draft"], + "head_ref": pr["head"]["ref"], + "head_sha": pr["head"]["sha"], + "head_repo": pr["head"]["repo"]["full_name"], + "base_ref": pr["base"]["ref"], + "base_sha": pr["base"]["sha"], +} +print(json.dumps(payload)) +PY +)" + +PR_NUMBER="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["number"])' "${EVENT_JSON}")" +PR_TITLE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["title"])' "${EVENT_JSON}")" +PR_BODY="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["body"])' "${EVENT_JSON}")" +PR_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["html_url"])' "${EVENT_JSON}")" +PR_AUTHOR="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["author"])' "${EVENT_JSON}")" +PR_STATE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["state"])' "${EVENT_JSON}")" +PR_DRAFT="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["draft"])' "${EVENT_JSON}")" +PR_HEAD_REF="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["head_ref"])' "${EVENT_JSON}")" +PR_HEAD_SHA="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["head_sha"])' "${EVENT_JSON}")" +PR_HEAD_REPO="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["head_repo"])' "${EVENT_JSON}")" +PR_BASE_REF="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["base_ref"])' "${EVENT_JSON}")" +PR_BASE_SHA="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["base_sha"])' "${EVENT_JSON}")" + +MARKER="github-intake:pr:${GITHUB_REPOSITORY}#${PR_NUMBER}" +LABELS="${GITLAB_INTAKE_LABEL:-github-intake,github-intake::pr}" +EXISTING="$(gitlab_find_issue_by_marker "${MARKER}")" + +if [[ -n "${EXISTING}" ]]; then + GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${EXISTING}")" + echo "GitLab intake record already exists: ${GITLAB_ISSUE_URL}" +else + DESCRIPTION="$(cat < +# GitHub PR Intake + +- Source PR: ${PR_URL} +- Source repository: ${GITHUB_REPOSITORY} +- Source author: ${PR_AUTHOR} +- Source state: ${PR_STATE} +- Draft: ${PR_DRAFT} +- Intake marker: \`${MARKER}\` +- Base branch: \`${PR_BASE_REF}\` +- Base SHA: \`${PR_BASE_SHA}\` +- Head branch: \`${PR_HEAD_REF}\` +- Head SHA: \`${PR_HEAD_SHA}\` +- Head repository: \`${PR_HEAD_REPO}\` + +This intake record is metadata-only. It is not an authoritative GitLab merge request. + +## GitHub Body + +\`\`\` +${PR_BODY} +\`\`\` +EOF +)" + + CREATED="$(gitlab_create_issue "[GitHub PR #${PR_NUMBER}] ${PR_TITLE}" "${DESCRIPTION}" "${LABELS}")" + GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${CREATED}")" + echo "Created GitLab intake record: ${GITLAB_ISSUE_URL}" +fi + +maybe_post_backlink_comment \ + "${PR_NUMBER}" \ + "${MARKER}" \ + "Tracked in GitLab intake: ${GITLAB_ISSUE_URL}\n\nMarker: \`${MARKER}\`" + +cat < Date: Fri, 10 Apr 2026 13:32:46 -0700 Subject: [PATCH 5/9] Revert "migration: add GitHub intake workflows for GitLab handoff (#1810)" (#1842) This reverts commit 0e9e2d32bcd914b1b381508c4904436a7c498b22. --- .github/workflows/github-intake-issue.yml | 37 ------ .github/workflows/github-intake-pr.yml | 39 ------- tools/github-intake/issue-intake.sh | 81 ------------- tools/github-intake/lib/intake-common.sh | 136 ---------------------- tools/github-intake/pr-intake.sh | 102 ---------------- 5 files changed, 395 deletions(-) delete mode 100644 .github/workflows/github-intake-issue.yml delete mode 100644 .github/workflows/github-intake-pr.yml delete mode 100755 tools/github-intake/issue-intake.sh delete mode 100755 tools/github-intake/lib/intake-common.sh delete mode 100755 tools/github-intake/pr-intake.sh diff --git a/.github/workflows/github-intake-issue.yml b/.github/workflows/github-intake-issue.yml deleted file mode 100644 index 4b2fa0b04..000000000 --- a/.github/workflows/github-intake-issue.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: GitHub Issue Intake - -on: - issues: - types: - - opened - - reopened - - edited - -permissions: - contents: read - issues: write - -concurrency: - group: github-intake-issue-${{ github.event.issue.number }} - cancel-in-progress: false - -jobs: - intake: - runs-on: ubuntu-latest - steps: - - name: Checkout trusted automation from default branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - persist-credentials: false - - - name: Sync issue metadata into GitLab - env: - GITHUB_BACKLINK_MODE: ${{ vars.INTAKE_BACKLINK_MODE || 'none' }} - GITHUB_API_URL: ${{ github.api_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITLAB_BASE_URL: ${{ vars.GITLAB_BASE_URL }} - GITLAB_PROJECT_PATH: ${{ vars.GITLAB_PROJECT_PATH }} - GITLAB_API_TOKEN: ${{ secrets.GITLAB_INTAKE_TOKEN }} - GITLAB_INTAKE_LABEL: ${{ vars.GITLAB_INTAKE_LABEL || 'github-intake,github-intake::issue' }} - run: bash tools/github-intake/issue-intake.sh diff --git a/.github/workflows/github-intake-pr.yml b/.github/workflows/github-intake-pr.yml deleted file mode 100644 index 509b7a3a5..000000000 --- a/.github/workflows/github-intake-pr.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: GitHub PR Intake - -on: - pull_request_target: - types: - - opened - - reopened - - synchronize - - edited - -permissions: - contents: read - issues: write - pull-requests: write - -concurrency: - group: github-intake-pr-${{ github.event.pull_request.number }} - cancel-in-progress: false - -jobs: - intake: - runs-on: ubuntu-latest - steps: - - name: Checkout trusted base-repository automation only - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.base.sha }} - persist-credentials: false - - - name: Sync PR metadata into GitLab intake record - env: - GITHUB_BACKLINK_MODE: ${{ vars.INTAKE_BACKLINK_MODE || 'none' }} - GITHUB_API_URL: ${{ github.api_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITLAB_BASE_URL: ${{ vars.GITLAB_BASE_URL }} - GITLAB_PROJECT_PATH: ${{ vars.GITLAB_PROJECT_PATH }} - GITLAB_API_TOKEN: ${{ secrets.GITLAB_INTAKE_TOKEN }} - GITLAB_INTAKE_LABEL: ${{ vars.GITLAB_INTAKE_LABEL || 'github-intake,github-intake::pr' }} - run: bash tools/github-intake/pr-intake.sh diff --git a/tools/github-intake/issue-intake.sh b/tools/github-intake/issue-intake.sh deleted file mode 100755 index b19185fd7..000000000 --- a/tools/github-intake/issue-intake.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -. "${ROOT_DIR}/github-intake/lib/intake-common.sh" - -require_env GITHUB_EVENT_PATH -require_env GITHUB_REPOSITORY -require_env GITHUB_SERVER_URL -require_env GITHUB_API_URL -require_env GITLAB_BASE_URL -require_env GITLAB_PROJECT_PATH -require_env GITLAB_API_TOKEN - -EVENT_JSON="$(python3 - "${GITHUB_EVENT_PATH}" <<'PY' -import json -import sys - -event = json.load(open(sys.argv[1])) -issue = event["issue"] -payload = { - "number": issue["number"], - "title": issue["title"], - "body": issue.get("body") or "", - "html_url": issue["html_url"], - "author": issue["user"]["login"], - "state": issue["state"], -} -print(json.dumps(payload)) -PY -)" - -ISSUE_NUMBER="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["number"])' "${EVENT_JSON}")" -ISSUE_TITLE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["title"])' "${EVENT_JSON}")" -ISSUE_BODY="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["body"])' "${EVENT_JSON}")" -ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["html_url"])' "${EVENT_JSON}")" -ISSUE_AUTHOR="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["author"])' "${EVENT_JSON}")" -ISSUE_STATE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["state"])' "${EVENT_JSON}")" - -MARKER="github-intake:issue:${GITHUB_REPOSITORY}#${ISSUE_NUMBER}" -LABELS="${GITLAB_INTAKE_LABEL:-github-intake,github-intake::issue}" -EXISTING="$(gitlab_find_issue_by_marker "${MARKER}")" - -if [[ -n "${EXISTING}" ]]; then - GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${EXISTING}")" - echo "GitLab issue already exists: ${GITLAB_ISSUE_URL}" -else - DESCRIPTION="$(cat < -# GitHub Issue Intake - -- Source issue: ${ISSUE_URL} -- Source repository: ${GITHUB_REPOSITORY} -- Source author: ${ISSUE_AUTHOR} -- Source state: ${ISSUE_STATE} -- Intake marker: \`${MARKER}\` - -## GitHub Body - -\`\`\` -${ISSUE_BODY} -\`\`\` -EOF -)" - - CREATED="$(gitlab_create_issue "[GitHub Issue #${ISSUE_NUMBER}] ${ISSUE_TITLE}" "${DESCRIPTION}" "${LABELS}")" - GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${CREATED}")" - echo "Created GitLab issue: ${GITLAB_ISSUE_URL}" -fi - -maybe_post_backlink_comment \ - "${ISSUE_NUMBER}" \ - "${MARKER}" \ - "Tracked in GitLab: ${GITLAB_ISSUE_URL}\n\nMarker: \`${MARKER}\`" - -cat <&2 - exit 1 - fi -} - -urlencode() { - python3 - "$1" <<'PY' -import sys -import urllib.parse - -print(urllib.parse.quote(sys.argv[1], safe="")) -PY -} - -gitlab_project_api() { - local encoded - encoded="$(urlencode "${GITLAB_PROJECT_PATH}")" - printf '%s/api/v4/projects/%s' "${GITLAB_BASE_URL%/}" "${encoded}" -} - -gitlab_auth_header() { - printf 'PRIVATE-TOKEN: %s' "${GITLAB_API_TOKEN}" -} - -gitlab_find_issue_by_marker() { - local marker="$1" - local search_url - - search_url="$(gitlab_project_api)/issues?search=$(urlencode "${marker}")&per_page=100" - curl -fsSL \ - --header "$(gitlab_auth_header)" \ - "${search_url}" \ - | python3 - "${marker}" <<'PY' -import json -import sys - -marker = sys.argv[1] -issues = json.load(sys.stdin) -for issue in issues: - description = issue.get("description") or "" - if marker in description: - print(json.dumps({ - "iid": issue["iid"], - "web_url": issue["web_url"], - "title": issue["title"], - })) - raise SystemExit(0) -print("") -PY -} - -gitlab_create_issue() { - local title="$1" - local description="$2" - local labels="$3" - - curl -fsSL \ - --request POST \ - --header "$(gitlab_auth_header)" \ - --data-urlencode "title=${title}" \ - --data-urlencode "description=${description}" \ - --data-urlencode "labels=${labels}" \ - "$(gitlab_project_api)/issues" -} - -github_comments_api() { - local issue_number="$1" - printf '%s/repos/%s/issues/%s/comments' "${GITHUB_API_URL%/}" "${GITHUB_REPOSITORY}" "${issue_number}" -} - -github_comment_exists() { - local issue_number="$1" - local marker="$2" - - curl -fsSL \ - --header "Authorization: Bearer ${GITHUB_TOKEN}" \ - --header "Accept: application/vnd.github+json" \ - "$(github_comments_api "${issue_number}")" \ - | python3 - "${marker}" <<'PY' -import json -import sys - -marker = sys.argv[1] -comments = json.load(sys.stdin) -for comment in comments: - if marker in (comment.get("body") or ""): - raise SystemExit(0) -raise SystemExit(1) -PY -} - -github_post_comment() { - local issue_number="$1" - local body="$2" - - python3 - "${body}" <<'PY' >/tmp/github-intake-comment.json -import json -import sys - -print(json.dumps({"body": sys.argv[1]})) -PY - - curl -fsSL \ - --request POST \ - --header "Authorization: Bearer ${GITHUB_TOKEN}" \ - --header "Accept: application/vnd.github+json" \ - --header "Content-Type: application/json" \ - --data @/tmp/github-intake-comment.json \ - "$(github_comments_api "${issue_number}")" >/dev/null -} - -maybe_post_backlink_comment() { - local issue_number="$1" - local marker="$2" - local body="$3" - local mode="${GITHUB_BACKLINK_MODE:-none}" - - if [[ "${mode}" != "comment" ]]; then - echo "GitHub backlink comment skipped: mode=${mode}" - return 0 - fi - - if github_comment_exists "${issue_number}" "${marker}"; then - echo "GitHub backlink comment already present for ${marker}" - return 0 - fi - - github_post_comment "${issue_number}" "${body}" - echo "GitHub backlink comment posted for ${marker}" -} diff --git a/tools/github-intake/pr-intake.sh b/tools/github-intake/pr-intake.sh deleted file mode 100755 index 7b2d77904..000000000 --- a/tools/github-intake/pr-intake.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -. "${ROOT_DIR}/github-intake/lib/intake-common.sh" - -require_env GITHUB_EVENT_PATH -require_env GITHUB_REPOSITORY -require_env GITHUB_SERVER_URL -require_env GITHUB_API_URL -require_env GITLAB_BASE_URL -require_env GITLAB_PROJECT_PATH -require_env GITLAB_API_TOKEN - -EVENT_JSON="$(python3 - "${GITHUB_EVENT_PATH}" <<'PY' -import json -import sys - -event = json.load(open(sys.argv[1])) -pr = event["pull_request"] -payload = { - "number": pr["number"], - "title": pr["title"], - "body": pr.get("body") or "", - "html_url": pr["html_url"], - "author": pr["user"]["login"], - "state": pr["state"], - "draft": pr["draft"], - "head_ref": pr["head"]["ref"], - "head_sha": pr["head"]["sha"], - "head_repo": pr["head"]["repo"]["full_name"], - "base_ref": pr["base"]["ref"], - "base_sha": pr["base"]["sha"], -} -print(json.dumps(payload)) -PY -)" - -PR_NUMBER="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["number"])' "${EVENT_JSON}")" -PR_TITLE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["title"])' "${EVENT_JSON}")" -PR_BODY="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["body"])' "${EVENT_JSON}")" -PR_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["html_url"])' "${EVENT_JSON}")" -PR_AUTHOR="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["author"])' "${EVENT_JSON}")" -PR_STATE="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["state"])' "${EVENT_JSON}")" -PR_DRAFT="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["draft"])' "${EVENT_JSON}")" -PR_HEAD_REF="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["head_ref"])' "${EVENT_JSON}")" -PR_HEAD_SHA="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["head_sha"])' "${EVENT_JSON}")" -PR_HEAD_REPO="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["head_repo"])' "${EVENT_JSON}")" -PR_BASE_REF="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["base_ref"])' "${EVENT_JSON}")" -PR_BASE_SHA="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["base_sha"])' "${EVENT_JSON}")" - -MARKER="github-intake:pr:${GITHUB_REPOSITORY}#${PR_NUMBER}" -LABELS="${GITLAB_INTAKE_LABEL:-github-intake,github-intake::pr}" -EXISTING="$(gitlab_find_issue_by_marker "${MARKER}")" - -if [[ -n "${EXISTING}" ]]; then - GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${EXISTING}")" - echo "GitLab intake record already exists: ${GITLAB_ISSUE_URL}" -else - DESCRIPTION="$(cat < -# GitHub PR Intake - -- Source PR: ${PR_URL} -- Source repository: ${GITHUB_REPOSITORY} -- Source author: ${PR_AUTHOR} -- Source state: ${PR_STATE} -- Draft: ${PR_DRAFT} -- Intake marker: \`${MARKER}\` -- Base branch: \`${PR_BASE_REF}\` -- Base SHA: \`${PR_BASE_SHA}\` -- Head branch: \`${PR_HEAD_REF}\` -- Head SHA: \`${PR_HEAD_SHA}\` -- Head repository: \`${PR_HEAD_REPO}\` - -This intake record is metadata-only. It is not an authoritative GitLab merge request. - -## GitHub Body - -\`\`\` -${PR_BODY} -\`\`\` -EOF -)" - - CREATED="$(gitlab_create_issue "[GitHub PR #${PR_NUMBER}] ${PR_TITLE}" "${DESCRIPTION}" "${LABELS}")" - GITLAB_ISSUE_URL="$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["web_url"])' "${CREATED}")" - echo "Created GitLab intake record: ${GITLAB_ISSUE_URL}" -fi - -maybe_post_backlink_comment \ - "${PR_NUMBER}" \ - "${MARKER}" \ - "Tracked in GitLab intake: ${GITLAB_ISSUE_URL}\n\nMarker: \`${MARKER}\`" - -cat < Date: Wed, 1 Apr 2026 11:22:47 -0400 Subject: [PATCH 6/9] CSPL-4153: Update dependencies to fix security vulnerabilities - Update google.golang.org/grpc from v1.78.0 to v1.79.3 (VULN-67797) - Update github.com/buger/jsonparser from v1.1.1 to v1.1.2 (VULN-67794) - Update Go stdlib from 1.25.7 to 1.25.8 (VULN-65734) - Update gnutls via explicit microdnf update (VULN-69140) - Update other dependencies to latest compatible versions Fixes: VULN-67797, VULN-67794, VULN-65734, VULN-69140 Co-Authored-By: Claude Opus 4.6 Signed-off-by: Gabriel Mendoza --- Dockerfile | 3 ++- go.mod | 4 ++-- go.sum | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c7171a05..d86c9f405 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG BASE_IMAGE=registry.access.redhat.com/ubi8/ubi-minimal ARG BASE_IMAGE_VERSION=8.10-1770223153 # Build the manager binary -FROM golang:1.25.7 AS builder +FROM golang:1.25.8 AS builder WORKDIR /workspace @@ -63,6 +63,7 @@ RUN if grep -q 'Ubuntu' /etc/os-release; then \ microdnf update -y libstdc++ && \ microdnf update -y libxml2 && \ microdnf update -y libgcc && \ + microdnf update -y gnutls && \ microdnf clean all; \ fi diff --git a/go.mod b/go.mod index 3615f95ed..138308783 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/splunk/splunk-operator -go 1.25.7 +go 1.25.8 require ( cloud.google.com/go/storage v1.36.0 @@ -61,7 +61,7 @@ require ( github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/buger/jsonparser v1.1.1 // indirect + github.com/buger/jsonparser v1.1.2 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect diff --git a/go.sum b/go.sum index f4c6dae6b..d75a2b9b2 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= +github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= From c8b92a73851be19509c7b55cf14283e346b5b860 Mon Sep 17 00:00:00 2001 From: Gabriel Mendoza Date: Thu, 2 Apr 2026 22:58:01 -0400 Subject: [PATCH 7/9] Update Go version in .env and Dockerfile.distroless MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update GO_VERSION in .env: 1.25.7 → 1.25.8 - Update Dockerfile.distroless FROM golang:1.25.7 → 1.25.8 Addresses review comment to update all Go version occurrences. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Gabriel Mendoza --- .env | 2 +- Dockerfile.distroless | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 599249271..3906a4f7c 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ OPERATOR_SDK_VERSION=v1.42.0 REVIEWERS=vivekr-splunk,rlieberman-splunk,patrykw-splunk,Igor-splunk,kasiakoziol,kubabuczak,gabrielm-splunk,minjieqiu,qingw-splunk -GO_VERSION=1.25.7 +GO_VERSION=1.25.8 AWSCLI_URL=https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.8.6.zip KUBECTL_VERSION=v1.29.1 AZ_CLI_VERSION=2.79.0 diff --git a/Dockerfile.distroless b/Dockerfile.distroless index 37121e4a6..a2ac2afc0 100644 --- a/Dockerfile.distroless +++ b/Dockerfile.distroless @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.25.7 AS builder +FROM golang:1.25.8 AS builder WORKDIR /workspace # Copy the Go Modules manifests From cd1ded4fc1dc675f822eb83bb453d67c48ce9e82 Mon Sep 17 00:00:00 2001 From: Gabriel Mendoza Date: Tue, 7 Apr 2026 17:45:48 -0400 Subject: [PATCH 8/9] Update UBI 8 minimal base image to 8.10-1775152441 - Updated Dockerfile: ARG BASE_IMAGE_VERSION - Updated Makefile: comment and BASE_IMAGE_VERSION variable - Latest version pulled from registry.access.redhat.com/ubi8/ubi-minimal:8.10 Addresses review comment on PR #1809 Signed-off-by: Gabriel Mendoza --- Dockerfile | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d86c9f405..33f8a9f80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG PLATFORMS=linux/amd64,linux/arm64 ARG BASE_IMAGE=registry.access.redhat.com/ubi8/ubi-minimal -ARG BASE_IMAGE_VERSION=8.10-1770223153 +ARG BASE_IMAGE_VERSION=8.10-1775152441 # Build the manager binary FROM golang:1.25.8 AS builder diff --git a/Makefile b/Makefile index aaf7724b5..04afe0a15 100644 --- a/Makefile +++ b/Makefile @@ -170,12 +170,12 @@ docker-push: ## Push docker image with the manager. # Defaults: # Build Platform: linux/amd64,linux/arm64 # Build Base OS: registry.access.redhat.com/ubi8/ubi-minimal -# Build Base OS Version: 8.10-1770223153 +# Build Base OS Version: 8.10-1775152441 # Pass only what is required, the rest will be defaulted # Setup defaults for build arguments PLATFORMS ?= linux/amd64,linux/arm64 BASE_IMAGE ?= registry.access.redhat.com/ubi8/ubi-minimal -BASE_IMAGE_VERSION ?= 8.10-1770223153 +BASE_IMAGE_VERSION ?= 8.10-1775152441 docker-buildx: @if [ -z "${IMG}" ]; then \ From 432071bc5f35026c97f70d1ada26d617db229528 Mon Sep 17 00:00:00 2001 From: Gabriel Mendoza Date: Thu, 23 Apr 2026 01:25:00 -0400 Subject: [PATCH 9/9] Restore helm chart version 3.0.0 to repository Version 3.0.0 was inadvertently removed by automated PR (commit 1139fcf26) when 3.1.0 was added. Customers reported the version missing from `helm search repo` results. Changes: - Restored correct 3.0.0 packaged chart (5.8KB) from git history (commit a3737ba3c) - Added 3.0.0 entries to docs/index.yaml for both splunk-enterprise and splunk-operator charts - Updated SHA256 digests to match correct tarballs File verification: - splunk-operator-3.0.0.tgz is 5.8KB (correct operator-only chart) - Contains splunk-operator/ directory structure (not splunk-enterprise/) Co-Authored-By: Claude Opus 4.7 --- docs/index.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/index.yaml b/docs/index.yaml index 47385faef..8b4f5919a 100644 --- a/docs/index.yaml +++ b/docs/index.yaml @@ -55,6 +55,34 @@ entries: urls: - https://splunk.github.io/splunk-operator/splunk-enterprise-3.1.0.tgz version: 3.1.0 + - apiVersion: v2 + appVersion: 3.0.0 + created: "2026-04-08T03:35:00Z" + dependencies: + - condition: splunk-operator.enabled + name: splunk-operator + repository: file://splunk-operator/helm-chart/splunk-operator + version: 3.0.0 + description: A Helm chart for Splunk Enterprise managed by the Splunk Operator + digest: ae82f6c8edee4d827817fe6c9c6447c422a03c59595a0f6e779cef847a83b611 + maintainers: + - email: vivekr@splunk.com + name: Vivek Reddy + - email: rlieberman@splunk.com + name: Raizel Lieberman + - email: patrykw@splunk.com + name: Patryk Wasielewski + - email: igorg@splunk.com + name: Igor Grzankowski + - email: kkoziol@splunk.com + name: Kasia Kozioł + - email: jbuczak@splunk.com + name: Jakub Buczak + name: splunk-enterprise + type: application + urls: + - https://splunk.github.io/splunk-operator/splunk-enterprise-3.0.0.tgz + version: 3.0.0 - apiVersion: v2 appVersion: 2.8.1 created: "2026-03-02T17:02:33.789329656Z" @@ -381,6 +409,29 @@ entries: urls: - https://splunk.github.io/splunk-operator/splunk-operator-3.1.0.tgz version: 3.1.0 + - apiVersion: v2 + appVersion: 3.0.0 + created: "2026-04-08T03:35:00Z" + description: A Helm chart for the Splunk Operator for Kubernetes + digest: bd318b1f4022421a3fd429b186ca344c61d04a3c2bbdd5cc535d960773558e44 + maintainers: + - email: vivekr@splunk.com + name: Vivek Reddy + - email: rlieberman@splunk.com + name: Raizel Lieberman + - email: patrykw@splunk.com + name: Patryk Wasielewski + - email: igorg@splunk.com + name: Igor Grzankowski + - email: kkoziol@splunk.com + name: Kasia Kozioł + - email: jbuczak@splunk.com + name: Jakub Buczak + name: splunk-operator + type: application + urls: + - https://splunk.github.io/splunk-operator/splunk-operator-3.0.0.tgz + version: 3.0.0 - apiVersion: v2 appVersion: 2.8.1 created: "2026-03-02T17:02:33.967789812Z"