Initial commit
This commit is contained in:
15
.claude-plugin/plugin.json
Normal file
15
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "network-policy-manager",
|
||||
"description": "Manage Kubernetes network policies and firewall rules",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Claude Code Plugins",
|
||||
"email": "[email protected]"
|
||||
},
|
||||
"skills": [
|
||||
"./skills"
|
||||
],
|
||||
"commands": [
|
||||
"./commands"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# network-policy-manager
|
||||
|
||||
Manage Kubernetes network policies and firewall rules
|
||||
25
commands/network-policy.md
Normal file
25
commands/network-policy.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
description: $(echo "$description" | cut -d' ' -f1-5)
|
||||
---
|
||||
|
||||
# $(echo "$name" | sed 's/-/ /g' | sed 's/\b\(.\)/\u\1/g')
|
||||
|
||||
$(echo "$description")
|
||||
|
||||
## Key Features
|
||||
|
||||
- Production-ready configurations
|
||||
- Best practices implementation
|
||||
- Security-first approach
|
||||
- Scalable architecture
|
||||
- Comprehensive documentation
|
||||
- Multi-platform support
|
||||
|
||||
## Example Usage
|
||||
|
||||
This plugin generates complete configurations for your DevOps needs.
|
||||
Specify your requirements and get production-ready code instantly.
|
||||
|
||||
## When Invoked
|
||||
|
||||
Generate configurations and setup code based on your specific requirements and infrastructure needs.
|
||||
65
plugin.lock.json
Normal file
65
plugin.lock.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/devops/network-policy-manager",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "20372524fc53469a7ea303066d09bab211c9875a",
|
||||
"treeHash": "c6dd2904b0f87f2d6f55b1056b756e5ecd7d927333f76aeb7972567a0fddb67b",
|
||||
"generatedAt": "2025-11-28T10:18:36.646598Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "network-policy-manager",
|
||||
"description": "Manage Kubernetes network policies and firewall rules",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "454a51bc0bae6b9d443758e3647be5b32ca69f3612c801e60662e9decab62774"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "0de6872f48c06f42894a0a22a42a5fa3d5f31dd2397fdf416ffebaf3ef231eaa"
|
||||
},
|
||||
{
|
||||
"path": "commands/network-policy.md",
|
||||
"sha256": "353f80054a90cda1e6716da3628115ce829307fbbb83a15b64f1d37c96224a99"
|
||||
},
|
||||
{
|
||||
"path": "skills/network-policy-manager/SKILL.md",
|
||||
"sha256": "e0ef97a812eec9462a94469be18b6c8ce06bbfe0ad14a123318de053d0d67fd4"
|
||||
},
|
||||
{
|
||||
"path": "skills/network-policy-manager/references/README.md",
|
||||
"sha256": "da1e9e1ceea84851a27a8b9e3ec7a0237091dfa5b7d63efac8c3bcdff7fc9939"
|
||||
},
|
||||
{
|
||||
"path": "skills/network-policy-manager/scripts/README.md",
|
||||
"sha256": "c6d11ea84ea6c1d2a597bef7e137ddf71e2e59ec911b1744ab6d4cbc09a1f57f"
|
||||
},
|
||||
{
|
||||
"path": "skills/network-policy-manager/assets/network_policy_template.yaml",
|
||||
"sha256": "3f7a868b518827c6681cf11dba6bd2edd77e3faed17a11f593f7706d7983061c"
|
||||
},
|
||||
{
|
||||
"path": "skills/network-policy-manager/assets/README.md",
|
||||
"sha256": "2b808d146d64280af7d58e1ecd1a7798ba6eb0453800c8e2b0a04c1a39491086"
|
||||
}
|
||||
],
|
||||
"dirSha256": "c6dd2904b0f87f2d6f55b1056b756e5ecd7d927333f76aeb7972567a0fddb67b"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
52
skills/network-policy-manager/SKILL.md
Normal file
52
skills/network-policy-manager/SKILL.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
name: managing-network-policies
|
||||
description: |
|
||||
This skill enables Claude to manage Kubernetes network policies and firewall rules. It allows Claude to generate configurations and setup code based on specific requirements and infrastructure. Use this skill when the user requests to create, modify, or analyze network policies for Kubernetes, or when the user mentions "network-policy", "firewall rules", or "Kubernetes security". This skill is useful for implementing best practices and production-ready configurations for network security in a Kubernetes environment.
|
||||
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This skill empowers Claude to assist with Kubernetes network policy management. It simplifies the creation, modification, and analysis of network policies and firewall rules, ensuring secure and compliant network configurations within Kubernetes clusters.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Receiving User Request**: Claude receives a user request related to Kubernetes network policies or firewall rules.
|
||||
2. **Invoking network-policy-manager**: Claude invokes the `network-policy-manager` plugin.
|
||||
3. **Generating Configuration**: The plugin generates the necessary configuration files based on the user's requirements and infrastructure details.
|
||||
|
||||
## When to Use This Skill
|
||||
|
||||
This skill activates when you need to:
|
||||
- Create new Kubernetes network policies.
|
||||
- Modify existing network policies.
|
||||
- Analyze the impact of network policies on Kubernetes cluster security.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: Creating a New Network Policy
|
||||
|
||||
User request: "Create a network policy that allows pods with the label app=frontend to access pods with the label app=backend on port 8080."
|
||||
|
||||
The skill will:
|
||||
1. Invoke the `network-policy-manager` plugin.
|
||||
2. Generate a Kubernetes network policy YAML file that implements the requested access control.
|
||||
|
||||
### Example 2: Modifying an Existing Network Policy
|
||||
|
||||
User request: "Modify the existing network policy 'allow-frontend-to-backend' to also allow access on port 8081."
|
||||
|
||||
The skill will:
|
||||
1. Invoke the `network-policy-manager` plugin.
|
||||
2. Generate a modified Kubernetes network policy YAML file with the updated port configuration.
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Security First**: Always prioritize the principle of least privilege when defining network policies.
|
||||
- **Regular Audits**: Regularly review and update network policies to adapt to evolving security needs.
|
||||
- **Testing**: Thoroughly test network policies in a non-production environment before deploying them to production.
|
||||
|
||||
## Integration
|
||||
|
||||
This skill integrates with other DevOps tools and plugins by generating standard Kubernetes YAML files, which can be applied using `kubectl` or integrated into CI/CD pipelines.
|
||||
6
skills/network-policy-manager/assets/README.md
Normal file
6
skills/network-policy-manager/assets/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Assets
|
||||
|
||||
Bundled resources for network-policy-manager skill
|
||||
|
||||
- [ ] network_policy_template.yaml: A template YAML file for creating network policies, with placeholders for common configurations.
|
||||
- [ ] example_network_policies/: A directory containing example network policy YAML files for different scenarios.
|
||||
@@ -0,0 +1,52 @@
|
||||
# network_policy_template.yaml
|
||||
# A template for creating Kubernetes Network Policies.
|
||||
# Replace placeholders with your desired values.
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: REPLACE_ME-network-policy # A unique name for your network policy
|
||||
namespace: YOUR_VALUE_HERE # The namespace this policy applies to
|
||||
labels:
|
||||
app: REPLACE_ME # Optional labels for organization
|
||||
tier: REPLACE_ME # Optional labels for organization
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: REPLACE_ME # Selects the pods this policy applies to. Must match a pod label.
|
||||
tier: REPLACE_ME # Selects the pods this policy applies to. Must match a pod label.
|
||||
policyTypes:
|
||||
- Ingress # Defines whether this policy applies to incoming traffic
|
||||
- Egress # Defines whether this policy applies to outgoing traffic
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: YOUR_VALUE_HERE # Allow traffic from pods with this label
|
||||
tier: YOUR_VALUE_HERE # Allow traffic from pods with this label
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
name: YOUR_VALUE_HERE # Allow traffic from pods in this namespace
|
||||
ports:
|
||||
- protocol: TCP # Protocol allowed for ingress traffic
|
||||
port: 80 # Port allowed for ingress traffic
|
||||
- protocol: UDP
|
||||
port: 53 # Example: Allow DNS resolution
|
||||
egress:
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: YOUR_VALUE_HERE # Allow traffic to pods with this label
|
||||
tier: YOUR_VALUE_HERE # Allow traffic to pods with this label
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
name: YOUR_VALUE_HERE # Allow traffic to pods in this namespace
|
||||
- ipBlock: # Allows traffic to a specific IP address range
|
||||
cidr: 10.0.0.0/8 # Example: Allow traffic to internal network
|
||||
except: # Optional: Exclude specific IP ranges from the CIDR
|
||||
- 10.0.1.0/24
|
||||
ports:
|
||||
- protocol: TCP # Protocol allowed for egress traffic
|
||||
port: 443 # Port allowed for egress traffic
|
||||
- protocol: UDP
|
||||
port: 53 # Example: Allow DNS resolution
|
||||
8
skills/network-policy-manager/references/README.md
Normal file
8
skills/network-policy-manager/references/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# References
|
||||
|
||||
Bundled resources for network-policy-manager skill
|
||||
|
||||
- [ ] kubernetes_network_policies.md: Comprehensive documentation on Kubernetes network policies, including syntax, examples, and best practices.
|
||||
- [ ] cis_kubernetes_benchmark.md: Relevant sections from the CIS Kubernetes Benchmark related to network policy configuration.
|
||||
- [ ] network_policy_examples.md: A collection of practical network policy examples for various use cases (e.g., isolating namespaces, allowing specific traffic).
|
||||
- [ ] calico_network_policy.md: Documentation on Calico network policies, if the user is using Calico as their CNI.
|
||||
8
skills/network-policy-manager/scripts/README.md
Normal file
8
skills/network-policy-manager/scripts/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Scripts
|
||||
|
||||
Bundled resources for network-policy-manager skill
|
||||
|
||||
- [ ] generate_network_policy.py: Generates Kubernetes network policy YAML based on user input and best practices.
|
||||
- [ ] validate_network_policy.py: Validates a given network policy YAML file against Kubernetes schema and security best practices.
|
||||
- [ ] analyze_network_policy.py: Analyzes existing network policies in a cluster and reports potential vulnerabilities or misconfigurations.
|
||||
- [ ] deploy_network_policy.sh: Deploys a network policy to a Kubernetes cluster using kubectl.
|
||||
Reference in New Issue
Block a user