30 lines
2.3 KiB
YAML
30 lines
2.3 KiB
YAML
{{- if .Values.kubecostAdmissionController -}}
|
|
{{- if .Values.kubecostAdmissionController.enabled -}}
|
|
apiVersion: admissionregistration.k8s.io/v1
|
|
kind: ValidatingWebhookConfiguration
|
|
metadata:
|
|
name: kubecost-deployment-validation
|
|
webhooks:
|
|
- name: "kubecost-deployment-validation.kubecost.svc"
|
|
failurePolicy: Ignore
|
|
rules:
|
|
- operations: [ "CREATE", "UPDATE" ]
|
|
apiGroups: [ "apps" ]
|
|
apiVersions: [ "v1" ]
|
|
resources: [ "deployments" ]
|
|
scope: "*"
|
|
clientConfig:
|
|
service:
|
|
namespace: {{.Release.Namespace}}
|
|
name: webhook-server
|
|
path: "/validate"
|
|
{{- if .Values.kubecostAdmissionController.caBundle }}
|
|
caBundle: {{ .Values.kubecostAdmissionController.caBundle }}
|
|
{{- else }}
|
|
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQWV5Z0F3SUJBZ0lVR3E2YkdOaEowVjRsb0NiWHhUa0pocWkwUnB3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0pqRWtNQ0lHQTFVRUF3d2JkMlZpYUc5dmF5MXpaWEoyWlhJdWEzVmlaV052YzNRdWMzWmpNQjRYRFRJegpNREl3T1RFNU1UVTFNbG9YRFRJME1EWXlNekU1TVRVMU1sb3dKakVrTUNJR0ExVUVBd3diZDJWaWFHOXZheTF6ClpYSjJaWEl1YTNWaVpXTnZjM1F1YzNaak1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0MKQVFFQXpvU2JBejBhZFJTdEN3eVRPSGd2S2VuQ29GbWE2OC9nYTFHZjVST2dXeGJhamhQRTZKbEtBcENwK1pzKwo2bHJzL2J3bkx5SDdoMUFJa1NmZ25EYlNadDJjdHRFSmhSd25vKy90WElMYk84WndRQTErYXpUQzVtSkluZVF3CktRMkErYy9CUnk3N3B0SnZIRStkTEllcWh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