| if hostname is a added to the specs, container shell couldn't locate the hostname. Since jenkins slave sets pod name as hostname. Keeping both same as same. Is there a way to overwrite only hostname within a podname. Kubernetes support it where podname and hostname can be different. usecase is to have different podname and hostname. Trying to keep hostname as consistent for a build activity trying to avoid rebuild as build records hostname information in its objects. Detail of the podtemplate used ------------ def label = "mypod-${UUID.randomUUID().toString()}" podTemplate(name: "myname", label: label, defaultContainer: "busybox", namespace: "noormohamed", yaml: """ apiVersion: v1 kind: Pod metadata: labels: label: build spec: hostname: myhostname containers:
|