向Kubernetes Jenkins从站添加更多磁盘空间 [英] Adding more disk space to Kubernetes Jenkins slave

查看:79
本文介绍了向Kubernetes Jenkins从站添加更多磁盘空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在外部主机上使用Kubernetes Jenkins插件.默认磁盘大小限制为10GB.添加名称为jenkins-workspace的pvc会挂载磁盘,但是它是用root用户0755创建的,并且不允许jenkins用户进行任何访问.

I am using the Kubernetes Jenkins plugin on an external master. The default disk size is limited to 10GB. Adding a pvc with the name jenkins-workspace, mounts the disk, but it is created with root user 0755 and doesn't allow jenkins user any access.

-詹金斯2.104大师
-jenkinsci/jnlp奴隶
-kubernetes 1.7.4
-rhel 7.4

- Jenkins 2.104 master
- jenkinsci/jnlp slave
- kubernetes 1.7.4
- rhel 7.4

我们有一个自定义的jnlp从站,但我什至尝试使用插件插入的默认值.

We have a customized jnlp slave, but I have even tried using the default that the plugin pulls in.

任何人都可以将我引到文档或相关文章中,该文档或相关文章显示如何为pvc挂载添加特权或在置备后动态添加空间.

Can anybody point me to documentation or related article that shows how to add privileges for the pvc mount or dynamically add space after provisioning.

我们的Jenkins主服务器使用来自Configure System的Kubernetes云连接,并带有一个Kubernetes pod模板,该模板指向默认的jnlp,或者使用一个容器模板指向我们在本地注册表中的自定义jnlp从属服务器.

Our Jenkins master uses the Kubernetes cloud connection from the Configure System with a Kubernetes pod template either pointing to the default jnlp or using a container template to point to our customized jnlp slave in our local registry.

干杯,提前了解帮助

推荐答案

可以通过使用init容器来更改权限,同时定义从属pod时,您可以包括一个init容器,该容器将卷挂载为root并更改jenkins用户的权限.

It is possible to change the permission by using an init container, while defining the slave pod you can include one init container that mount the volume as root and change the permission to jenkins user.

这篇关于向Kubernetes Jenkins从站添加更多磁盘空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆