mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-05-23 01:24:08 +00:00
feat: implement Nubenetes V2 architecture with Agentic Elite optimizer
This commit is contained in:
58
.github/workflows/agentic_v2_builder.yml
vendored
Normal file
58
.github/workflows/agentic_v2_builder.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Nubenetes V2 Agentic Builder
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Automatically run after a successful curation run to sync V2
|
||||
workflow_run:
|
||||
workflows: ["Nubenetes Automated Agentic Curation"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build-v2-edition:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||
steps:
|
||||
- name: Repository Synchronization
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: develop
|
||||
|
||||
- name: Python 3.11 Environment Provisioning
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Installation of Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --no-cache-dir pydantic PyGithub httpx fake-useragent pytz python-dotenv pyyaml
|
||||
|
||||
- name: Run V2 Agentic Optimizer
|
||||
env:
|
||||
GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }}
|
||||
GEMINI_API_KEY_2: ${{ secrets.GEMINI_API_KEY_2 }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PYTHONPATH: .
|
||||
run: |
|
||||
python src/v2_optimizer.py
|
||||
|
||||
- name: Create Pull Request for V2 Elite Update
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
branch: bot/v2-elite-sync
|
||||
base: develop
|
||||
title: "V2 Elite: Agentic Optimization Sync (2026)"
|
||||
body: |
|
||||
This PR updates the Nubenetes V2 (Agentic Elite) edition.
|
||||
|
||||
The AI agent has scanned the V1 archive and selected the top-tier resources according to 2026 architectural standards.
|
||||
- GitHub Repos inactive for too long have been deprioritized.
|
||||
- Fundational 'Awesome' lists have been preserved.
|
||||
- Redundancy has been reduced to focus on innovation.
|
||||
commit-message: "feat: sync V2 elite curated edition"
|
||||
labels: "v2-elite, agentic-sync"
|
||||
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@@ -5,12 +5,32 @@ on:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
name: Deploy docs
|
||||
name: Deploy Dual Versions
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout master
|
||||
uses: actions/checkout@v2
|
||||
- name: Deploy MkDocs
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install MkDocs and Material
|
||||
run: |
|
||||
pip install mkdocs-material pymdown-extensions
|
||||
|
||||
# 1. Build V1 (Root)
|
||||
- name: Build V1 Edition
|
||||
run: mkdocs build -f mkdocs.yml -d site/
|
||||
|
||||
# 2. Build V2 (Subdirectory)
|
||||
- name: Build V2 Elite Edition
|
||||
run: mkdocs build -f v2-mkdocs.yml -d site/v2/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
||||
@@ -18,4 +38,3 @@ jobs:
|
||||
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
|
||||
EXTRA_PACKAGES: build-base
|
||||
REQUIREMENTS: requirements.txt
|
||||
|
||||
|
||||
117
src/v2_optimizer.py
Normal file
117
src/v2_optimizer.py
Normal file
@@ -0,0 +1,117 @@
|
||||
import os
|
||||
import re
|
||||
import json
|
||||
import asyncio
|
||||
import yaml
|
||||
from datetime import datetime
|
||||
from typing import List, Dict, Set
|
||||
from src.config import GEMINI_API_KEYS, GH_TOKEN, TARGET_REPO, MADRID_TZ
|
||||
from src.gemini_utils import call_gemini_with_retry
|
||||
from src.logger import log_event
|
||||
|
||||
V1_DIR = "docs"
|
||||
V2_DIR = "v2-docs"
|
||||
|
||||
class V2Optimizer:
|
||||
def __init__(self):
|
||||
self.elite_criteria = (
|
||||
"You are a Principal Platform Architect in May 2026.\n"
|
||||
"Your task is to select the ABSOLUTE BEST resources from a larger list.\n"
|
||||
"CRITERIA for V2 (Elite Edition):\n"
|
||||
"1. HIGH IMPACT: Only links with score > 90 or exceptional industry value.\n"
|
||||
"2. MODERNITY: Prefer 2024-2026 content. Avoid outdated patterns unless fundational.\n"
|
||||
"3. AWESOME LISTS: ALWAYS KEEP all links pointing to 'Awesome' repositories (GitHub/GitLab).\n"
|
||||
"4. NO REDUNDANCY: If multiple tools do the same, pick the 1-2 most innovative or widely adopted.\n"
|
||||
"5. AGENTIC FOCUS: Prioritize tools with AI/Agentic capabilities or eBPF/WASM innovation.\n"
|
||||
)
|
||||
|
||||
async def optimize_file(self, filename: str):
|
||||
v1_path = os.path.join(V1_DIR, filename)
|
||||
v2_path = os.path.join(V2_DIR, filename)
|
||||
|
||||
if not os.path.exists(v1_path): return
|
||||
|
||||
with open(v1_path, "r") as f:
|
||||
content = f.read()
|
||||
|
||||
# Extract all links and their descriptions
|
||||
links = re.findall(r'^\s*-\s*\[([^\]]+)\]\(([^\)]+)\)(.*)', content, re.MULTILINE)
|
||||
if not links:
|
||||
# If no links, just copy the structure/headers
|
||||
headers = [l for l in content.splitlines() if l.startswith("#")]
|
||||
with open(v2_path, "w") as f:
|
||||
f.write("\n".join(headers) + "\n\n*Content coming soon as part of the 2026 Agentic Elite curation.*")
|
||||
return
|
||||
|
||||
formatted_links = []
|
||||
for title, url, desc in links:
|
||||
formatted_links.append(f"- [{title}]({url}) {desc.strip()}")
|
||||
|
||||
log_event(f"[*] V2 Optimizer: Analyzing {len(formatted_links)} links in {filename}")
|
||||
|
||||
prompt = (
|
||||
f"{self.elite_criteria}\n"
|
||||
f"FILE: {filename}\n"
|
||||
f"LINKS TO EVALUATE:\n" + "\n".join(formatted_links[:100]) + "\n\n"
|
||||
"Respond ONLY with a JSON list of indices to KEEP. "
|
||||
"Example: [0, 5, 22]. Remember to ALWAYS keep 'Awesome' repos."
|
||||
)
|
||||
|
||||
try:
|
||||
indices = await call_gemini_with_retry(prompt)
|
||||
if not isinstance(indices, list): indices = []
|
||||
|
||||
selected_links = [formatted_links[i] for i in indices if i < len(formatted_links)]
|
||||
|
||||
# Reconstruct V2 file
|
||||
v2_content = f"# {filename.replace('.md', '').capitalize()} (Elite Selection)\n\n"
|
||||
v2_content += "!!! abstract \"2026 Agentic Vision\"\n"
|
||||
v2_content += " This page contains a curated selection of top-tier resources, strictly filtered by our Agentic AI for high impact and modern relevance.\n\n"
|
||||
|
||||
if selected_links:
|
||||
v2_content += "## Selected Resources\n"
|
||||
v2_content += "\n".join(selected_links)
|
||||
else:
|
||||
v2_content += "\n*No resources met the elite criteria for this specific category yet.*"
|
||||
|
||||
with open(v2_path, "w") as f:
|
||||
f.write(v2_content)
|
||||
|
||||
log_event(f" [OK] V2 file generated: {v2_path} ({len(selected_links)} links kept)")
|
||||
|
||||
except Exception as e:
|
||||
log_event(f" [!] Error optimizing {filename} for V2: {e}")
|
||||
|
||||
async def run_full_optimization(self):
|
||||
log_event("STARTING V2 AGENTIC OPTIMIZATION (THE ARCHITECT'S CUT)", section_break=True)
|
||||
files = [f for f in os.listdir(V1_DIR) if f.endswith(".md") and f != "index.md"]
|
||||
|
||||
# Batch processing to avoid rate limits
|
||||
for i in range(0, len(files), 5):
|
||||
batch = files[i:i+5]
|
||||
await asyncio.gather(*[self.optimize_file(f) for f in batch])
|
||||
await asyncio.sleep(2)
|
||||
|
||||
# Generate Landing Page
|
||||
await self._generate_v2_index()
|
||||
log_event("V2 OPTIMIZATION FINISHED SUCCESSFULLY.", section_break=True)
|
||||
|
||||
async def _generate_v2_index(self):
|
||||
v2_index = (
|
||||
"# Welcome to Nubenetes V2\n\n"
|
||||
"## The Agentic Elite Edition (2026)\n\n"
|
||||
"This is a high-density, AI-curated view of the Cloud Native ecosystem. While our [Classic Archive](https://nubenetes.com) "
|
||||
"serves as a comprehensive encyclopedia of thousands of tools, **Nubenetes V2** is built for the time-constrained architect.\n\n"
|
||||
"### Core Principles of V2:\n"
|
||||
"- **Impact First**: Only resources with exceptional value are shown.\n"
|
||||
"- **2026 Ready**: Focus on eBPF, WASM, AI-Native Infrastructure, and Agentic Workflows.\n"
|
||||
"- **Always Awesome**: We maintain 100% of the community's fundational 'Awesome' lists.\n\n"
|
||||
"--- \n"
|
||||
"Generated by Nubenetes AI Agent using Gemini 2.0/2.5 Flash."
|
||||
)
|
||||
with open(os.path.join(V2_DIR, "index.md"), "w") as f:
|
||||
f.write(v2_index)
|
||||
|
||||
if __name__ == "__main__":
|
||||
optimizer = V2Optimizer()
|
||||
asyncio.run(optimizer.run_full_optimization())
|
||||
0
v2-docs/.gitkeep
Normal file
0
v2-docs/.gitkeep
Normal file
55
v2-mkdocs.yml
Normal file
55
v2-mkdocs.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
site_name: "Nubenetes V2: Agentic Elite"
|
||||
site_url: "https://nubenetes.com/v2/"
|
||||
site_description: "The ultra-curated, AI-driven selection of top-tier Cloud Native resources for 2026."
|
||||
site_author: "Inaki Fernandez"
|
||||
copyright: "Copyright © 2026 Inaki Fernandez"
|
||||
|
||||
repo_name: "nubenetes/awesome-kubernetes"
|
||||
repo_url: "https://github.com/nubenetes/awesome-kubernetes"
|
||||
edit_uri: "edit/master/v2-docs/"
|
||||
|
||||
theme:
|
||||
name: material
|
||||
language: en
|
||||
palette:
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
primary: teal
|
||||
accent: deep orange
|
||||
toggle:
|
||||
icon: material/brightness-7
|
||||
name: Switch to dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
primary: teal
|
||||
accent: deep orange
|
||||
toggle:
|
||||
icon: material/brightness-4
|
||||
name: Switch to light mode
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.top
|
||||
- navigation.tracking
|
||||
- navigation.indexes
|
||||
- search.suggest
|
||||
- search.highlight
|
||||
- content.code.copy
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
- attr_list
|
||||
- md_in_html
|
||||
- toc:
|
||||
permalink: true
|
||||
|
||||
nav:
|
||||
- Welcome: index.md
|
||||
- Elite Selection:
|
||||
- "Architecture & Trends": architecture.md
|
||||
- "The 2026 Agentic Stack": agentic-stack.md
|
||||
- "Core Infrastructure": infrastructure.md
|
||||
Reference in New Issue
Block a user