roles

package
v0.0.0-...-6644658 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClusterRoleName is the name of the ClusterRole created to allow the
	// servie account to deploy into different environments.
	ClusterRoleName = "pipelines-clusterrole"
)

Variables

This section is empty.

Functions

func AddSecretToSA

func AddSecretToSA(sa *corev1.ServiceAccount, secretName string) *corev1.ServiceAccount

AddSecretToSA grants the provided ServiceAccount access to the named secret.

func ClusterRoleBindingForSubjects

func ClusterRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, subjects []v1rbac.Subject) *v1rbac.ClusterRoleBinding

func CreateClusterRole

func CreateClusterRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.ClusterRole

CreateClusterRole creates and returns a ClusterRole given a name and policy rules.

func CreateClusterRoleBinding

func CreateClusterRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, roleKind, roleName string) *v1rbac.ClusterRoleBinding

func CreateRole

func CreateRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.Role

CreateRole creates a Role given a name and policyRules

func CreateRoleBinding

func CreateRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, roleKind, roleName string) *v1rbac.RoleBinding

CreateRoleBinding creates and returns a new RoleBinding given name, sa, roleKind, and roleName

func CreateRoleBindingForSubjects

func CreateRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, subjects []v1rbac.Subject) *v1rbac.RoleBinding

CreateRoleBindingForSubjects creates a RoleBinding with multiple subjects

func CreateServiceAccount

func CreateServiceAccount(name types.NamespacedName) *corev1.ServiceAccount

CreateServiceAccount creates and returns a new ServiceAccount in the provided namespace.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL