2016-07-20 22:51:51 +00:00
|
|
|
kind: ReplicationController
|
|
|
|
apiVersion: v1
|
2016-07-20 21:58:10 +00:00
|
|
|
metadata:
|
|
|
|
name: jenkins-master
|
|
|
|
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
2016-07-20 22:51:51 +00:00
|
|
|
selector:
|
|
|
|
app: jenkins-master
|
2016-07-20 21:58:10 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
2016-07-20 22:51:51 +00:00
|
|
|
name: jenkins-master
|
2016-07-20 21:58:10 +00:00
|
|
|
labels:
|
|
|
|
app: jenkins-master
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: jenkins-master
|
|
|
|
image: gcr.io/meta-iterator-105109/jenkins
|
|
|
|
env:
|
|
|
|
- name: KUB_POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: KUB_POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
- name: JAVA_OPTS
|
|
|
|
value: "-Duser.timezone=America/Los_Angeles"
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
- containerPort: 50000
|
|
|
|
volumeMounts:
|
|
|
|
- name: jenkins-work
|
|
|
|
mountPath: "/var/jenkins_home"
|
2016-07-20 22:51:51 +00:00
|
|
|
- name: docker-sock
|
|
|
|
mountPath: "/var/run/docker.sock"
|
2016-07-20 21:58:10 +00:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: "/login"
|
|
|
|
port: 8080
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
timeoutSeconds: 15
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: "4Gi"
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2016-07-20 22:51:51 +00:00
|
|
|
volumes:
|
|
|
|
- name: jenkins-work
|
|
|
|
gcePersistentDisk:
|
|
|
|
pdName: jenkins-work
|
|
|
|
fsType: ext4
|
|
|
|
- name: docker-sock
|
|
|
|
hostPath:
|
|
|
|
path: /var/run/docker.sock
|