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

Enhanced granularity for image privileges and versions #123

Merged
merged 6 commits into from
Aug 6, 2019

Conversation

Mierdin
Copy link
Member

@Mierdin Mierdin commented Jul 30, 2019

NOTE do not merge until nre-learning/nrelabs-curriculum#248 is ready to go. This will break current selfmedicate users until a compatible curriculum can be delivered as well.

This PR re-introduces the changes that were originally put into place in #120 but then rolled back in #121 and #122 since the accompanying curriculum and required images weren't ready, and selfmedicate is currently configured to pull the latest syringe.

Summary of Changes

This PR introduces the enforcement of particular curriculum image versions, since as of now, we're building and tagging all of these images for every curriculum release. It does this by prohibiting tags in image refs within a lesson definition, and appending a tag at runtime equal to the version of the curriculum that's been configured via env. If nothing is specified, latest is pulled for all images.

This PR also introduces the ability to configure which images are granted privileged mode. This is unfortunately the way we currently have to do things until mini-project 6 gets off the ground. This way, however, we can maintain granularity over which images get this mode, and ensure it's limited to those that run a layer of virtualization within them (which are the only images that actually require this, or a subset of these privileges).

Signed-off-by: Matt Oswalt <matt@keepingitclassless.net>
Signed-off-by: Matt Oswalt <matt@keepingitclassless.net>
@codecov
Copy link

codecov bot commented Aug 3, 2019

Codecov Report

Merging #123 into master will decrease coverage by 0.2%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
- Coverage    26.9%   26.69%   -0.21%     
==========================================
  Files          20       20              
  Lines        2037     2045       +8     
==========================================
- Hits          548      546       -2     
- Misses       1438     1447       +9     
- Partials       51       52       +1
Impacted Files Coverage Δ
api/exp/lessons.go 3.05% <0%> (-0.05%) ⬇️
scheduler/pods.go 75.24% <23.07%> (-6.07%) ⬇️
config/config.go 61.53% <81.81%> (+2.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 005f4d0...4026fd2. Read the comment docs.

@Mierdin Mierdin changed the title Re-introduce image initialization changes Enhanced granularity for image privileges and versions Aug 3, 2019
Mierdin added 2 commits August 2, 2019 23:23
Signed-off-by: Matt Oswalt <matt@keepingitclassless.net>
Signed-off-by: Matt Oswalt <matt@keepingitclassless.net>
@Mierdin Mierdin marked this pull request as ready for review August 3, 2019 06:30
Signed-off-by: Matt Oswalt <matt@keepingitclassless.net>
@Mierdin
Copy link
Member Author

Mierdin commented Aug 6, 2019

nre-learning/nrelabs-curriculum#248 has been merged, and with that, all lesson definitions currently in the repository are compatible with this change.

I'll push some additional commits to update testing, and then this is good to go.

Signed-off-by: Matt Oswalt <matt@keepingitclassless.net>
@Mierdin Mierdin merged commit d4cb7dc into master Aug 6, 2019
@Mierdin Mierdin deleted the image-changes branch August 6, 2019 00:59
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant