diff --git a/README.md b/README.md index d47a82a..d6eb514 100644 --- a/README.md +++ b/README.md @@ -208,4 +208,4 @@ kubectl config set-context $USER --cluster=mainframe --namespace=$USER --user=$U # Test if everything worked kubectl --context=$USER-context get pods -``` \ No newline at end of file +``` diff --git a/namespace/templates/clusterrole.yaml b/namespace/templates/clusterrole.yaml new file mode 100644 index 0000000..44f0dfa --- /dev/null +++ b/namespace/templates/clusterrole.yaml @@ -0,0 +1,12 @@ +# kind: ClusterRole +# apiVersion: rbac.authorization.k8s.io/v1 +# metadata: +# name: user-readonly +# rules: +# - apiGroups: +# - rbac.authorization.k8s.io +# resources: +# - clusterroles +# verbs: +# - list +# - watch diff --git a/namespace/templates/resourcequota.yaml b/namespace/templates/resourcequota.yaml index a769355..982b861 100644 --- a/namespace/templates/resourcequota.yaml +++ b/namespace/templates/resourcequota.yaml @@ -1,11 +1,11 @@ -apiVersion: v1 -kind: ResourceQuota -metadata: - name: default - namespace: {{ .Release.Name }} -spec: - hard: - requests.cpu: "6" - requests.memory: "6Gi" - limits.cpu: "12" - limits.memory: "12Gi" \ No newline at end of file +# apiVersion: v1 +# kind: ResourceQuota +# metadata: +# name: default +# namespace: {{ .Release.Name }} +# spec: +# hard: +# requests.cpu: "6" +# requests.memory: "6Gi" +# limits.cpu: "24" +# limits.memory: "20Gi" \ No newline at end of file diff --git a/namespace/templates/role.yaml b/namespace/templates/role.yaml index 5262b45..fab5c0c 100644 --- a/namespace/templates/role.yaml +++ b/namespace/templates/role.yaml @@ -15,6 +15,7 @@ rules: - rbac.authorization.k8s.io - metrics.k8s.io - policy + - cert-manager.io resources: - deployments - replicasets @@ -39,12 +40,16 @@ rules: - middlewares - endpoints - deployments/scale + - poddisruptionbudgets + - certificates + - roles verbs: - "*" - apiGroups: - "" - metrics.k8s.io - rbac.authorization.k8s.io + - policy resources: - resourcequotas - roles @@ -94,6 +99,7 @@ rules: - resourcequotas - roles - endpoints + - clusterroles verbs: - list - - watch \ No newline at end of file + - watch diff --git a/namespace/templates/rolebinding.yaml b/namespace/templates/rolebinding.yaml index 171e990..8cae110 100644 --- a/namespace/templates/rolebinding.yaml +++ b/namespace/templates/rolebinding.yaml @@ -10,4 +10,17 @@ subjects: roleRef: kind: Role name: namespace-manager - apiGroup: "" \ No newline at end of file + apiGroup: "" +# --- +# kind: ClusterRoleBinding +# apiVersion: rbac.authorization.k8s.io/v1 +# metadata: +# name: user-readonly +# subjects: +# - kind: User +# name: {{ .Values.user }} +# apiGroup: "" +# roleRef: +# kind: ClusterRole +# name: user-readonly +# apiGroup: ""