-
Notifications
You must be signed in to change notification settings - Fork 401
Image-cleaner: mount docker dir instead of socket #2030
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
Merged
+35
−14
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,8 +49,8 @@ spec: | |
| volumeMounts: | ||
| - name: storage-{{ $builderName }} | ||
| mountPath: /var/lib/{{ $builderName }} | ||
| - name: socket-{{ $builderName }} | ||
| mountPath: /var/run/docker.sock | ||
| - name: socketdir-{{ $builderName }} | ||
| mountPath: /var/run | ||
| env: | ||
| {{- if .Values.imageCleaner.cordon }} | ||
| - name: DOCKER_IMAGE_CLEANER_NODE_NAME | ||
|
|
@@ -68,6 +68,8 @@ spec: | |
| value: {{ .Values.imageCleaner.imageGCThresholdHigh | quote }} | ||
| - name: DOCKER_IMAGE_CLEANER_THRESHOLD_LOW | ||
| value: {{ .Values.imageCleaner.imageGCThresholdLow | quote }} | ||
| - name: DOCKER_HOST | ||
| value: unix:///var/run/{{ eq $builderName "host" | ternary .Values.imageCleaner.host.dockerSocketName $builder.hostSocketName }} | ||
| {{- with .Values.imageCleaner.extraEnv }} | ||
| {{- include "jupyterhub.extraEnv" . | nindent 8 }} | ||
| {{- end }} | ||
|
|
@@ -77,19 +79,19 @@ spec: | |
| - name: storage-host | ||
| hostPath: | ||
| path: {{ .Values.imageCleaner.host.dockerLibDir }} | ||
| - name: socket-host | ||
| - name: socketdir-host | ||
| hostPath: | ||
| path: {{ .Values.imageCleaner.host.dockerSocket }} | ||
| type: Socket | ||
| path: {{ .Values.imageCleaner.host.dockerSocketDir }} | ||
| type: Directory | ||
| {{- end }} | ||
| {{- if or (eq $builderName "dind") (eq $builderName "pink") }} | ||
| - name: storage-{{ $builderName }} | ||
| hostPath: | ||
| path: {{ eq $builderName "dind" | ternary $builder.hostLibDir $builder.hostStorageDir }} | ||
| type: DirectoryOrCreate | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The image-cleaner should never create Docker directories, that should be handled by Docker. |
||
| - name: socket-{{ $builderName }} | ||
| type: Directory | ||
| - name: socketdir-{{ $builderName }} | ||
| hostPath: | ||
| path: {{ $builder.hostSocketDir }}/{{ $builder.hostSocketName }} | ||
| type: Socket | ||
| path: {{ $builder.hostSocketDir }} | ||
| type: Directory | ||
| {{- end }} | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -335,10 +335,11 @@ imageCleaner: | |
| # cull images until it drops below 60% | ||
| imageGCThresholdHigh: 80 | ||
| imageGCThresholdLow: 60 | ||
| # cull images on the host docker as well as dind | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's ever done both |
||
| # cull images on the host docker | ||
| # configuration to use if `imageBuilderType: host` is configured | ||
| host: | ||
| dockerSocket: /var/run/docker.sock | ||
| dockerSocketDir: /var/run | ||
| dockerSocketName: docker.sock | ||
| dockerLibDir: /var/lib/docker | ||
|
|
||
| ingress: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If we want to help people make a transition, this entry could remain allowed, and then if its ovserved in NOTES.txt, we would use the fail template command to error with a message.
We are already erroring if its specified, so this would just be a help to transition
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.
Type would be allowed to be null as well then, and then we would look for it to be set.
I recall z2jh have some deprecation and breaking change message template ready if you want to go for it
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.
Good point, done!
Shouldn't the
hasKeycheck mean we don't need to make it nullable?`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.
Ah yes nice!