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
| apiVersion: chainsaw.kyverno.io/v1alpha1 | |
| kind: Test | |
| metadata: | |
| name: pod-without-team-label | |
| spec: | |
| steps: | |
| - try: | |
| - apply: | |
| file: resources.yaml | |
| - assert: |
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
| apiVersion: chainsaw.kyverno.io/v1alpha1 | |
| kind: Test | |
| metadata: | |
| name: pod-without-team-label | |
| spec: | |
| steps: | |
| - try: | |
| - apply: | |
| file: resources.yaml | |
| - assert: |
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
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| labels: | |
| environment: prod | |
| name: test | |
| spec: | |
| containers: | |
| - name: ubuntu | |
| image: ubuntu:latest |
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
| 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 |
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
| apiVersion: kyverno.io/v1 | |
| kind: ClusterPolicy | |
| metadata: | |
| name: sync-configmaps | |
| spec: | |
| rules: | |
| - name: sync-configmaps | |
| match: | |
| any: | |
| - resources: |
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
| 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 |
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
| apiVersion: kyverno.io/v1 | |
| kind: ClusterPolicy | |
| metadata: | |
| name: add-labels | |
| spec: | |
| rules: | |
| - name: add-team | |
| match: | |
| any: | |
| - resources: |
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
| 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 |
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
| apiVersion: kyverno.io/v1 | |
| kind: ClusterPolicy | |
| metadata: | |
| name: require-labels | |
| spec: | |
| rules: | |
| - name: check-team | |
| match: | |
| any: | |
| - resources: |
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
| 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( |
NewerOlder