Documentation ¶
Index ¶
- func AddToScheme(scheme *runtime.Scheme) error
- func GetOpenshiftPodSecurityContextRestricted(ctx context.Context, client kubernetes.Interface, namespace string) (*corev1.PodSecurityContext, error)
- func GetOpenshiftSecurityContextRestricted(ctx context.Context, client kubernetes.Interface, namespace string) (*corev1.SecurityContext, error)
- func GetOpenshiftUser(ctx context.Context, client kubernetes.Interface, namespace string) (*int64, error)
- func IsOpenShift(client kubernetes.Interface) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToScheme ¶
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.