Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add istio and sds values to GatewayParameters #9402

Merged
merged 185 commits into from May 20, 2024

Conversation

npolshakova
Copy link
Contributor

@npolshakova npolshakova commented Apr 25, 2024

Description

Currently, the istio integration helm value is still set as an env and passed around. A user sets istioSDS.enabled which then configures the GG_EXPERIMENTAL_ISTIO_MTLS_SDS_ENABLED env on the gloo control plane deployment.
The gateway v2 deployer then uses the IstioValues which are filled by the env values on the control plane deployment to inject the istio-proxy and sds sidecars.

Other than istioSDS.enabled none of the other Istio integration or SDS helm values are supported for the Gloo Gateway deployer. This is a current limitation in the k8s Gateway deployer and has caused issues related to running the Istio integration with gloo-ee.

Example GatewayParameters with all config set:

apiVersion: gateway.gloo.solo.io/v1alpha1
kind: GatewayParameters
metadata:
  name: gw-params
spec:
  kube:
    deployment:
      replicas: 1
    podTemplate:
      extraLabels:
        pod-label-key: pod-label-val
      extraAnnotations:
        pod-anno-key: pod-anno-val
    envoyContainer:
      bootstrap:
        logLevel: debug
        componentLogLevels:
          upstream: debug
          connection: trace
    sds:
      sdsContainer:
        sdsBootstrap:
          logLevel: debug
        image:
          image:
            registry: docker.io/sds
            repository: sds
            tag: 1.0.1-dev # this is a placeholder example
      istioIntegration:
        istioDiscoveryAddress: istiod.istio-system.svc.cluster.local:15012
        istioMetaMeshId: mesh
        istioMetaClusterId: cluster
        istioContainer:
          logLevel: debug
          image:
            image:
              registry: docker.io/istio
              repository: proxyv2
              tag: 1.19.2
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 200m
              memory: 256Mi
          securityContext:
            runAsUser: 10101
            runAsNonRoot: true

Example GatewayParameters config that only sets sds with default values:

apiVersion: gateway.gloo.solo.io/v1alpha1
kind: GatewayParameters
metadata:
  name: gw-params
spec:
  kube:
    deployment:
      replicas: 1
    podTemplate:
      extraLabels:
        pod-label-key: pod-label-val
      extraAnnotations:
        pod-anno-key: pod-anno-val
    envoyContainer:
      bootstrap:
        logLevel: debug
        componentLogLevels:
          upstream: debug
          connection: trace
    sds: {}

Example GatewayParameters config that sets Istio integration with default values:

apiVersion: gateway.gloo.solo.io/v1alpha1
kind: GatewayParameters
metadata:
  name: gw-params
spec:
  kube:
    deployment:
      replicas: 1
    podTemplate:
      extraLabels:
        pod-label-key: pod-label-val
      extraAnnotations:
        pod-anno-key: pod-anno-val
    envoyContainer:
      bootstrap:
        logLevel: debug
        componentLogLevels:
          upstream: debug
          connection: trace
    sds:
      istioIntegration: {}

Relies on timeout override for pod matches assertion added in #9463

Code changes

  • Adds Istio and SDS values to GatewayParameters
  • Adds deployer changes to use GatewayParameters overrides
  • Adds e2e test to create k8s Gateway with Istio and SDS image overrides

Notes for reviewers

Once #9493 goes in, the old IstioSDS field in the deployer and env value that is set when global.istioSDS.enabled=true is set in the helm chart can be removed.

I opened a separate issue to confirming the gloomtls behavior and convert the old gloomtls regression test into the new framework: https://github.com/solo-io/solo-projects/issues/6210

Design discussion: https://docs.google.com/document/d/1oF8KpoIEEcux_R8fBrLkdKF0NaonINVedhdCHMuf2bg/edit?usp=sharing

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@npolshakova npolshakova added the work in progress signals bulldozer to keep pr open (don't auto-merge) label Apr 25, 2024
@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Apr 25, 2024
Copy link
Contributor

@jenshu jenshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some API comments

@npolshakova npolshakova changed the title Add istio and sds values to GatewayParams Add istio and sds values to GatewayParameters May 1, 2024
@npolshakova npolshakova requested a review from ilackarms May 1, 2024 14:51
Copy link
Contributor

@jbohanon jbohanon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@npolshakova npolshakova enabled auto-merge (squash) May 17, 2024 19:34
sam-heilbron
sam-heilbron previously approved these changes May 17, 2024
jbohanon
jbohanon previously approved these changes May 20, 2024
@npolshakova npolshakova merged commit 76c9bcf into main May 20, 2024
25 checks passed
@npolshakova npolshakova deleted the npolshak/istio-deployer-changes branch May 20, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants