Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create container with environment variables #1499

Merged

Conversation

mgjm
Copy link
Contributor

@mgjm mgjm commented Jul 11, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add an option to pass environment variables to the OCI runtime.

type CreateContainerConfig struct {
	// ...

	// EnvVars are the environment variables passed to the create runtime call.
	EnvVars map[string]string
}

Update: I extended this PR to also add the same option to ExecSyncConfig.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

This PR depends on #1498 for the new TextTextMap capnp type and helper functions.

b4e18e1 is the new commit in this PR
2224dd6 does the same for ExecSync

Does this PR introduce a user-facing change?

Add an option to pass environment variables to the OCI runtime

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2023

Codecov Report

Merging #1499 (b4e18e1) into main (f132a00) will decrease coverage by 0.18%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1499      +/-   ##
==========================================
- Coverage   34.18%   34.00%   -0.18%     
==========================================
  Files          13       13              
  Lines        1135     1135              
  Branches      392      390       -2     
==========================================
- Hits          388      386       -2     
  Misses        493      493              
- Partials      254      256       +2     

@haircommander
Copy link
Collaborator

/hold

for #1498

mgjm added 2 commits July 18, 2023 14:26
Signed-off-by: Martin Michaelis <code@mgjm.de>
Signed-off-by: Martin Michaelis <code@mgjm.de>
@mgjm mgjm force-pushed the create-container-env-vars branch from 2224dd6 to 97d6b46 Compare July 18, 2023 14:29
@mgjm mgjm closed this Jul 18, 2023
@mgjm mgjm force-pushed the create-container-env-vars branch from 97d6b46 to 9be4262 Compare July 18, 2023 14:36
@mgjm
Copy link
Contributor Author

mgjm commented Jul 18, 2023

Closed by accident (during rebase), and #1498 is merged now

@mgjm mgjm reopened this Jul 18, 2023
@rphillips
Copy link
Collaborator

/hold cancel
/lgtm

@haircommander
Copy link
Collaborator

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, mgjm

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

@openshift-merge-robot openshift-merge-robot merged commit 271dee6 into containers:main Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants