Skip to content

Instantly share code, notes, and snippets.

View larkintuckerllc's full-sized avatar

John Tucker larkintuckerllc

View GitHub Profile
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: pod-without-team-label
spec:
steps:
- try:
- apply:
file: resources.yaml
- assert:
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: pod-without-team-label
spec:
steps:
- try:
- apply:
file: resources.yaml
- assert:
apiVersion: v1
kind: Pod
metadata:
labels:
environment: prod
name: test
spec:
containers:
- name: ubuntu
image: ubuntu:latest
apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: sync-configmaps
policies:
- sync-configmaps-clusterpolicy.yaml
resources:
- hello-world-namespace.yaml
results:
- policy: sync-configmaps
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: sync-configmaps
spec:
rules:
- name: sync-configmaps
match:
any:
- resources:
apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: add-labels
policies:
- add-labels-clusterpolicy.yaml
resources:
- test-pod.yaml
- test-labeled-pod.yaml
- test-labeled-team-pod.yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: add-labels
spec:
rules:
- name: add-team
match:
any:
- resources:
apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: require-labels
policies:
- require-labels-clusterpolicy.yaml
resources:
- test-labeled-pod.yaml
- test-labeled-additional.pod.yaml
- test-labeled-underscore-pod.yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-labels
spec:
rules:
- name: check-team
match:
any:
- resources:
import asyncio
from langchain_anthropic import ChatAnthropic
from langchain.agents import create_agent
from langchain_mcp_adapters.tools import load_mcp_tools
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(