chore: sanitize internal references in code examples and documentation

Made-with: Cursor
This commit is contained in:
taylanbakircioglu
2026-03-29 21:41:41 +03:00
parent 67fc39aeab
commit d1df2c31c5
11 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -1263,7 +1263,7 @@ paths:
type: string
- name: annotation_key
in: query
description: "Annotation key to match. Supports * wildcard (e.g. example.com/*)"
description: "Annotation key to match. Supports * wildcard (e.g. mycompany.com/*)"
schema:
type: string
- name: annotation_value
+1 -1
View File
@@ -823,7 +823,7 @@ class Neo4jService:
both nodes and edges by matching the VID prefix.
VID Format: {analysis_id}:{cluster_id}:{namespace}:{workload}
Example: "26:1:prod-payments:payments-pod-xyz"
Example: "26:1:prod-cardapi:cardapi-pod-xyz"
Deletion is done by:
1. Matching all nodes where n.id STARTS WITH '{analysis_id}:'
+1 -1
View File
@@ -1360,7 +1360,7 @@ async def find_pod_dependencies(
owner_name: Optional[str] = Query(None, description="Deployment/StatefulSet/DaemonSet name to search"),
label_key: Optional[str] = Query(None, description="Label key to match"),
label_value: Optional[str] = Query(None, description="Label value to match"),
annotation_key: Optional[str] = Query(None, description="Annotation key to match (supports * wildcard, e.g. example.com/*)"),
annotation_key: Optional[str] = Query(None, description="Annotation key to match (supports * wildcard, e.g. mycompany.com/*)"),
annotation_value: Optional[str] = Query(None, description="Annotation value to match (supports * wildcard: * for any, prefix* for startsWith)"),
ip: Optional[str] = Query(None, description="Pod IP to search"),
depth: int = Query(1, ge=1, le=5, description="Traversal depth"),
+2 -2
View File
@@ -344,7 +344,7 @@ def classify_endpoint_kind(name: str, namespace: str, original_kind: str) -> str
Returns:
- "Pod" for actual Kubernetes pods (e.g., backend-7686dccc6b-x8bqm)
- "Service" for Kubernetes services
- "ExternalIP" for external IP addresses (10.x.x.x, 192.168.x.x)
- "ExternalIP" for external IP addresses (10.180.x.x, 192.168.x.x)
- "ClusterIP" for cluster-internal IPs (10.128.x.x, 10.129.x.x, 10.130.x.x, 10.131.x.x)
- "ExternalDNS" for external DNS names (*.bank, api.*, etc.)
- "ClusterService" for internal cluster services (*.svc.cluster.local)
@@ -607,7 +607,7 @@ def deduplicate_services(services: list) -> list:
"""Extract the base service name for deduplication"""
import re
# Handle DNS-style names like 10-128-22-163.harbor-core.prod-registry.svc.cluster.local
# Handle DNS-style names like 10-128-22-163.harbor-core.prod-harbor-ha.svc.cluster.local
if '.svc.cluster.local' in name:
parts = name.split('.')
if len(parts) >= 2:
+1 -1
View File
@@ -23,7 +23,7 @@ Bu dizindeki RBAC kaynakları **cluster admin** tarafından manuel olarak uygula
NS=flowfish
# Tüm RBAC'ı uygula
cat <<'EOF' | sed "s/flowfish/$NS/g" | oc apply -f -
cat <<'EOF' | sed "s/namespace: flowfish/namespace: $NS/g" | oc apply -f -
# ============================================
# 1. Inspektor Gadget ClusterRole
# ============================================
@@ -1,10 +1,10 @@
# Flowfish Cluster RBAC
# Cross-namespace permissions required for kubectl-gadget
# kubectl-gadget için gerekli cross-namespace izinler
#
# Usage:
# Uygulama:
# oc apply -f flowfish-cluster-rbac.yaml
#
# Replace NAMESPACE with your target namespace
# NAMESPACE değişkenini kendi namespace'inizle değiştirin
---
apiVersion: rbac.authorization.k8s.io/v1
+2 -2
View File
@@ -484,9 +484,9 @@ const IntegrationHub: React.FC = () => {
<Form.Item
name="annotation_key"
label="Annotation Key"
tooltip="Use custom annotations set during deployment. Supports * wildcard for prefix matching (e.g. example.com/* matches all keys starting with example.com/)."
tooltip="Use custom annotations set during deployment. Supports * wildcard for prefix matching (e.g. mycompany.com/* matches all keys starting with mycompany.com/)."
>
<Input placeholder="e.g. git-repo, example.com/project-link, example.com/*" />
<Input placeholder="e.g. git-repo, mycompany.com/project-link, mycompany.com/*" />
</Form.Item>
</Col>
<Col xs={24} sm={12}>
+3 -3
View File
@@ -455,7 +455,7 @@ const isInternalTraffic = (node: DependencyNode): boolean => {
const isDomainName = (name: string): boolean => {
if (!name) return false;
// Domain pattern: contains dot, has letters, doesn't start/end with dot
// Examples: amazon.com, api.azure.com, srv-prod-01.company.local
// Examples: amazon.com, api.azure.com, mail01.company.local
const domainPattern = /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)+$/;
// Must have at least one letter (to distinguish from IP)
const hasLetter = /[a-zA-Z]/.test(name);
@@ -463,7 +463,7 @@ const isDomainName = (name: string): boolean => {
};
// Check if name is a server hostname (datacenter server, not domain)
// Examples: srv-prod-01, build-server-02, db-server-01
// Examples: srv-prod-01, web-staging-02, db-server-01
const isServerHostname = (name: string): boolean => {
if (!name) return false;
// Server hostname patterns:
@@ -578,7 +578,7 @@ const isPublicEndpoint = (node: DependencyNode): boolean => {
// 2. CRITICAL: If IP is PRIVATE, this CANNOT be a public endpoint!
// Trust IP classification over domain name - private IP = internal network
// Example: name="api.example.local", ip="10.194.30.5" → NOT PUBLIC (private IP!)
// Example: name="api.internal.local", ip="10.194.30.5" → NOT PUBLIC (private IP!)
// This prevents .bank gTLD domains with private IPs from being classified as public
if (ip && isPrivateIP(ip)) return false;
+1 -1
View File
@@ -36,7 +36,7 @@ for manifest in *.yaml; do
sed -i -e "s|env-flowfish|${DEPLOYMENT_ENV}-flowfish|g" $manifest
# Company placeholders
sed -i -e "s|company\.example\.com|${COMPANY_DOMAIN}|g" $manifest
sed -i -e "s|company\.com\.tr|${COMPANY_NAME}.com.tr|g" $manifest
# Database hosts
sed -i -e "s|{{POSTGRES_HOST}}|${POSTGRES_HOST}|g" $manifest
+1 -1
View File
@@ -27,7 +27,7 @@
# - cluster-admin privileges (for ClusterRole modification)
#
# Examples:
# ./fix-gadget-rbac.sh staging-flowfish
# ./fix-gadget-rbac.sh bmprod-flowfish
# ./fix-gadget-rbac.sh flowfish
#
+3 -3
View File
@@ -23,9 +23,9 @@
# - cluster-admin privileges (for DaemonSet modification)
#
# Examples:
# ./fix-gadget-storage.sh prod-flowfish # emptyDir (default)
# ./fix-gadget-storage.sh prod-flowfish standard-rwo # PVC with StorageClass
# ./fix-gadget-storage.sh staging-flowfish standard # PVC with StorageClass
# ./fix-gadget-storage.sh prod-flowfish # emptyDir (default)
# ./fix-gadget-storage.sh prod-flowfish ibm02-csi-rwo # PVC with StorageClass
# ./fix-gadget-storage.sh bmprod-flowfish standard # PVC with StorageClass
#
set -e