Created
April 16, 2015 14:48
-
-
Save goern/5e31e91d201a2170a25b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"kind":"Template", | |
"metadata": { | |
"name": "docker-registry-template", | |
"annotations": { | |
"description": "Template for launching a docker-registry pod" | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "OPENSHIFT_MASTER", | |
"description": "OpenShift master", | |
"value": "http://ose3-master.example.com:8443" | |
}, | |
{ | |
"name": "OPENSHIFT_CA_DATA", | |
"description": "OpenShift root certificates" | |
}, | |
{ | |
"name": "OPENSHIFT_CERT_DATA", | |
"description": "OpenShift client certificate" | |
}, | |
{ | |
"name": "OPENSHIFT_KEY_DATA", | |
"description": "OpenShift client certificate key" | |
} | |
], | |
"apiVersion":"v1beta1", | |
"creationTimestamp":"2014-09-18T18:28:38-04:00", | |
"items":[ | |
{ | |
"apiVersion":"v1beta2", | |
"creationTimestamp":null, | |
"id":"docker-registry", | |
"kind":"Service", | |
"port":5001, | |
"containerPort":5000, | |
"selector":{ | |
"name":"registrypod" | |
} | |
}, | |
{ | |
"metadata":{ | |
"name":"docker-registry" | |
}, | |
"kind":"DeploymentConfig", | |
"apiVersion":"v1beta1", | |
"triggers":[ | |
{ | |
"type":"ConfigChange" | |
} | |
], | |
"template":{ | |
"strategy":{ | |
"type":"Recreate" | |
}, | |
"controllerTemplate":{ | |
"replicas":1, | |
"replicaSelector":{ | |
"name":"registrypod" | |
}, | |
"podTemplate":{ | |
"desiredState":{ | |
"manifest":{ | |
"containers":[ | |
{ | |
"image":"docker-buildvm-rhose.usersys.redhat.com:5000/openshift3_beta/ose-docker-registry", | |
"imagePullPolicy":"PullIfNotPresent", | |
"name":"registry-container", | |
"ports":[ | |
{ | |
"containerPort":5000, | |
"protocol":"TCP" | |
} | |
], | |
"env":[ | |
{ | |
"name":"STORAGE_PATH", | |
"value":"/tmp/openshift.local.registry" | |
}, | |
{ | |
"name": "OPENSHIFT_MASTER", | |
"value": "${OPENSHIFT_MASTER}" | |
}, | |
{ | |
"name": "OPENSHIFT_CA_DATA", | |
"value": "${OPENSHIFT_CA_DATA}" | |
}, | |
{ | |
"name": "OPENSHIFT_CERT_DATA", | |
"value": "${OPENSHIFT_CERT_DATA}" | |
}, | |
{ | |
"name": "OPENSHIFT_KEY_DATA", | |
"value": "${OPENSHIFT_KEY_DATA}" | |
} | |
], | |
"volumeMounts":[ | |
{ | |
"name":"registry-storage", | |
"mountPath":"/tmp/openshift.local.registry", | |
"readOnly":false | |
} | |
], | |
"command": ["sh", "-c", "echo \"$OPENSHIFT_CA_DATA\" > $STORAGE_PATH/root.crt && REGISTRY_URL=${DOCKER_REGISTRY_SERVICE_HOST}:${DOCKER_REGISTRY_SERVICE_PORT} OPENSHIFT_URL=${OPENSHIFT_MASTER}/osapi/v1beta1 OPENSHIFT_CA_BUNDLE=$STORAGE_PATH/root.crt exec docker-registry"], | |
"privileged":true | |
} | |
], | |
"version":"v1beta1", | |
"volumes":[ | |
{ | |
"name":"registry-storage", | |
"source":{ | |
"hostDir":{ | |
"path":"/tmp/openshift.local.registry" | |
} | |
} | |
} | |
] | |
}, | |
"restartpolicy":{ | |
} | |
}, | |
"labels":{ | |
"name":"registrypod" | |
} | |
} | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment