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

Fix loading of image translation CRDs #815

Merged
merged 3 commits into from
Dec 6, 2018

Conversation

ivan4th
Copy link
Contributor

@ivan4th ivan4th commented Dec 5, 2018

This change is Reviewable

Copy link
Contributor

@jellonek jellonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @ivan4th)


pkg/manager/manager.go, line 64 at r1 (raw file):

// NewVirtletManager creates a new VirtletManager.
func NewVirtletManager(config *v1.VirtletConfig, fdManager tapmanager.FDManager, clientCfg clientcmd.ClientConfig, diagSet *diag.Set) *VirtletManager {
	return &VirtletManager{config: config, fdManager: fdManager, diagSet: diagSet, clientCfg: clientCfg}

That's ok, but imo GetDefaultImageTranslator should return an error on nil clientCfg, instead of skipping crd source.

Copy link
Contributor Author

@ivan4th ivan4th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @jellonek)


pkg/manager/manager.go, line 64 at r1 (raw file):

Previously, jellonek (Piotr Skamruk) wrote…

That's ok, but imo GetDefaultImageTranslator should return an error on nil clientCfg, instead of skipping crd source.

nil clientCfg is actually used by integration tests that presently don't use CRD based image translation. The integration tests run w/o k8s yet they create an instance of VirtletManager.

Copy link
Contributor

@jellonek jellonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 change requests, 0 of 1 approvals obtained


pkg/manager/manager.go, line 64 at r1 (raw file):

Previously, ivan4th (Ivan Shvedunov) wrote…

nil clientCfg is actually used by integration tests that presently don't use CRD based image translation. The integration tests run w/o k8s yet they create an instance of VirtletManager.

Ok.

Copy link
Contributor

@jellonek jellonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@jellonek jellonek merged commit fa616f8 into master Dec 6, 2018
@jellonek jellonek deleted the ivan4th/fix-image-translation-crds branch December 6, 2018 09:46
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