# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Patch to enable and disable gRPC xDS experimental features.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: greeter
spec:
  template:
    spec:
      containers:
      - name: app
        env:
        - name: GRPC_LOG_XDS_NODE_ID # Why do we even have this lever?
          value: "true"
        # Selectively enable and disable experiments, only for gRPC-Java unless otherwise noted.
        - name: GRPC_EXPERIMENTAL_AUTOFLOWCONTROL
          value: "true"
        - name: GRPC_EXPERIMENTAL_ENABLE_LEAST_REQUEST # affects both gRPC-Go and gRPC-Java
          value: "false"
        - name: GRPC_EXPERIMENTAL_XDS_FEDERATION
          value: "true"
        - name: GRPC_EXPERIMENTAL_XDS_RLS_LB
          value: "true"
        - name: GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING
          value: "true"
        - name: GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH
          value: "true"
        - name: GRPC_XDS_EXPERIMENTAL_ENABLE_TIMEOUT
          value: "true"
