Skip to content

Instantly share code, notes, and snippets.

@garethahealy
Created September 29, 2016 11:09
Show Gist options
  • Save garethahealy/6410fcbeacb22ca8e97e131bca6735e0 to your computer and use it in GitHub Desktop.
Save garethahealy/6410fcbeacb22ca8e97e131bca6735e0 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Template
labels:
application: nexus-ephemeral
createdBy: template-nexus
metadata:
annotations:
description: Nexus service, with ephemeral storage. Scaling to more than one replica
is not supported
tags: repository-managers,nexus
creationTimestamp: 2016-09-27T14:11:53Z
name: nexus-ephemeral
namespace: ci
resourceVersion: "17950"
selfLink: /oapi/v1/namespaces/ci/templates/nexus-ephemeral
uid: 571b99cc-84bc-11e6-bed7-5254009f9a8b
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: nexus
namespace: ci
spec:
replicas: 1
selector:
deploymentconfig: nexus
strategy:
post:
execNewPod:
command:
- /usr/local/bin/addjbossrepos.sh
containerName: nexus
failurePolicy: Ignore
resources: {}
rollingParams:
intervalSeconds: 1
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
deploymentconfig: nexus
spec:
containers:
- image: nexus
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
port: 8081
initialDelaySeconds: 300
timeoutSeconds: 1
name: nexus
ports:
- containerPort: 8081
protocol: TCP
readinessProbe:
httpGet:
port: 8081
initialDelaySeconds: 20
timeoutSeconds: 1
resources:
requests:
memory: 2Gi
securityContext:
capabilities: {}
privileged: false
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /sonatype-work
name: pvol
dnsPolicy: ClusterFirst
restartPolicy: Always
serviceAccount: nexus
serviceAccountName: nexus
volumes:
- emptyDir:
medium: ""
name: pvol
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- nexus
from:
kind: ImageStreamTag
name: ${IMAGE_NAME}:${IMAGE_TAG}
namespace: ci
type: ImageChange
- apiVersion: v1
kind: Route
metadata:
name: nexus
namespace: ci
spec:
host: ${APPLICATION_HOSTNAME}
to:
kind: Service
name: nexus
- apiVersion: v1
kind: Service
metadata:
name: nexus
namespace: ci
spec:
ports:
- name: http
port: 8081
targetPort: 8081
selector:
deploymentconfig: nexus
sessionAffinity: None
type: ClusterIP
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment