openshift

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToScheme

func AddToScheme(scheme *runtime.Scheme) error

AddToScheme adds OpenShift types to the scheme.

func GetOpenshiftPodSecurityContextRestricted

func GetOpenshiftPodSecurityContextRestricted(ctx context.Context, client kubernetes.Interface, namespace string) (*corev1.PodSecurityContext, error)

GetOpenshiftPodSecurityContextRestricted return the PodSecurityContext (https://docs.openshift.com/container-platform/4.12/authentication/managing-security-context-constraints.html): FsGroup set to the minimum value in the "openshift.io/sa.scc.supplemental-groups" annotation if exists, else falls back to minimum value "openshift.io/sa.scc.uid-range" annotation.

func GetOpenshiftSecurityContextRestricted

func GetOpenshiftSecurityContextRestricted(ctx context.Context, client kubernetes.Interface, namespace string) (*corev1.SecurityContext, error)

GetOpenshiftSecurityContextRestricted return the PodSecurityContext (https://docs.openshift.com/container-platform/4.12/authentication/managing-security-context-constraints.html): User set to the minimum value in the "openshift.io/sa.scc.uid-range" annotation.

func GetOpenshiftUser

func GetOpenshiftUser(ctx context.Context, client kubernetes.Interface, namespace string) (*int64, error)

GetOpenshiftUser return the UserId (https://docs.openshift.com/container-platform/4.12/authentication/managing-security-context-constraints.html): User set to the minimum value in the "openshift.io/sa.scc.uid-range" annotation.

func IsOpenShift

func IsOpenShift(client kubernetes.Interface) (bool, error)

IsOpenShift returns true if we are connected to a OpenShift cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

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