Documentation ¶
Index ¶
Constants ¶
const RequestsTotal string = "flyte_dsw_webhook_requests_total"
Variables ¶
var RequestsTotalMetrics = promauto.NewCounterVec(prometheus.CounterOpts{ Name: RequestsTotal, Help: "Number of request processed by Webhook", }, []string{"project", "status", "operation"}, )
Functions ¶
func CreateOrUpdateMutatingWebhookConfig ¶
func CreateOrUpdateMutatingWebhookConfig(k8sClient kubernetes.Interface, webhookConfig config.WebhookConfig, caCertFilePath string) error
CreateOrUpdateMutatingWebhookConfig will create/update the MutatingWebhookConfiguration. It will read the CA file, so if there are any update to the bundle, the CA will be updated
Types ¶
type DAPWebhook ¶
type DAPWebhook struct {
// contains filtered or unexported fields
}
func NewDAPWebhook ¶
func NewDAPWebhook( k8sClientSet kubernetes.Interface, mlpClient client.MLPClient, decoder runtime.Decoder, ) DAPWebhook
func (*DAPWebhook) Mutate ¶
func (pm *DAPWebhook) Mutate(ar v1.AdmissionReview) *v1.AdmissionResponse
Mutate is intended to ingrate Flyte Secret with MLP SecretAPIClient. On 'Create' Pod invocation, it will create a secret and append env var to the pod. On 'Delete' Pod invocation, it will delete the secret
The secret name is created with pod name, with secret key as Flyte Secret Key The secret value is retrieved from MLP with Flyte Secret Key as the key
The env var created follows the same convention Flyte expects - {prefix}-{group}-{key} however the env var value is tweak to read from the above created secret
Flyte Secret Group is ignored and only key is used