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

Docker Default Ulimits #3259

Merged
merged 1 commit into from
Aug 24, 2017
Merged

Conversation

gambol99
Copy link
Contributor

@gambol99 gambol99 commented Aug 23, 2017

The current implementation does not permit us to set the default ulimit on docker daemon (currently a requirement for our elasticsearch). This PR add the DefaultUlimit option to the DockerConfig

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 23, 2017
@gambol99 gambol99 force-pushed the docker_ulimits branch 2 times, most recently from 6d0f815 to 1d68750 Compare August 23, 2017 15:35
@KashifSaadat
Copy link
Contributor

Flag is in valid format, looks good to me. 👍

@gambol99
Copy link
Contributor Author

/assign @justinsb

Copy link
Contributor

@chrislovecnm chrislovecnm left a comment

Choose a reason for hiding this comment

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

Documentation in the code wouls make this awesome! Thanks for the PR.

IPMasq *bool `json:"ipMasq,omitempty" flag:"ip-masq"`
LogDriver string `json:"logDriver,omitempty" flag:"log-driver"`
LogOpt []string `json:"logOpt,omitempty" flag:"log-opt,repeat"`
DefaultUlimit []string `json:"defaultUlimit,omitempty" flag:"default-ulimit,repeat"`
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to start adding more validation methods. We can do a follow up PR if you like. You mind adding some code level comments?

@chrislovecnm
Copy link
Contributor

/assign

@gambol99
Copy link
Contributor Author

gambol99 commented Aug 24, 2017

@KashifSaadat @maciaszczykm ... can you take a look

@gambol99
Copy link
Contributor Author

gambol99 commented Aug 24, 2017

hi @chrislovecnm ... documentation added. Note i've also added authorization-plugins for those running fine grain authz on the docker daemon (i.e. us :-))

@maciaszczykm
Copy link
Member

@KashifSaadat @maciaszczykm ... can you take a look

@gambol99 Should it be addressed to me?

Copy link
Contributor

@KashifSaadat KashifSaadat left a comment

Choose a reason for hiding this comment

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

Minor comments (will need applying to v1 and v2), otherwise LGTM

func (b *DockerBuilder) Build(c *fi.ModelBuilderContext) error {

// @check: neither coreos or containeros needs to docker.service, just the options
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean "needs to build docker.service"?

IPMasq *bool `json:"ipMasq,omitempty" flag:"ip-masq"`
// IPtables enables addition of iptables rules
IPTables *bool `json:"ipTables,omitempty" flag:"iptables"`
// InsecureRegistry enable insecure registry communication @question according to dockers this a list??
Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, this should be changed to a list as it supports multiple values

Copy link
Member

Choose a reason for hiding this comment

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

OK, that will need some careful handling, so we definitely don't want to do it in this PR :-)

@gambol99
Copy link
Contributor Author

apologize @maciaszczykm, it was auto completion :-) ... i meant @marcinc

The current implementation does not permit us to set the default ulimit on docker daemon (currently a requirement for our logstash). This PR add the DefaultUlimit option to the DockerConfig
@justinsb
Copy link
Member

Travis CI build failure is unrelated; if you rebase it should be fixed (I fixed it manually on head, and #3183 will stop it happening again), but travis doesn't auto-rebase when testing.

Change LGTM, although I'm surprised there's no a k8s option for this. (And I'd also like to learn more about how you're locking down docker). If you're able to provide more details that would be very helpful; what you're doing here with the flag overrides is "expert mode" and it's easy to make a mistake which kops can't catch, so we typically prefer to expose "managed" options. But this is why the functionality is there, so not a reason not to merge, just a reason to try to make things easier. (Would also be good to have an option that works even if you're running the new CRI runtime which uses less of docker!)

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 24, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gambol99, justinsb

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2017
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 63480a7 into kubernetes:master Aug 24, 2017
@gambol99
Copy link
Contributor Author

hi @justinsb ..

Change LGTM, although I'm surprised there's no a k8s option for this. (And I'd also like to learn more about how you're locking down docker)

Yep, would be a good opportunity to catch up as well as i'd be interested to hear about roadmap's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants