Documentation ¶
Index ¶
- Constants
- func CertificateToPem(certificateDER []byte) []byte
- func GenerateCACert(certValidityDuration time.Duration) ([]byte, *rsa.PrivateKey, error)
- func GenerateCertPem(caCertRaw []byte, caKey *rsa.PrivateKey, certValidityDuration time.Duration) ([]byte, *rsa.PrivateKey, error)
- func GetContainersFromResource(req *v1beta1.AdmissionReview) ([]corev1.Container, error)
- func New() *sigrunController
- func NewError(message string, err error) error
- func ParseSigrunConfigMap(configMap *corev1.ConfigMap) (map[string]*RepoInfo, map[string][]string, error)
- func PrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte
- func ValidateContainers(configMap *v1.ConfigMap, containers []v1.Container) error
- type ConfigMapCache
- type ContainerValidationError
- type Error
- type RepoInfo
Constants ¶
View Source
const ( CONTROLLER_TYPE_SIGRUN = "sigrun" GUID_TO_REPO_INFO = "guid_to_repo_info" IMAGE_TO_GUIDS = "image_to_guids" )
View Source
const ( SIGRUN_CONTROLLER_CONFIG = "sigrun-controller-config" SIGRUN_CONTROLLER_NAMESPACE = "default" )
Variables ¶
This section is empty.
Functions ¶
func GenerateCACert ¶
GenerateCACert creates the self-signed CA cert and private key it will be used to sign the webhook server certificate
func GenerateCertPem ¶
func GenerateCertPem(caCertRaw []byte, caKey *rsa.PrivateKey, certValidityDuration time.Duration) ([]byte, *rsa.PrivateKey, error)
GenerateCertPem takes the results of GenerateCACert and uses it to create the PEM-encoded public certificate and private key, respectively
func GetContainersFromResource ¶
func GetContainersFromResource(req *v1beta1.AdmissionReview) ([]corev1.Container, error)
getContainersFromPodOrDeployment returns the containers from a kubernetes object
func ParseSigrunConfigMap ¶
func PrivateKeyToPem ¶
func PrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte
PrivateKeyToPem Creates PEM block from private key object
Types ¶
type ConfigMapCache ¶
type ConfigMapCache struct {
// contains filtered or unexported fields
}
func NewConfigMapCache ¶
func NewConfigMapCache(client *kubernetes.Clientset) *ConfigMapCache
TODO ideally should invalidate cache when config map is updated instead of every 5 seconds, well something is better than nothing
type ContainerValidationError ¶
type ContainerValidationError error
type RepoInfo ¶
type RepoInfo struct { config.VerificationInfo Path string }
Click to show internal directories.
Click to hide internal directories.