30 lines
836 B
YAML
30 lines
836 B
YAML
apiVersion: admissionregistration.k8s.io/v1
|
|
kind: MutatingWebhookConfiguration
|
|
metadata:
|
|
name: gitlab-sizer-webhook
|
|
annotations:
|
|
cert-manager.io/inject-ca-from: ci-sizer/gitlab-sizer-webhook-cert
|
|
webhooks:
|
|
- name: gitlab-sizer-webhook.ci-sizer.svc
|
|
admissionReviewVersions: ["v1"]
|
|
sideEffects: NoneOnDryRun
|
|
failurePolicy: Ignore
|
|
timeoutSeconds: 5
|
|
reinvocationPolicy: Never
|
|
clientConfig:
|
|
service:
|
|
name: gitlab-sizer-webhook
|
|
namespace: ci-sizer
|
|
path: /mutate
|
|
rules:
|
|
- apiGroups: [""]
|
|
apiVersions: ["v1"]
|
|
operations: ["CREATE"]
|
|
resources: ["pods"]
|
|
namespaceSelector:
|
|
matchLabels:
|
|
ci-sizer.devfw.io/watch: "true"
|
|
objectSelector:
|
|
matchExpressions:
|
|
- key: job.runner.gitlab.com/pod
|
|
operator: Exists
|