This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Added a container cache disk option. #149
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 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 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
57 changes: 57 additions & 0 deletions
57
app/roles/openshift-installer/templates/98-cache-disk.yaml.j2
This file contains 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: 98-cache-disk | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.1.0 | ||
storage: | ||
disks: | ||
- device: /dev/{{ openshift_installer_cache_disk }} | ||
wipeTable: True | ||
partitions: | ||
- sizeMiB: 50000 | ||
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. Idea: use 50% of the disk size (gathered by ansible facts in 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. Ansible doesn't have any facts about the host at this time. This file is created before the host is created or powered on. I don't think there is a clean way to do that with ipmi/ilo either. |
||
startMiB: 0 | ||
label: var-lib-kubelet | ||
number: 1 | ||
wipePartitionEntry: True | ||
- sizeMiB: 0 | ||
startMiB: 0 | ||
label: var-lib-containers | ||
number: 2 | ||
wipePartitionEntry: True | ||
filesystems: | ||
- path: /var/lib/kubelet | ||
device: /dev/disk/by-partlabel/var-lib-kubelet | ||
format: xfs | ||
wipeFilesystem: True | ||
- path: /var/lib/containers | ||
device: /dev/disk/by-partlabel/var-lib-containers | ||
format: xfs | ||
wipeFilesystem: True | ||
systemd: | ||
units: | ||
- name: var-lib-kubelet.mount | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Before=local-fs.target | ||
[Mount] | ||
Where=/var/lib/kubelet | ||
What=/dev/disk/by-partlabel/var-lib-kubelet | ||
[Install] | ||
WantedBy=local-fs.target | ||
- name: var-lib-containers.mount | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Before=local-fs.target | ||
[Mount] | ||
Where=/var/lib/containers | ||
What=/dev/disk/by-partlabel/var-lib-containers | ||
[Install] | ||
WantedBy=local-fs.target | ||
|
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.
I would intuitively set
openshift_installer_cache_disk
to /dev/sdb (or whatever disk) rather than sdb - so the full path to the disk...That's why I wouldn't prepend /dev in this template
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.
I almost did that, but there is another config option that asks for the disk to install the OS on. That option doesn't require a /dev prefix because the CoreOS kernel args don't allow the /dev prefix.
So I wanted to stay consistent with that.