From b94b7407890b92e7148c9d769744407f1f424c3d Mon Sep 17 00:00:00 2001 From: bhack Date: Fri, 27 Apr 2018 16:25:59 +0200 Subject: [PATCH] Add hooks example for cachefiled --- docs/cluster_spec.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/cluster_spec.md b/docs/cluster_spec.md index d798ea2487..8e4e01cf8a 100644 --- a/docs/cluster_spec.md +++ b/docs/cluster_spec.md @@ -387,6 +387,28 @@ spec: image: busybox ``` +Install cachefiled + +``` +spec: + # many sections removed + hooks: + - before: + - kubelet.service + manifest: | + Type=oneshot + ExecStart=/sbin/modprobe cachefiles + name: cachefiles.service + - execContainer: + command: + - sh + - -c + - chroot /rootfs apt-get update && chroot /rootfs apt-get install -y cachefilesd + && chroot /rootfs sed -i s/#RUN/RUN/ /etc/default/cachefilesd && chroot /rootfs + service cachefilesd restart + image: busybox +``` + ### fileAssets FileAssets is an alpha feature which permits you to place inline file content into the cluster and instanceGroup specification. It's desiginated as alpha as you can probably do this via kubernetes daemonsets as an alternative.