Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

feat: Allow controlling sidecar environment variables #81

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

gnosek
Copy link
Contributor

@gnosek gnosek commented Sep 19, 2023

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area tests

/area proposals

What this PR does / why we need it:

Without this PR, the injected sidecars are pretty much forced to run with the default environment. This PR introduces two ways to control the sidecar environment:

  1. Any changes to the environment in the top-level environment_variables section are propagated to sidecars
  2. Each sidecar (mount section in the config) can have its own private environment variables that take preference over the top-level ones

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@poiana
Copy link

poiana commented Sep 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnosek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gnosek
Copy link
Contributor Author

gnosek commented Sep 19, 2023

The tests fail because they use the released kilt version in cfn_patcher, but we do need an upgraded one (from this PR).

Do we want something like this?

diff --git a/runtimes/cloudformation/go.mod b/runtimes/cloudformation/go.mod
index 87c5840..d96f33f 100644
--- a/runtimes/cloudformation/go.mod
+++ b/runtimes/cloudformation/go.mod
@@ -42,3 +42,5 @@ require (
        golang.org/x/sys v0.9.0 // indirect
        gopkg.in/yaml.v3 v3.0.1 // indirect
 )
+
+replace github.com/falcosecurity/kilt/pkg => ../../pkg

gnosek and others added 7 commits October 30, 2023 13:52
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants