ps.jenkins.1.0.2.source-code.openshift-deployment.yml Maven / Gradle / Ivy
---
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata:
name: "jenkins"
annotations:
fabric8.io/target-platform: "openshift"
configmap.fabric8.io/update-on-change: "jenkins"
spec:
replicas: 1
strategy:
type: Recreate
recreateParams:
timeoutSeconds: 7200
template:
spec:
containers:
- image: "fabric8/jenkins-openshift:${jenkins-openshift.version}"
imagePullPolicy: "IfNotPresent"
name: "jenkins"
readinessProbe:
timeoutSeconds: 10
initialDelaySeconds: 10
httpGet:
path: "/login"
port: 8080
livenessProbe:
timeoutSeconds: 10
initialDelaySeconds: 420
failureThreshold: 30
httpGet:
path: "/login"
port: 8080
ports:
- containerPort: 50000
name: "slave"
- containerPort: 8080
name: "http"
env:
- name: "KUBERNETES_NAMESPACE"
valueFrom:
fieldRef:
fieldPath: "metadata.namespace"
- name: GIT_COMMITTER_EMAIL
value: [email protected]
- name: GIT_COMMITTER_NAME
value: fabric8
- name: OPENSHIFT_ENABLE_OAUTH
value: "true"
- name: OPENSHIFT_ENABLE_REDIRECT_PROMPT
value: "true"
- name: KUBERNETES_TRUST_CERTIFICATES
value: "true"
- name: KUBERNETES_MASTER
value: "https://kubernetes.default:443"
- name: JAVA_GC_OPTS
value: "-XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90"
- name: JAVA_OPTS
value: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true"
- name: OPENSHIFT_JENKINS_JVM_ARCH
value: "i686"
- name: CONTAINER_INITIAL_PERCENT
value: "0.07"
- name: CONTAINTER_INITIAL_PERCENT
value: "something-non-empty"
- name: JENKINS_OPTS
value: "-Dgroovy.use.classvalue=true"
- name: JAVA_HOME
value: "/etc/alternatives/java_sdk"
- name: MAVEN_OPTS
value: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
- name: TEST_ADMIN_PASSWORD
valueFrom:
configMapKeyRef:
name: admin-user
key: test.admin.password
resources:
limits:
memory: 512Mi
cpu: 2
requests:
cpu: "0"
volumeMounts:
- mountPath: /var/lib/jenkins
name: jenkins-home
readOnly: false
- name: jenkins-config
mountPath: /opt/openshift/configuration/
- name: admin-user
mountPath: /var/lib/jenkins/init.groovy.d/
serviceAccountName: "jenkins"
volumes:
- name: jenkins-home
persistentVolumeClaim:
claimName: jenkins-home
- name: jenkins-config
configMap:
name: jenkins
- name: admin-user
configMap:
name: admin-user