UNCLASSIFIED - NO CUI

Skip to content

Implement VirtualService generation

A package maintainer should be able to provide values for their package (through bb-common) that generates a comparable VirtualService (and supporting AuthorizationPolicy and NetworkPolicy to support) to what is currently partially templated in the packages.

The existing Istio package configuration looks like this:

istio:
  enabled: false

  # Configure pre-templated VirtualServices
  loki:
    enabled: false
    annotations: {}
    labels: {}
    gateways:
      - istio-system/public
    hosts:
      - "loki.{{ .Values.domain }}"

We should create a generic interface (similar to what we did with networkPolicies) for generating VirtualServices.

A potential example would be something like this (which includes additional input for selectors and ports which would aid in NetworkPolicy/AuthorizationPolicy creation):

routes:
  loki:
    enabled: true
    gateways:
      - istio-gateway/public-ingressgateway
    hosts:
      - loki.bigbang.dev
    service: loki.loki.svc.cluster.local
    port: 8065  
    selector:
      app.kubernetes.io/name: loki