webhook

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const RequestsTotal string = "flyte_dsw_webhook_requests_total"

Variables

View Source
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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL