Documentation ¶
Overview ¶
Package podsecurityadmission contains utility functions for managing PodSecurity-related resources
Index ¶
- func DropPSAPluginConfigFromAdmissionConfig(cluster *apisv3.Cluster)
- func GenerateAdmissionConfigFile(configurationTemplate *apisv3.PodSecurityAdmissionConfigurationTemplate, ...) ([]byte, error)
- func GetAdmissionConfigFromCluster(cluster *apisv3.Cluster) *apiserverv1.AdmissionConfiguration
- func GetClusterVersion(version string) (semver.Version, error)
- func GetPluginConfigFromCluster(cluster *apisv3.Cluster) (apiserverv1.AdmissionPluginConfiguration, bool)
- func GetPluginConfigFromTemplate(template *apisv3.PodSecurityAdmissionConfigurationTemplate, k8sVersion string) (apiserverv1.AdmissionPluginConfiguration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropPSAPluginConfigFromAdmissionConfig ¶
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 ¶
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.