Skip to content

Commit

Permalink
feature expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
tde committed Feb 22, 2022
1 parent 3d1d4f8 commit 8e47d6b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
Empty file added config.conf
Empty file.
38 changes: 38 additions & 0 deletions templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "serviceaccount" .}}
namespace: {{ .Release.Namespace }}
imagePullSecrets:
- docker-credentials
---
apiVersion: v1
kind: List
items:
#define the rights
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Name }}-cr-{{ .Release.Namespace }}
rules:
- apiGroups:
- "apps"
resources:
- deployments
- statefulsets
verbs:
- get
- list
#link the ClusterRole to the namespace
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-crb-{{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: {{ include "serviceaccount" .}}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Release.Name }}-cr-{{ .Release.Namespace }}
apiGroup: rbac.authorization.k8s.io
8 changes: 8 additions & 0 deletions templates/secret-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: docker-credentials
namespace: {{ .Release.Namespace }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "docker_credentials_tpl" . }}

0 comments on commit 8e47d6b

Please sign in to comment.