github.com/verrazzano/verrazzano@v1.7.0/platform-operator/helm_config/charts/verrazzano-application-operator/templates/validatingwebhookconfiguration.yaml (about)

     1  # Copyright (c) 2020, 2022, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  ---
     4  apiVersion: admissionregistration.k8s.io/v1
     5  kind: ValidatingWebhookConfiguration
     6  metadata:
     7    name: verrazzano-application-ingresstrait-validator
     8    namespace: {{ .Values.namespace }}
     9    labels:
    10      app: {{ .Values.name }}-webhook
    11  webhooks:
    12    - name: verrazzano-application-ingresstrait-validator.verrazzano.io
    13      namespaceSelector:
    14        matchExpressions:
    15          - { key: verrazzano.io/namespace, operator: NotIn, values: [ kube-system ] }
    16      clientConfig:
    17        service:
    18          name: {{ .Values.name }}-webhook
    19          namespace: {{ .Values.namespace }}
    20          path: "/validate-oam-verrazzano-io-v1alpha1-ingresstrait"
    21      rules:
    22        - apiGroups:
    23            - oam.verrazzano.io
    24          apiVersions:
    25            - v1alpha1
    26          operations:
    27            - CREATE
    28            - UPDATE
    29          resources:
    30            - ingresstraits
    31      sideEffects: None
    32      failurePolicy: Fail
    33      matchPolicy: Exact
    34      timeoutSeconds: 30
    35      admissionReviewVersions:
    36        - v1beta1
    37        - v1
    38  ---
    39  apiVersion: admissionregistration.k8s.io/v1
    40  kind: ValidatingWebhookConfiguration
    41  metadata:
    42    name: verrazzano-application-verrazzanoproject
    43    namespace: {{ .Values.namespace }}
    44    labels:
    45      app: {{ .Values.name }}-webhook
    46  webhooks:
    47    - name: verrazzano-clusters-verrazzanoproject-validator.verrazzano.io
    48      namespaceSelector:
    49        matchExpressions:
    50          - { key: verrazzano.io/namespace, operator: NotIn, values: [ kube-system ] }
    51      clientConfig:
    52        service:
    53          name: {{ .Values.name }}-webhook
    54          namespace: {{ .Values.namespace }}
    55          path: "/validate-clusters-verrazzano-io-v1alpha1-verrazzanoproject"
    56      rules:
    57        - apiGroups:
    58            - clusters.verrazzano.io
    59          apiVersions:
    60            - v1alpha1
    61          operations:
    62            - CREATE
    63            - UPDATE
    64          resources:
    65            - verrazzanoprojects
    66      sideEffects: None
    67      failurePolicy: Fail
    68      matchPolicy: Exact
    69      timeoutSeconds: 30
    70      admissionReviewVersions:
    71        - v1beta1
    72        - v1
    73  ---
    74  apiVersion: admissionregistration.k8s.io/v1
    75  kind: ValidatingWebhookConfiguration
    76  metadata:
    77    name: verrazzano-application-multiclusterapplicationconfiguration
    78    namespace: {{ .Values.namespace }}
    79    labels:
    80      app: {{ .Values.name }}-webhook
    81  webhooks:
    82    - name: verrazzano-clusters-multiclusterapplicationconfiguration-validator.verrazzano.io
    83      namespaceSelector:
    84        matchExpressions:
    85          - { key: verrazzano.io/namespace, operator: NotIn, values: [ kube-system ] }
    86      clientConfig:
    87        service:
    88          name: {{ .Values.name }}-webhook
    89          namespace: {{ .Values.namespace }}
    90          path: "/validate-clusters-verrazzano-io-v1alpha1-multiclusterapplicationconfiguration"
    91      rules:
    92        - apiGroups:
    93            - clusters.verrazzano.io
    94          apiVersions:
    95            - v1alpha1
    96          operations:
    97            - CREATE
    98            - UPDATE
    99          resources:
   100            - multiclusterapplicationconfigurations
   101      sideEffects: None
   102      failurePolicy: Fail
   103      matchPolicy: Exact
   104      timeoutSeconds: 30
   105      admissionReviewVersions:
   106        - v1beta1
   107        - v1
   108  ---
   109  apiVersion: admissionregistration.k8s.io/v1
   110  kind: ValidatingWebhookConfiguration
   111  metadata:
   112    name: verrazzano-application-multiclustercomponent
   113    namespace: {{ .Values.namespace }}
   114    labels:
   115      app: {{ .Values.name }}-webhook
   116  webhooks:
   117    - name: verrazzano-clusters-multiclustercomponent-validator.verrazzano.io
   118      namespaceSelector:
   119        matchExpressions:
   120          - { key: verrazzano.io/namespace, operator: NotIn, values: [ kube-system ] }
   121      clientConfig:
   122        service:
   123          name: {{ .Values.name }}-webhook
   124          namespace: {{ .Values.namespace }}
   125          path: "/validate-clusters-verrazzano-io-v1alpha1-multiclustercomponent"
   126      rules:
   127        - apiGroups:
   128            - clusters.verrazzano.io
   129          apiVersions:
   130            - v1alpha1
   131          operations:
   132            - CREATE
   133            - UPDATE
   134          resources:
   135            - multiclustercomponents
   136      sideEffects: None
   137      failurePolicy: Fail
   138      matchPolicy: Exact
   139      timeoutSeconds: 30
   140      admissionReviewVersions:
   141        - v1beta1
   142        - v1
   143  ---
   144  apiVersion: admissionregistration.k8s.io/v1
   145  kind: ValidatingWebhookConfiguration
   146  metadata:
   147    name: verrazzano-application-multiclusterconfigmap
   148    namespace: {{ .Values.namespace }}
   149    labels:
   150      app: {{ .Values.name }}-webhook
   151  webhooks:
   152    - name: verrazzano-clusters-multiclusterconfigmap-validator.verrazzano.io
   153      namespaceSelector:
   154        matchExpressions:
   155          - { key: verrazzano.io/namespace, operator: NotIn, values: [ kube-system ] }
   156      clientConfig:
   157        service:
   158          name: {{ .Values.name }}-webhook
   159          namespace: {{ .Values.namespace }}
   160          path: "/validate-clusters-verrazzano-io-v1alpha1-multiclusterconfigmap"
   161      rules:
   162        - apiGroups:
   163            - clusters.verrazzano.io
   164          apiVersions:
   165            - v1alpha1
   166          operations:
   167            - CREATE
   168            - UPDATE
   169          resources:
   170            - multiclusterconfigmaps
   171      sideEffects: None
   172      failurePolicy: Fail
   173      matchPolicy: Exact
   174      timeoutSeconds: 30
   175      admissionReviewVersions:
   176        - v1beta1
   177        - v1
   178  ---
   179  apiVersion: admissionregistration.k8s.io/v1
   180  kind: ValidatingWebhookConfiguration
   181  metadata:
   182    name: verrazzano-application-multiclustersecret
   183    namespace: {{ .Values.namespace }}
   184    labels:
   185      app: {{ .Values.name }}-webhook
   186  webhooks:
   187    - name: verrazzano-clusters-multiclustersecret-validator.verrazzano.io
   188      namespaceSelector:
   189        matchExpressions:
   190          - { key: verrazzano.io/namespace, operator: NotIn, values: [ kube-system ] }
   191      clientConfig:
   192        service:
   193          name: {{ .Values.name }}-webhook
   194          namespace: {{ .Values.namespace }}
   195          path: "/validate-clusters-verrazzano-io-v1alpha1-multiclustersecret"
   196      rules:
   197        - apiGroups:
   198            - clusters.verrazzano.io
   199          apiVersions:
   200            - v1alpha1
   201          operations:
   202            - CREATE
   203            - UPDATE
   204          resources:
   205            - multiclustersecrets
   206      sideEffects: None
   207      failurePolicy: Fail
   208      matchPolicy: Exact
   209      timeoutSeconds: 30
   210      admissionReviewVersions:
   211        - v1beta1
   212        - v1
   213  ---