UNCLASSIFIED - NO CUI

Skip to content

Add `envoyFilters` value to chart to allow the user to create custom Envoy Filters

Relates #106 (closed)

This MR allows the user to specify envoyFilters in the values according to the spec.

For example, a universal gzip compressor:

envoyFilters:
  # For each filter, specify `name` and `spec` fields
  # For example, gzip html and json responses
  - name: compressor
    spec:
      workloadSelector:
        labels:
          istio: ingressgateway
      configPatches:
      - applyTo: HTTP_FILTER
        match:
          context: GATEWAY
          proxy:
            proxyVersion: '^1\.17.*'
          listener:
            filterChain:
              filter:
                name: "envoy.filters.network.http_connection_manager"
                subFilter:
                  name: "envoy.filters.http.router"
        patch:
          operation: INSERT_BEFORE
          value:
            name: envoy.filters.http.compressor
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor
              response_direction_config:
                common_config:
                  min_content_length: 100
                  content_type:
                    - text/html
                    - application/json
                disable_on_etag_header: true
              request_direction_config:
                common_config:
                  enabled:
                    default_value: false
                    runtime_key: request_compressor_enabled
              compressor_library:
                name: text_optimized
                typed_config:
                  "@type": type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip
                  memory_level: 3
                  window_bits: 10
                  compression_level: BEST_COMPRESSION
                  compression_strategy: DEFAULT_STRATEGY

This example is commented in the values for reference.

Edited by Ryan Garcia

Merge request reports

Loading