Documentation ¶
Index ¶
- Constants
- func AddSecretToSA(sa *corev1.ServiceAccount, secretName string) *corev1.ServiceAccount
- func ClusterRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, ...) *v1rbac.ClusterRoleBinding
- func CreateClusterRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.ClusterRole
- func CreateClusterRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, ...) *v1rbac.ClusterRoleBinding
- func CreateRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.Role
- func CreateRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, ...) *v1rbac.RoleBinding
- func CreateRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, ...) *v1rbac.RoleBinding
- func CreateServiceAccount(name types.NamespacedName) *corev1.ServiceAccount
Constants ¶
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
ClusterRoleBindingForSubjects creates and returns a ClusterRoleBinding associating the subjects with the specified role.
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
CreateClusterRoleBinding creates and returns a new ClusterRoleBinding associating the service account with a role.
func CreateRole ¶
func CreateRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.Role
CreateRole creates and returns 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 and returns 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.