Skip to content

Conversation

ndrshrzg
Copy link

@ndrshrzg ndrshrzg commented Sep 30, 2025

Description

Retrieving feature flags from Kubernetes ConfigMap is already supported. Support for Kubernetes Secrets is missing.

This PR adds a k8sretriever.SecretRetriever implementation of the Retriever interface. Also adds corresponding unit test.

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

Copy link

netlify bot commented Sep 30, 2025

Deploy Preview for go-feature-flag-doc-preview ready!

Name Link
🔨 Latest commit eb5dd36
🔍 Latest deploy log https://app.netlify.com/projects/go-feature-flag-doc-preview/deploys/68dbeb8a1c94dc0008779615
😎 Deploy Preview https://deploy-preview-3986--go-feature-flag-doc-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

codecov bot commented Sep 30, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.81%. Comparing base (3ba39a0) to head (eb5dd36).

Files with missing lines Patch % Lines
cmdhelpers/retrieverconf/init/retriever_init.go 0.00% 11 Missing ⚠️
retriever/k8sretriever/secret_retriever.go 90.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3986      +/-   ##
==========================================
- Coverage   83.92%   83.81%   -0.11%     
==========================================
  Files         137      138       +1     
  Lines        6813     6854      +41     
==========================================
+ Hits         5718     5745      +27     
- Misses        884      898      +14     
  Partials      211      211              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@thomaspoignant
Copy link
Owner

Hey thanks for opening this pull request.
I have a question, in which case do you think using a secret is better than using configmaps? I can't see the value of storing feature flags inside secrets.

Do you have any use case where you thing this is better to have secrets instead of confimaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants