Documentation
¶
Index ¶
- Constants
- Variables
- type LineageControllerWebhook
- func (h *LineageControllerWebhook) Handle(ctx context.Context, req admission.Request) admission.Response
- func (h *LineageControllerWebhook) InjectDecoder(d admission.Decoder) error
- func (l *LineageControllerWebhook) Map(hr *helmv2.HelmRelease) (string, string, string, error)
- func (c *LineageControllerWebhook) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (c *LineageControllerWebhook) SetupWithManagerAsController(mgr ctrl.Manager) error
- func (h *LineageControllerWebhook) SetupWithManagerAsWebhook(mgr ctrl.Manager) error
Constants ¶
View Source
const ( ManagedObjectKey = "internal.cozystack.io/managed-by-cozystack" ManagerGroupKey = "apps.cozystack.io/application.group" ManagerKindKey = "apps.cozystack.io/application.kind" ManagerNameKey = "apps.cozystack.io/application.name" )
Variables ¶
View Source
var ( NoAncestors = fmt.Errorf("no managed apps found in lineage") AncestryAmbiguous = fmt.Errorf("object ancestry is ambiguous") )
Functions ¶
This section is empty.
Types ¶
type LineageControllerWebhook ¶
type LineageControllerWebhook struct {
client.Client
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
+kubebuilder:webhook:path=/mutate-lineage,mutating=true,failurePolicy=Fail,sideEffects=None,groups="",resources=pods,secrets,services,persistentvolumeclaims,verbs=create;update,versions=v1,name=mlineage.cozystack.io,admissionReviewVersions={v1}
func (*LineageControllerWebhook) Handle ¶
func (h *LineageControllerWebhook) Handle(ctx context.Context, req admission.Request) admission.Response
Handle is called for each AdmissionReview that matches the webhook config.
func (*LineageControllerWebhook) InjectDecoder ¶
func (h *LineageControllerWebhook) InjectDecoder(d admission.Decoder) error
InjectDecoder lets controller-runtime give us a decoder for AdmissionReview requests.
func (*LineageControllerWebhook) Map ¶
func (l *LineageControllerWebhook) Map(hr *helmv2.HelmRelease) (string, string, string, error)
func (*LineageControllerWebhook) SetupWithManagerAsController ¶
func (c *LineageControllerWebhook) SetupWithManagerAsController(mgr ctrl.Manager) error
func (*LineageControllerWebhook) SetupWithManagerAsWebhook ¶
func (h *LineageControllerWebhook) SetupWithManagerAsWebhook(mgr ctrl.Manager) error
SetupWithManager registers the handler with the webhook server.
Click to show internal directories.
Click to hide internal directories.