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

T5531: Containers add label option #2189

Merged
merged 1 commit into from
Aug 31, 2023
Merged

T5531: Containers add label option #2189

merged 1 commit into from
Aug 31, 2023

Conversation

sever-sever
Copy link
Member

Change Summary

Ability to set labels for container

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

container

Proposed changes

How to test

VyOS configuration:

set container name c1 allow-host-networks
set container name c1 image 'busybox'
set container name c1 label mypods value 'My label for containers'

Check labels:

sudo podman  inspect c1
...
               "Labels": {
                    "PODMAN_SYSTEMD_UNIT": "vyos-container-c1.service",
                    "mypods": "My label for containers"
               },

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Ability to set labels for container

set container name c1 allow-host-networks
set container name c1 image 'busybox'
set container name c1 label mypods value 'My label for containers'
@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro and c-po and removed request for a team August 31, 2023 08:40
@c-po c-po merged commit 18a6163 into vyos:current Aug 31, 2023
7 of 8 checks passed
@mgolisch
Copy link

mgolisch commented Sep 8, 2023

i think an error slipped into this one.
By setting env_opt to an empty string all pods created have none of the configured environment variables set.

@fisherbln
Copy link

i think an error slipped into this one.
By setting env_opt to an empty string all pods created have none of the configured environment variables set.

confirmed on my end. All my env vars are wiped out of my containers after this was implemented.

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

Successfully merging this pull request may close these issues.

4 participants