podsecurityadmission

package
v0.4.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package podsecurityadmission contains utility functions for managing PodSecurity-related resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropPSAPluginConfigFromAdmissionConfig

func DropPSAPluginConfigFromAdmissionConfig(cluster *apisv3.Cluster)

DropPSAPluginConfigFromAdmissionConfig removes the PluginConfig for PodSecurity from a Cluster if it has one.

func GenerateAdmissionConfigFile

func GenerateAdmissionConfigFile(configurationTemplate *apisv3.PodSecurityAdmissionConfigurationTemplate, k8sVersion string) ([]byte, error)

GenerateAdmissionConfigFile generates the admission configuration file for PodSecurity based on the provided PodSecurityAdmissionConfigurationTemplate. The k8sVersion is required for determining the API version.

func GetAdmissionConfigFromCluster

func GetAdmissionConfigFromCluster(cluster *apisv3.Cluster) *apiserverv1.AdmissionConfiguration

GetAdmissionConfigFromCluster generates an AdmissionConfiguration from a Cluster, or a one with default values if the cluster does not have one.

func GetClusterVersion

func GetClusterVersion(version string) (semver.Version, error)

GetClusterVersion parses and returns a k8s version.

func GetPluginConfigFromCluster

func GetPluginConfigFromCluster(cluster *apisv3.Cluster) (apiserverv1.AdmissionPluginConfiguration, bool)

GetPluginConfigFromCluster generates a PluginConfig for PodSecurity from a Cluster, or a new one with default values if the cluster does not have one. True is returned if a PluginConfig is found in the cluster.

func GetPluginConfigFromTemplate

func GetPluginConfigFromTemplate(template *apisv3.PodSecurityAdmissionConfigurationTemplate, k8sVersion string) (apiserverv1.AdmissionPluginConfiguration, error)

GetPluginConfigFromTemplate generates a PluginConfig for PodSecurity from a PodSecurityAdmissionConfigurationTemplate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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