-
Notifications
You must be signed in to change notification settings - Fork 6
Added a container cache disk option. #149
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 }} | ||
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 would intuitively set 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 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. |
||
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 | ||
|
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.
You could consider doing this with the file module:
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 call