Documentation ¶
Index ¶
- Constants
- func AddAcornProjectLabel(req router.Request, resp router.Response) error
- func AssignNamespace(req router.Request, resp router.Response) (err error)
- func CheckImageAllowedHandler(transport http.RoundTripper) router.HandlerFunc
- func DeploySpec(req router.Request, resp router.Response) (err error)
- func FilterLabelsAndAnnotationsConfig(h router.Handler) router.Handler
- func IgnoreTerminatingNamespace(h router.Handler) router.Handler
- func ImagePulled(h router.Handler) router.Handler
- func OnError(req router.Request, resp router.Response, err error) error
- func ParseAppImage(req router.Request, resp router.Response) error
- func PullAppImage(transport http.RoundTripper, recorder event.Recorder) router.HandlerFunc
- func ReleaseVolume(req router.Request, resp router.Response) error
- func RequireNamespace(h router.Handler) router.Handler
- func ToDeployments(req router.Request, appInstance *v1.AppInstance, tag name.Reference, ...) (result []kclient.Object, _ error)
- func UpdateObservedFields(req router.Request, resp router.Response) error
- type AppImagePullEventDetails
- type ImageSummary
- type PullSecrets
Constants ¶
View Source
const ( AppImagePullFailureEventType = "AppImagePullFailure" AppImagePullSuccessEventType = "AppImagePullSuccess" )
View Source
const ( AcornHelper = " /acorn-helper" AcornHelperPath = "/.acorn" )
Variables ¶
This section is empty.
Functions ¶
func AddAcornProjectLabel ¶
func CheckImageAllowedHandler ¶
func CheckImageAllowedHandler(transport http.RoundTripper) router.HandlerFunc
CheckImageAllowedHandler is a router handler that checks if the image is allowed by the image allow rules and sets a status field accordingly This is only working on the currently specified image, referenced by digest, to avoid false positives (alerts) if the remote image has been updated
func PullAppImage ¶
func PullAppImage(transport http.RoundTripper, recorder event.Recorder) router.HandlerFunc
func ToDeployments ¶
func ToDeployments(req router.Request, appInstance *v1.AppInstance, tag name.Reference, pullSecrets *PullSecrets, secrets *secrets.Interpolator) (result []kclient.Object, _ error)
Types ¶
type AppImagePullEventDetails ¶
type AppImagePullEventDetails struct { // ResourceVersion is the resourceVersion of the App the image is being pulled for. ResourceVersion string `json:"resourceVersion"` // AutoUpgrade is true if the pull was triggered by an auto-upgrade, false otherwise. AutoUpgrade bool `json:"autoUpgrade"` // Previous is the App image before pulling, if any. // +optional Previous ImageSummary `json:"previous,omitempty"` // Target is the image being pulled. Target ImageSummary `json:"target"` // Err is an error that occurred during the pull, if any. // +optional Err string `json:"err,omitempty"` }
AppImagePullEventDetails captures additional info about an App image pull.
type ImageSummary ¶
type PullSecrets ¶
type PullSecrets struct {
// contains filtered or unexported fields
}
func NewPullSecrets ¶
func NewPullSecrets(req router.Request, appInstance *v1.AppInstance) (*PullSecrets, error)
func (*PullSecrets) Err ¶
func (p *PullSecrets) Err() error
func (*PullSecrets) ForAcorn ¶
func (p *PullSecrets) ForAcorn(acornName, image string) []corev1.LocalObjectReference
func (*PullSecrets) ForContainer ¶
func (p *PullSecrets) ForContainer(containerName string, containers []corev1.Container) []corev1.LocalObjectReference
func (*PullSecrets) Objects ¶
func (p *PullSecrets) Objects() []kclient.Object
Click to show internal directories.
Click to hide internal directories.