Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
520 lines (519 sloc) 17.4 KB
{
"kind": "List",
"apiVersion": "v1",
"metadata": {
"name": "nexus"
},
"items": [
{
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "secret"
}
},
{
"type": "Generic",
"generic": {
"secret": "secret"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
],
"source": {
"type": "Git",
"git": {
"uri": "https://github.com/jorgemoralespou/nexus-ose",
"ref": "master"
},
"contextDir": "nexus/nexus-container"
},
"strategy": {
"type": "Docker",
"dockerStrategy": {
"from": {
"kind": "DockerImage",
"name": "centos:7"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "nexus:latest",
"namespace": "ci"
}
},
"resources": {}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "centos",
"namespace": "ci"
},
"spec": {
"dockerImageRepository": "library/centos:centos7"
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"dockerImageRepository": "",
"tags": [
{
"name": "latest"
}
]
}
},
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "nexus-ephemeral",
"namespace": "ci",
"annotations": {
"description": "Nexus service, with ephemeral storage. Scaling to more than one replica is not supported",
"tags": "repository-managers,nexus"
}
},
"labels": {
"application": "nexus-ephemeral",
"createdBy": "template-nexus"
},
"parameters": [
{
"description": "The name for the application. The service will be named like the application.",
"displayName": "Application name.",
"name": "APPLICATION_NAME",
"value": "nexus"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"displayName": "Nexus instance hostname",
"name": "APPLICATION_HOSTNAME"
},
{
"description": "Nexus image name",
"displayName": "Nexus image name",
"name": "IMAGE_NAME",
"value": "nexus"
},
{
"description": "Nexus image tag",
"displayName": "Nexus image tag",
"name": "IMAGE_TAG",
"value": "latest"
}
],
"objects": [
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"strategy": {
"type": "Recreate",
"recreateParams": {
"post": {
"failurePolicy": "Ignore",
"execNewPod": {
"containerName": "nexus",
"command": [
"/bin/bash",
"/usr/local/bin/addjbossrepos.sh"
],
"env": [
{
"name": "NEXUS_BASE_URL",
"value":"http://nexus:8081"
}
]
}
}
},
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"nexus"
],
"from": {
"kind": "ImageStreamTag",
"name": "${IMAGE_NAME}:${IMAGE_TAG}",
"namespace": "ci"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentconfig": "nexus"
},
"template": {
"metadata": {
"labels": {
"deploymentconfig": "nexus"
}
},
"spec": {
"volumes": [
{
"name": "pvol",
"emptyDir": {
"medium": ""
}
}
],
"containers": [
{
"name": "nexus",
"image": "nexus",
"ports": [
{
"containerPort": 8081,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"name": "pvol",
"mountPath": "/sonatype-work"
}
],
"livenessProbe": {
"httpGet": {
"port": 8081
},
"initialDelaySeconds": 300,
"timeoutSeconds": 1
},
"readinessProbe": {
"httpGet": {
"port": 8081
},
"initialDelaySeconds": 20,
"timeoutSeconds": 1
},
"resources": {
"requests": {
"memory": "2Gi"
}
},
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst",
"serviceAccountName": "nexus",
"serviceAccount": "nexus"
}
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"kind": "Service",
"name": "nexus"
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"ports": [
{
"name": "http",
"port": 8081,
"targetPort": 8081
}
],
"selector": {
"deploymentconfig": "nexus"
},
"type": "ClusterIP",
"sessionAffinity": "None"
}
}
]
},
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "nexus-persistent",
"namespace": "ci",
"annotations": {
"description": "Nexus service, with persistent storage. Scaling to more than one replica is not supported",
"tags": "repository-managers,nexus"
}
},
"labels": {
"application": "nexus-persistent",
"createdBy": "template-nexus"
},
"parameters": [
{
"description": "The name for the application. The service will be named like the application.",
"displayName": "Application name.",
"name": "APPLICATION_NAME",
"value": "nexus"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"displayName": "Nexus instance hostname",
"name": "APPLICATION_HOSTNAME"
},
{
"description": "Persistent Volume Size (512Mi, 5Gi,...)",
"displayName": "Persistent Volume Size",
"name": "SIZE",
"value": "5Gi"
},
{
"description": "Nexus image name",
"displayName": "Nexus image name",
"name": "IMAGE_NAME",
"value": "nexus"
},
{
"description": "Nexus image tag",
"displayName": "Nexus image tag",
"name": "IMAGE_TAG",
"value": "latest"
}
],
"objects": [
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "nexus-claim",
"namespace": "ci"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "${SIZE}"
}
},
"volumeName": "nexus-pv"
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"strategy": {
"type": "Recreate",
"recreateParams": {
"post": {
"failurePolicy": "Ignore",
"execNewPod": {
"containerName": "nexus",
"command": [
"/usr/local/bin/addjbossrepos.sh"
],
"env": [
{
"name": "NEXUS_BASE_URL",
"value":"http://nexus:8081"
}
]
}
}
},
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"nexus"
],
"from": {
"kind": "ImageStreamTag",
"name": "${IMAGE_NAME}:${IMAGE_TAG}",
"namespace": "ci"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentconfig": "nexus"
},
"template": {
"metadata": {
"labels": {
"deploymentconfig": "nexus"
}
},
"spec": {
"volumes": [
{
"name": "pvol",
"persistentVolumeClaim": {
"claimName": "nexus-claim"
}
}
],
"containers": [
{
"name": "nexus",
"image": "nexus",
"ports": [
{
"containerPort": 8081,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"name": "pvol",
"mountPath": "/sonatype-work"
}
],
"livenessProbe": {
"httpGet": {
"port": 8081
},
"initialDelaySeconds": 180,
"timeoutSeconds": 1
},
"readinessProbe": {
"httpGet": {
"port": 8081
},
"initialDelaySeconds": 20,
"timeoutSeconds": 1
},
"resources": {
"requests": {
"memory": "2Gi"
}
},
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst",
"serviceAccountName": "nexus",
"serviceAccount": "nexus"
}
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"kind": "Service",
"name": "nexus"
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nexus",
"namespace": "ci"
},
"spec": {
"ports": [
{
"name": "http",
"port": 8081,
"targetPort": 8081
}
],
"selector": {
"deploymentconfig": "nexus"
},
"type": "ClusterIP",
"sessionAffinity": "None"
}
}
]
}
]
}