2019-10-04 14:35:05 +02:00
|
|
|
# Copyright 2019 Google LLC
|
|
|
|
#
|
|
|
|
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://llvm.org/LICENSE.txt
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2019-10-04 10:26:20 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
2019-10-14 18:03:21 +02:00
|
|
|
metadata:
|
2019-10-04 10:26:20 +02:00
|
|
|
name: jenkins
|
2019-10-14 18:03:21 +02:00
|
|
|
labels:
|
2019-10-04 10:26:20 +02:00
|
|
|
name: jenkins
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: default
|
|
|
|
namespace: jenkins
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: jenkins-admin
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cluster-admin
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: default
|
|
|
|
namespace: jenkins
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolume
|
|
|
|
metadata:
|
|
|
|
name: jenkins-home
|
|
|
|
labels:
|
|
|
|
failure-domain.beta.kubernetes.io/zone: us-central1-a
|
|
|
|
spec:
|
|
|
|
capacity:
|
|
|
|
storage: 20Gi
|
|
|
|
volumeMode: Filesystem
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
gcePersistentDisk:
|
|
|
|
pdName: jenkins-home
|
|
|
|
fsType: ext4
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: jenkins
|
|
|
|
namespace: jenkins
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: master
|
|
|
|
spec:
|
|
|
|
hostname: jenkins-master
|
|
|
|
containers:
|
|
|
|
- name: master
|
2020-02-13 17:24:42 +01:00
|
|
|
image: jenkins/jenkins:lts
|
2019-10-04 10:26:20 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
- containerPort: 50000
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /login
|
|
|
|
port: 8080
|
|
|
|
periodSeconds: 10
|
|
|
|
timeoutSeconds: 5
|
|
|
|
successThreshold: 2
|
|
|
|
failureThreshold: 5
|
|
|
|
env:
|
|
|
|
- name: JAVA_OPTS
|
|
|
|
value: '-Xmx1400m'
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/jenkins_home
|
|
|
|
name: jenkins-home
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 500m
|
|
|
|
memory: 1500Mi
|
|
|
|
requests:
|
|
|
|
cpu: 500m
|
|
|
|
memory: 1500Mi
|
|
|
|
volumes:
|
|
|
|
- name: jenkins-home
|
|
|
|
gcePersistentDisk:
|
|
|
|
pdName: jenkins-home
|
|
|
|
fsType: ext4
|
2019-10-05 11:33:29 +02:00
|
|
|
nodeSelector:
|
2019-10-28 17:35:49 +01:00
|
|
|
cloud.google.com/gke-nodepool: default-pool
|
2019-10-04 10:26:20 +02:00
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: jenkins-ui
|
|
|
|
namespace: jenkins
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
selector:
|
|
|
|
app: master
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 8080
|
|
|
|
targetPort: 8080
|
|
|
|
name: ui
|
|
|
|
- protocol: TCP
|
|
|
|
port: 50000
|
|
|
|
targetPort: 50000
|
|
|
|
name: agent
|
|
|
|
---
|
2019-10-05 11:33:29 +02:00
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolume
|
|
|
|
metadata:
|
|
|
|
name: nfs-jenkins
|
|
|
|
spec:
|
|
|
|
capacity:
|
|
|
|
storage: 10Gi
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
nfs:
|
|
|
|
server: nfs-service.results.svc.cluster.local
|
|
|
|
path: "/exports"
|
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: nfs-jenkins
|
|
|
|
namespace: jenkins
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
storageClassName: ""
|
|
|
|
resources:
|
|
|
|
requests:
|
2019-10-14 18:03:21 +02:00
|
|
|
storage: 10Gi
|
2019-10-07 14:08:34 +02:00
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2020-01-23 16:14:12 +01:00
|
|
|
name: agent-debian-testing-ssd
|
2019-10-07 14:08:34 +02:00
|
|
|
namespace: jenkins
|
|
|
|
spec:
|
2019-10-24 18:17:37 +02:00
|
|
|
replicas: 2
|
2019-10-07 14:08:34 +02:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2020-01-23 16:14:12 +01:00
|
|
|
app: agent-debian-testing-ssd
|
2019-10-07 14:08:34 +02:00
|
|
|
spec:
|
|
|
|
containers:
|
2019-10-14 18:03:21 +02:00
|
|
|
- name: agent-debian-testing-clang8
|
2020-01-23 16:14:12 +01:00
|
|
|
image: gcr.io/llvm-premerge-checks/agent-debian-testing-ssd
|
2019-10-14 18:03:21 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: 22
|
|
|
|
resources:
|
|
|
|
limits:
|
2019-10-24 18:17:37 +02:00
|
|
|
cpu: 30
|
2019-10-14 18:03:21 +02:00
|
|
|
memory: 45Gi
|
|
|
|
requests:
|
2019-10-24 18:17:37 +02:00
|
|
|
cpu: 30
|
2019-10-14 18:03:21 +02:00
|
|
|
memory: 45Gi
|
|
|
|
volumeMounts:
|
2019-10-14 12:22:25 +02:00
|
|
|
- name: nfs-pvc
|
2019-10-14 18:03:21 +02:00
|
|
|
mountPath: /mnt/nfs
|
|
|
|
- name: ssd
|
|
|
|
mountPath: /mnt/disks/ssd0
|
|
|
|
volumes:
|
|
|
|
- name: nfs-pvc
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: nfs-jenkins
|
|
|
|
- name: ssd
|
|
|
|
hostPath:
|
|
|
|
# directory location on host
|
|
|
|
path: /mnt/disks/ssd0
|
|
|
|
type: Directory
|
2019-10-07 14:08:34 +02:00
|
|
|
nodeSelector:
|
2019-10-14 18:26:47 +02:00
|
|
|
cloud.google.com/gke-nodepool: jenkins-agents
|