Created
November 10, 2020 20:53
-
-
Save FreedomBen/f9c87c857400268b1ed77bda1dd9bc2e to your computer and use it in GitHub Desktop.
Complete new project template for OpenShift, with LimitRange and ResourceQuota
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
apiVersion: template.openshift.io/v1 | |
kind: Template | |
metadata: | |
creationTimestamp: null | |
name: project-request | |
namespace: openshift-config | |
objects: | |
- apiVersion: project.openshift.io/v1 | |
kind: Project | |
metadata: | |
annotations: | |
openshift.io/description: ${PROJECT_DESCRIPTION} | |
openshift.io/display-name: ${PROJECT_DISPLAYNAME} | |
openshift.io/requester: ${PROJECT_REQUESTING_USER} | |
creationTimestamp: null | |
name: ${PROJECT_NAME} | |
spec: {} | |
status: {} | |
- apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
creationTimestamp: null | |
name: admin | |
namespace: ${PROJECT_NAME} | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: admin | |
subjects: | |
- apiGroup: rbac.authorization.k8s.io | |
kind: User | |
name: ${PROJECT_ADMIN_USER} | |
- apiVersion: v1 | |
kind: LimitRange | |
metadata: | |
creationTimestamp: null | |
name: ${PROJECT_NAME}-limits | |
spec: | |
limits: | |
- type: Container | |
default: | |
cpu: 1000m | |
memory: 1Gi | |
defaultRequest: | |
cpu: 500m | |
memory: 500Mi | |
- apiVersion: v1 | |
kind: ResourceQuota | |
metadata: | |
name: ${PROJECT_NAME}-quota | |
spec: | |
hard: | |
pods: "10" | |
requests.cpu: "4" | |
requests.memory: 8Gi | |
limits.cpu: "6" | |
limits.memory: 16Gi | |
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