-
Notifications
You must be signed in to change notification settings - Fork 1
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
add privileged to host config #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this PR need the same additions that you did for arcalot/arcaflow-engine-deployer-podman#58?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this PR need the same additions that you did for [...]
I had the same thought, but earlier I didn't try to look. It does seem, however, that the other schema properties are individually referenced and there's no generic mechanism to process them all; so, yeah, I think there should be. (Though it looks very different for docker as it uses a REST API client rather than forking a cli command.)
Correct, the docker deployer does not use the cli. Instead, it communicates with the docker api through a golang client api. Our docker deployer's config gets unmarshalled into a container.HostConfig struct as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our docker deployer's config gets unmarshalled into a
container.HostConfig
struct as theDeployment
section of the docker deployer config.
That's very cool!...but shouldn't this PR include a test which proves that it works? (I.e., which shows that the Privileged
field is now accepted?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so the schema just gets automagically converted into a Docker HostConfig
struct and passed through. Cool, if a bit mysterious.
I agree it would be nice to have tests ... but there's very little testing infrastructure in place and it amounts to a minimal functional test that a container can be deployed and generates output. 😦 I don't like the additional accumulated debt here, but one might also argue that placing the entire burden of building a deployment unit test environment from scratch is a bit much to put on this little PR.
No additional testing is needed because the schema uses StructMappedObjectSchemas for the ContainerConfig and the HostConfig which maps our golang schema structures into the exact config structures used by the container api, container.Config and container.HostConfig, respectively. If the key had been typed as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. It's good that this field was already present on the structure.
I believe you, but do we have a test which supports that assertion? (Are there tests for |
Changes introduced with this PR
Add privileged option to deployment host config.
By contributing to this repository, I agree to the contribution guidelines.