{
|
|
"apiVersion": "v1",
|
|
"kind": "Template",
|
|
"metadata": {
|
|
"annotations": {
|
|
"description": "Deployment template for a clamav",
|
|
"tags": "clamd,av"
|
|
},
|
|
"name": "clamd"
|
|
},
|
|
"objects": [
|
|
{
|
|
"apiVersion": "v1",
|
|
"kind": "DeploymentConfig",
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"app": "${NAME}"
|
|
},
|
|
"name": "${NAME}"
|
|
},
|
|
"spec": {
|
|
"replicas": 1,
|
|
"selector": {
|
|
"app": "${NAME}",
|
|
"deploymentconfig": "${NAME}"
|
|
},
|
|
"strategy": {
|
|
"rollingParams": {
|
|
"intervalSeconds": 1,
|
|
"maxSurge": "25%",
|
|
"maxUnavailable": "25%",
|
|
"timeoutSeconds": 600,
|
|
"updatePeriodSeconds": 1
|
|
},
|
|
"type": "Rolling"
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"app": "${NAME}",
|
|
"deploymentconfig": "${NAME}"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"image": "${NAME}",
|
|
"imagePullPolicy": "Always",
|
|
"name": "${NAME}",
|
|
"ports": [
|
|
{
|
|
"containerPort": 3310,
|
|
"protocol": "TCP"
|
|
}
|
|
],
|
|
"env": [
|
|
{
|
|
"name": "RealIpFrom",
|
|
"value": "${REAL_IP_FROM}"
|
|
},
|
|
{
|
|
"name": "AdditionalRealIpFromRules",
|
|
"value": "${AdditionalRealIpFromRules}"
|
|
},
|
|
{
|
|
"name": "IpFilterRules",
|
|
"value": "${IpFilterRules}"
|
|
}
|
|
],
|
|
"resources": {
|
|
"requests": {
|
|
"cpu": "10m",
|
|
"memory": "100Mi"
|
|
},
|
|
"limits": {
|
|
"cpu": "500m",
|
|
"memory": "1Gi"
|
|
}
|
|
},
|
|
"livenessProbe": {
|
|
"tcpSocket": {
|
|
"port": 3310
|
|
},
|
|
"initialDelaySeconds": 240,
|
|
"timeoutSeconds": 3,
|
|
"periodSeconds": 10,
|
|
"successThreshold": 1,
|
|
"failureThreshold": 3
|
|
},
|
|
"readinessProbe": {
|
|
"tcpSocket": {
|
|
"port": 3310
|
|
},
|
|
"initialDelaySeconds": 240,
|
|
"timeoutSeconds": 3,
|
|
"periodSeconds": 10,
|
|
"successThreshold": 1,
|
|
"failureThreshold": 3
|
|
}
|
|
}
|
|
],
|
|
"dnsPolicy": "ClusterFirst",
|
|
"restartPolicy": "Always",
|
|
"securityContext": {},
|
|
"terminationGracePeriodSeconds": 30
|
|
}
|
|
},
|
|
"test": false,
|
|
"triggers": [
|
|
{
|
|
"type": "ConfigChange"
|
|
},
|
|
{
|
|
"type": "ImageChange",
|
|
"imageChangeParams": {
|
|
"automatic": true,
|
|
"containerNames": [
|
|
"${NAME}"
|
|
],
|
|
"from": {
|
|
"kind": "ImageStreamTag",
|
|
"namespace": "${IMAGE_NAMESPACE}",
|
|
"name": "${NAME}:${TAG_NAME}"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "v1",
|
|
"kind": "Service",
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"app": "${NAME}"
|
|
},
|
|
"name": "${NAME}"
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "3310-tcp",
|
|
"port": 3310,
|
|
"protocol": "TCP",
|
|
"targetPort": 3310
|
|
}
|
|
],
|
|
"selector": {
|
|
"app": "${NAME}",
|
|
"deploymentconfig": "${NAME}"
|
|
},
|
|
"sessionAffinity": "None",
|
|
"type": "ClusterIP"
|
|
}
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The name assigned to all of the openshift objects defined in this template. It is also the name of runtime image you want.",
|
|
"displayName": "Name",
|
|
"name": "NAME",
|
|
"required": true,
|
|
"value": "clamav"
|
|
},
|
|
{
|
|
"description": "The namespace where to get the above image name",
|
|
"displayName": "Image Namespace",
|
|
"name": "IMAGE_NAMESPACE",
|
|
"required": true,
|
|
"value": "jag-csb-edivorce-tools"
|
|
},
|
|
{
|
|
"description": "The TAG name for this environment, e.g., dev, test, prod",
|
|
"displayName": "Env TAG name",
|
|
"name": "TAG_NAME",
|
|
"value": "dev"
|
|
}
|
|
]
|
|
}
|