Skip to content

Instantly share code, notes, and snippets.

@exocode
Forked from chrisurwin/gitlabaccount.yaml
Last active March 26, 2019 11:50
Show Gist options
  • Save exocode/a6112f619b6049b374b49b2e4974e65d to your computer and use it in GitHub Desktop.
Save exocode/a6112f619b6049b374b49b2e4974e65d to your computer and use it in GitHub Desktop.
Gitlab Yaml for Rancher Server 2.0
apiVersion: v1
kind: Namespace
metadata:
name: gitlab-apps
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: gitlab-sa
namespace: gitlab-apps
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: gitlab-role
namespace: gitlab-apps
rules:
- apiGroups:
- ""
- extensions
resources:
- '*'
verbs:
- '*'
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: gitlab-rb
namespace: gitlab-apps
subjects:
- kind: ServiceAccount
name: gitlab-sa
namespace: gitlab-apps
roleRef:
kind: Role
name: gitlab-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: gitlab-cluster
namespace: gitlab-apps
subjects:
- kind: ServiceAccount
name: default
namespace: gitlab-apps
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Secret
metadata:
name: gitlab-secret
namespace: gitlab-apps
annotations:
kubernetes.io/service-account.name: gitlab-sa
type: kubernetes.io/service-account-token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment