From fe1fd7ccccdac052391119999d724568c2f2281f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Ak=C4=B1n?= Date: Fri, 21 Jul 2023 11:31:05 +0300 Subject: [PATCH] Added example for secret expansion, updated to go 1.20 --- .github/workflows/test.yml | 4 ++-- .gitignore | 3 +-- Dockerfile | 2 +- README.md | 5 +++++ config.example.yaml | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4903f132..0a8513b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,10 +6,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.19 + - name: Set up Go 1.20 uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.20 id: go - name: Check out code into the Go module directory diff --git a/.gitignore b/.gitignore index 82a23ded..68729d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .idea/ -.DS_Store -fork.sh \ No newline at end of file +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 27a7fda4..2a07abd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19 AS builder +FROM golang:1.20 AS builder ADD . /app WORKDIR /app diff --git a/README.md b/README.md index 89fc80b3..c9fcc679 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,11 @@ receivers: * A route can have many sub-routes, forming a tree. * Routing starts from the root route. +## Using Secrets + +In your config file, you can refer to environment variables as `${API_KEY}` therefore you can use ConfigMap or Secrets +to keep the config file clean of secrets. + ## Troubleshoot "Events Discarded" warning: - If there are `client-side throttling` warnings in the event-exporter log: diff --git a/config.example.yaml b/config.example.yaml index 0c978f9b..3b6e694b 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -36,6 +36,7 @@ receivers: hosts: - "http://localhost:9200" indexFormat: "kube-events-{2006-01-02}" + apiKey: ${ELASTIC_API_KEY} - name: "opensearch-dump" opensearch: hosts: