Skip to content

Instantly share code, notes, and snippets.

@imwower
Created September 13, 2018 07:41
Show Gist options
  • Save imwower/afdd8247179656b3f1cc3899740bb275 to your computer and use it in GitHub Desktop.
Save imwower/afdd8247179656b3f1cc3899740bb275 to your computer and use it in GitHub Desktop.
jenkins.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "6"
field.cattle.io/creatorId: user-2xdrm
field.cattle.io/publicEndpoints: '[{"nodeName":"c-zd4f7:m-948a94211766","addresses":["10.40.20.216"],"port":8080,"protocol":"TCP","podName":"base:jenkins-84d69d7-fvfk2","allNodes":false}]'
creationTimestamp: null
generation: 1
labels:
workload.user.cattle.io/workloadselector: deployment-base-jenkins
name: jenkins
selfLink: /apis/apps/v1beta2/namespaces/base/deployments/jenkins
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
workload.user.cattle.io/workloadselector: deployment-base-jenkins
strategy:
type: Recreate
template:
metadata:
annotations:
field.cattle.io/ports: '[[{"containerPort":8080,"dnsName":"jenkins-hostport","hostPort":8080,"kind":"HostPort","name":"8080tcp80800","protocol":"TCP","sourcePort":8080}]]'
creationTimestamp: null
labels:
workload.user.cattle.io/workloadselector: deployment-base-jenkins
spec:
affinity: {}
containers:
- args:
- /var/jenkins_home/kube/setup_kubectl.sh
command:
- bash
image: registry.cn-beijing.aliyuncs.com/im_wower/jenkins-in-kubernetes:lts-k8s
imagePullPolicy: Always
name: jenkins
ports:
- containerPort: 8080
hostPort: 8080
name: 8080tcp80800
protocol: TCP
resources: {}
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: false
runAsNonRoot: false
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/jenkins_home
name: vol1
- mountPath: /var/run/docker.sock
name: vol2
dnsPolicy: ClusterFirstWithHostNet
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- hostPath:
path: /mnt/sda1/rancher/jenkins_k8s_data
type: DirectoryOrCreate
name: vol1
- hostPath:
path: /var/run/docker.sock
type: File
name: vol2
status: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment