Skip to content

Instantly share code, notes, and snippets.

@rjhowe
Last active May 25, 2016 17:45
Show Gist options
  • Save rjhowe/446efd2db53a3013abdbb1e0c02ecdd3 to your computer and use it in GitHub Desktop.
Save rjhowe/446efd2db53a3013abdbb1e0c02ecdd3 to your computer and use it in GitHub Desktop.
> cat project-request.json
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "project-request",
"creationTimestamp": null
},
"objects": [
{
"kind": "Project",
"apiVersion": "v1",
"metadata": {
"name": "${PROJECT_NAME}",
"creationTimestamp": null,
"annotations": {
"openshift.io/description": "${PROJECT_DESCRIPTION}",
"openshift.io/display-name": "${PROJECT_DISPLAYNAME}",
"openshift.io/requester": "${PROJECT_REQUESTING_USER}"
}
},
"spec": {},
"status": {}
},
{
"apiVersion": "v1",
"kind": "ResourceQuota",
"metadata": {
"name": "object-counts"
},
"spec": {
"hard": {
"replicationcontrollers": "10",
"services": "10",
"persistentvolumeclaims": "10"
}
}
},
{
"apiVersion": "v1",
"kind": "ResourceQuota",
"metadata": {
"name": "compute-resources"
},
"spec": {
"hard": {
"limits.cpu": "10",
"limits.memory": "10Gi"
},
"scopes": [
"NotTerminating"
]
}
},
{
"apiVersion": "v1",
"kind": "ResourceQuota",
"metadata": {
"name": "compute-resources-timebound"
},
"spec": {
"hard": {
"limits.cpu": "10",
"limits.memory": "10Mi"
},
"scopes": [
"Terminating"
]
}
},
{
"apiVersion": "v1",
"kind": "LimitRange",
"metadata": {
"creationTimestamp": null,
"name": "resource-limits"
},
"spec": {
"limits": [
{
"type": "Pod",
"max": {
"cpu": "10",
"memory": "10Gi"
},
"min": {
"cpu": "1m",
"memory": "10Mi"
}
},
{
"type": "Container",
"default": {
"cpu": "10",
"memory": "10Mi"
},
"defaultRequest": {
"cpu": "10m",
"memory": "10Mi"
},
"max": {
"cpu": "10",
"memory": "10Gi"
},
"min": {
"cpu": "10m",
"memory": "10Mi"
}
}
]
}
},
{
"kind": "RoleBinding",
"apiVersion": "v1",
"metadata": {
"name": "admin",
"namespace": "${PROJECT_NAME}",
"creationTimestamp": null
},
"userNames": [
"${PROJECT_ADMIN_USER}"
],
"groupNames": null,
"subjects": [
{
"kind": "User",
"name": "${PROJECT_ADMIN_USER}"
}
],
"roleRef": {
"name": "admin"
}
},
{
"kind": "RoleBinding",
"apiVersion": "v1",
"metadata": {
"name": "system:image-pullers",
"namespace": "${PROJECT_NAME}",
"creationTimestamp": null
},
"userNames": null,
"groupNames": [
"system:serviceaccounts:${PROJECT_NAME}"
],
"subjects": [
{
"kind": "SystemGroup",
"name": "system:serviceaccounts:${PROJECT_NAME}"
}
],
"roleRef": {
"name": "system:image-puller"
}
},
{
"kind": "RoleBinding",
"apiVersion": "v1",
"metadata": {
"name": "system:image-builders",
"namespace": "${PROJECT_NAME}",
"creationTimestamp": null
},
"userNames": [
"system:serviceaccount:${PROJECT_NAME}:builder"
],
"groupNames": null,
"subjects": [
{
"kind": "ServiceAccount",
"name": "builder"
}
],
"roleRef": {
"name": "system:image-builder"
}
},
{
"kind": "RoleBinding",
"apiVersion": "v1",
"metadata": {
"name": "system:deployers",
"namespace": "${PROJECT_NAME}",
"creationTimestamp": null
},
"userNames": [
"system:serviceaccount:${PROJECT_NAME}:deployer"
],
"groupNames": null,
"subjects": [
{
"kind": "ServiceAccount",
"name": "deployer"
}
],
"roleRef": {
"name": "system:deployer"
}
}
],
"parameters": [
{
"name": "PROJECT_NAME"
},
{
"name": "PROJECT_DISPLAYNAME"
},
{
"name": "PROJECT_DESCRIPTION"
},
{
"name": "PROJECT_ADMIN_USER"
},
{
"name": "PROJECT_REQUESTING_USER"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment