Documentation
¶
Index ¶
- Constants
- type Mutator
- func (m *Mutator) Admit(request *admission.Request) (*admissionv1.AdmissionResponse, error)
- func (m *Mutator) GVR() schema.GroupVersionResource
- func (m *Mutator) MutatingWebhook(clientConfig admissionregistrationv1.WebhookClientConfig) []admissionregistrationv1.MutatingWebhook
- func (m *Mutator) Operations() []admissionregistrationv1.OperationType
Constants ¶
View Source
const ( // AllowFleetWorkspaceCreationForExistingNamespaceAnn is an annotation key to indicate that a fleet workspace may be created // for a namespace that already exists. AllowFleetWorkspaceCreationForExistingNamespaceAnn = "field.cattle.io/allow-fleetworkspace-creation-for-existing-namespace" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutator ¶
type Mutator struct {
// contains filtered or unexported fields
}
Mutator implements admission.MutatingAdmissionWebhook.
func NewMutator ¶
NewMutator returns an initialized Mutator.
func (*Mutator) Admit ¶
func (m *Mutator) Admit(request *admission.Request) (*admissionv1.AdmissionResponse, error)
When fleetworkspace is created, it will create the following resources: 1. Namespace. It will have the same name as fleetworkspace 2. fleetworkspace ClusterRole. It will create the cluster role that has * permission only to the current workspace 3. Two roleBinding to bind the current user to fleet-admin roles and fleetworkspace roles
func (*Mutator) GVR ¶
func (m *Mutator) GVR() schema.GroupVersionResource
GVR returns the GroupVersionKind for this CRD.
func (*Mutator) MutatingWebhook ¶
func (m *Mutator) MutatingWebhook(clientConfig admissionregistrationv1.WebhookClientConfig) []admissionregistrationv1.MutatingWebhook
MutatingWebhook returns the MutatingWebhook used for this CRD.
func (*Mutator) Operations ¶
func (m *Mutator) Operations() []admissionregistrationv1.OperationType
Operations returns list of operations handled by this mutator.
Click to show internal directories.
Click to hide internal directories.