util

package
v3.7.56-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterRoleBindingFromRBAC

func ClusterRoleBindingFromRBAC(obj *rbac.ClusterRoleBinding) (*authorizationapi.ClusterRoleBinding, error)

ClusterRoleBindingFromRBAC turns a Kuberenets RBAC ClusterRoleBinding into an Openshift ClusterRoleBinding, the returned object is safe to mutate

func ClusterRoleBindingToRBAC

func ClusterRoleBindingToRBAC(obj *authorizationapi.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)

ClusterRoleBindingToRBAC turns an OpenShift ClusterRoleBinding into a Kubernetes RBAC ClusterRoleBinding, the returned object is safe to mutate

func ClusterRoleFromRBAC

func ClusterRoleFromRBAC(obj *rbac.ClusterRole) (*authorizationapi.ClusterRole, error)

ClusterRoleFromRBAC turns a Kubernetes RBAC ClusterRole into an Openshift ClusterRole, the returned object is safe to mutate

func ClusterRoleToRBAC

func ClusterRoleToRBAC(obj *authorizationapi.ClusterRole) (*rbac.ClusterRole, error)

ClusterRoleToRBAC turns an OpenShift ClusterRole into a Kubernetes RBAC ClusterRole, the returned object is safe to mutate

func ConvertToRBACClusterRole

func ConvertToRBACClusterRole(originClusterRole *authorizationapi.ClusterRole) (*rbac.ClusterRole, error)

ConvertToRBACClusterRole performs the conversion and guarantees the returned object is safe to mutate.

func ConvertToRBACClusterRoleBinding

func ConvertToRBACClusterRoleBinding(originClusterRoleBinding *authorizationapi.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)

ConvertToRBACClusterRoleBinding performs the conversion and guarantees the returned object is safe to mutate.

func ConvertToRBACRole

func ConvertToRBACRole(originRole *authorizationapi.Role) (*rbac.Role, error)

ConvertToRBACRole performs the conversion and guarantees the returned object is safe to mutate.

func ConvertToRBACRoleBinding

func ConvertToRBACRoleBinding(originRoleBinding *authorizationapi.RoleBinding) (*rbac.RoleBinding, error)

ConvertToRBACRoleBinding performs the conversion and guarantees the returned object is safe to mutate.

func PrepareForUpdateClusterRole

func PrepareForUpdateClusterRole(newClusterRole, existingClusterRole *rbac.ClusterRole) bool

PrepareForUpdateClusterRole compares newClusterRole with existingClusterRole to determine if an update is required. newClusterRole must be safe to modify as it is mutated during the comparison which must ignore fields that will never match. Returns true if an update is required, in which case newClusterRole should be passed to Update.

func PrepareForUpdateClusterRoleBinding

func PrepareForUpdateClusterRoleBinding(newClusterRoleBinding, existingClusterRoleBinding *rbac.ClusterRoleBinding) bool

PrepareForUpdateClusterRoleBinding compares newClusterRoleBinding with existingClusterRoleBinding to determine if an update is required. newClusterRoleBinding must be safe to modify as it is mutated during the comparison which must ignore fields that will never match. Returns true if an update is required, in which case newClusterRoleBinding should be passed to Update.

func PrepareForUpdateRole

func PrepareForUpdateRole(newRole, existingRole *rbac.Role) bool

PrepareForUpdateRole compares newRole with existingRole to determine if an update is required. newRole must be safe to modify as it is mutated during the comparison which must ignore fields that will never match. Returns true if an update is required, in which case newRole should be passed to Update.

func PrepareForUpdateRoleBinding

func PrepareForUpdateRoleBinding(newRoleBinding, existingRoleBinding *rbac.RoleBinding) bool

PrepareForUpdateRoleBinding compares newRoleBinding with existingRoleBinding to determine if an update is required. newRoleBinding must be safe to modify as it is mutated during the comparison which must ignore fields that will never match. Returns true if an update is required, in which case newRoleBinding should be passed to Update.

func RoleBindingFromRBAC

func RoleBindingFromRBAC(obj *rbac.RoleBinding) (*authorizationapi.RoleBinding, error)

RoleBindingFromRBAC turns a Kubernetes RBAC RoleBinding into an OpenShift Rolebinding, the returned object is safe to mutate

func RoleBindingToRBAC

func RoleBindingToRBAC(obj *authorizationapi.RoleBinding) (*rbac.RoleBinding, error)

RoleBindingToRBAC turns an OpenShift RoleBinding into a Kubernetes RBAC Rolebinding, the returned object is safe to mutate

func RoleFromRBAC

func RoleFromRBAC(obj *rbac.Role) (*authorizationapi.Role, error)

RoleFromRBAC turns a Kubernetes RBAC Role into an OpenShift Role, the returned object is safe to mutate

func RoleToRBAC

func RoleToRBAC(obj *authorizationapi.Role) (*rbac.Role, error)

RoleToRBAC turns an OpenShift Role into a Kubernetes RBAC Role, the returned object is safe to mutate

func ToDefaultAuthorizationAttributes

func ToDefaultAuthorizationAttributes(user user.Info, namespace string, in authorizationapi.Action) authorizer.Attributes

ToDefaultAuthorizationAttributes coerces Action to authorizer.Attributes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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