Repository navigation
Add istio yaml examples - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 20 curated Istio YAML examples (docs/istio-yaml-examples/) covering traffic management, security, and resilience patterns, with inline comments and frontmatter metadata (Istio versions, CRD types, categories).
Wire them into the BYOK pipeline as a local source in config.yaml, copy docs/ in the Containerfile, and enhance build_index.py to parse frontmatter and enrich chunks for better RAG retrieval and citations.
Add tests to validate example structure, YAML blocks, and local document loading.
How to test it
Wait for All indexes are loaded in logs, then:
Example:
curl -s -X POST http://127.0.0.1:8083/v1/query -H "Content-Type: application/json" -d '{"query": "blue-green deployment x-test-version exact green productpage blue green subset"}'{"conversation_id":"62ce29ee-aede-4401-9b77-dac6e4acc7a8","response":"You can implement a blue-green deployment in Istio using aDestinationRuleto define your versions and aVirtualServiceto control traffic flow.\n\n1. **DestinationRule**: Definesblue(v1) andgreen(v2) subsets for theproductpageservice based on pod labels.\n2. **VirtualService**:\n * Routes traffic with the headerx-test-version: greento thegreensubset for testing.\n * Routes all other production traffic to thebluesubset by default.\n\nTo perform the cutover, you would update the default route in theVirtualServiceto point to thegreensubset.\n\nHere is the configuration:\n\n```yaml\napiVersion: networking.istio.io/v1\nkind: DestinationRule\nmetadata:\n name: productpage\n namespace: bookinfo\nspec:\n host: productpage\n subsets:\n - name: blue\n labels:\n version: v1 # current production (blue)\n - name: green\n labels:\n version: v2 # new release (green)\n---\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n name: productpage\n namespace: bookinfo\nspec:\n hosts:\n - productpage\n http:\n # Internal testers hit green via header\n - match:\n - headers:\n x-test-version:\n exact: green\n route:\n - destination:\n host: productpage\n subset: green\n # Default production traffic goes to blue\n - route:\n - destination:\n host: productpage\n subset: blue\n```","referenced_documents":[{"doc_url":"https://github.com/kiali/kiali-byok/blob/main/docs/istio-yaml-examples/traffic-management/blue-green-deployment.md","doc_title":"Blue-Green Deployment with VirtualService"},{"doc_url":"https://istio.io/latest/docs/releases/feature-stages/","doc_title":"Feature Status"}],"truncated":false,"input_tokens":2874,"output_tokens":359,"available_quotas":{},"tool_calls":[],"tool_results":[]}