765f081867
- Change license from MIT to Apache-2.0 across all documentation to match package.json - Update all version references from v0.3.4/v0.3.5 to v0.3.10 - Update tarball filenames from headlamp-polaris-plugin-*.tar.gz to polaris-0.3.10.tar.gz - Update README.md license badge - Update artifacthub-pkg.yml license field Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
545 lines
16 KiB
Markdown
545 lines
16 KiB
Markdown
# Documentation Standardization Plan
|
|
|
|
**Date**: 2026-02-12
|
|
**Repositories**: headlamp-polaris-plugin, headlamp-sealed-secrets-plugin
|
|
**Goal**: Establish consistent documentation standards across Headlamp plugin projects
|
|
|
|
## Executive Summary
|
|
|
|
This plan standardizes documentation structure, formatting, and content across two Headlamp plugins to create a consistent, professional documentation experience. The standardization adopts the best practices from both repositories while maintaining each plugin's unique technical content.
|
|
|
|
## Current State Analysis
|
|
|
|
### Polaris Plugin (v0.3.5)
|
|
**Structure**: Topic-focused with monolithic files
|
|
**Strengths**:
|
|
- Comprehensive CONTRIBUTING.md with branching strategy and commit conventions
|
|
- Complete CHANGELOG.md (35 versions documented)
|
|
- Dedicated SECURITY.md with vulnerability reporting
|
|
- JSDoc comments on all API exports
|
|
- CI/CD badges in README
|
|
- Well-organized TROUBLESHOOTING.md with common issues
|
|
|
|
**Gaps**:
|
|
- No user journey-based organization
|
|
- No Architecture Decision Records
|
|
- Limited quick-start tutorials
|
|
- No FAQ section
|
|
- Deployment guide is monolithic (needs breakdown)
|
|
|
|
### Sealed Secrets Plugin
|
|
**Structure**: User journey-based with granular topic files
|
|
**Strengths**:
|
|
- Excellent user journey organization (Getting Started → User Guide → Tutorials)
|
|
- Architecture Decision Records (5 ADRs)
|
|
- Quick diagnosis flowchart in troubleshooting
|
|
- Multi-platform installation guides
|
|
- Auto-generated API reference
|
|
- Visual hierarchy with strategic emoji use
|
|
|
|
**Gaps**:
|
|
- No dedicated CONTRIBUTING.md (content in README)
|
|
- No SECURITY.md for vulnerability reporting
|
|
- Incomplete tutorial placeholders
|
|
- No comprehensive CHANGELOG
|
|
- Missing E2E testing documentation
|
|
|
|
## Standardization Principles
|
|
|
|
### 1. File Structure Standard
|
|
|
|
**Root-Level Files** (Common to Both):
|
|
```
|
|
README.md # Main entry point with badges, quick links
|
|
CHANGELOG.md # Keep a Changelog format, semantic versioning
|
|
CONTRIBUTING.md # Development workflow, branching, PR process
|
|
SECURITY.md # Security model, vulnerability reporting, RBAC
|
|
LICENSE # Apache-2.0 License
|
|
package.json # Plugin metadata
|
|
```
|
|
|
|
**Documentation Directory** (Organized by User Journey):
|
|
```
|
|
docs/
|
|
├── README.md # Documentation hub with quick links
|
|
├── getting-started/
|
|
│ ├── installation.md
|
|
│ ├── prerequisites.md
|
|
│ └── quick-start.md
|
|
├── user-guide/
|
|
│ ├── features.md
|
|
│ ├── configuration.md
|
|
│ └── rbac-permissions.md
|
|
├── tutorials/
|
|
│ └── (plugin-specific)
|
|
├── troubleshooting/
|
|
│ ├── README.md (quick diagnosis)
|
|
│ └── common-issues.md
|
|
├── architecture/
|
|
│ ├── overview.md
|
|
│ ├── data-flow.md
|
|
│ ├── design-decisions.md
|
|
│ └── adr/ (Architecture Decision Records)
|
|
├── development/
|
|
│ ├── workflow.md
|
|
│ ├── testing.md
|
|
│ ├── code-style.md
|
|
│ └── release-process.md
|
|
└── deployment/
|
|
├── kubernetes.md
|
|
├── helm.md
|
|
└── production.md
|
|
```
|
|
|
|
### 2. README.md Standard
|
|
|
|
**Required Sections** (Order Matters):
|
|
1. Title + Badges (ArtifactHub, CI, E2E, License)
|
|
2. Quick navigation links (📚 Documentation | 🚀 Installation | 🔒 Security | 🛠️ Development)
|
|
3. **What It Does** (features with visual hierarchy)
|
|
4. **Prerequisites** (table format)
|
|
5. **Installing** (4 options: Plugin Manager, Sidecar, Manual, Source)
|
|
6. **RBAC / Security Setup** (minimal manifests)
|
|
7. **Documentation** (table linking to docs/)
|
|
8. **Troubleshooting** (quick reference table + link to full guide)
|
|
9. **Development** (quick start commands + link to CONTRIBUTING.md)
|
|
10. **Known Limitations** (if applicable)
|
|
11. **Releasing** (brief + link to development/release-process.md)
|
|
12. **Contributing** (link to CONTRIBUTING.md)
|
|
13. **Links** (GitHub, ArtifactHub, Headlamp, related tools)
|
|
14. **License** (MIT with link)
|
|
15. Footer ("Made with ❤️ for the Kubernetes community")
|
|
|
|
**Formatting Standards**:
|
|
- Use emojis strategically for visual scanning (not excessive)
|
|
- Quick navigation at top
|
|
- Tables for structured data (prerequisites, troubleshooting quick ref)
|
|
- Code blocks with language hints
|
|
- Keep main README under 400 lines (details go in docs/)
|
|
|
|
### 3. CHANGELOG.md Standard
|
|
|
|
**Format**: Keep a Changelog (https://keepachangelog.com/)
|
|
|
|
**Structure**:
|
|
```markdown
|
|
# Changelog
|
|
|
|
All notable changes will be documented in this file.
|
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
|
## [Unreleased]
|
|
|
|
## [X.Y.Z] - YYYY-MM-DD
|
|
|
|
### Added
|
|
- New features
|
|
|
|
### Changed
|
|
- Changes to existing functionality
|
|
|
|
### Deprecated
|
|
- Soon-to-be removed features
|
|
|
|
### Removed
|
|
- Removed features
|
|
|
|
### Fixed
|
|
- Bug fixes
|
|
|
|
### Security
|
|
- Security fixes
|
|
|
|
[Unreleased]: https://github.com/user/repo/compare/vX.Y.Z...HEAD
|
|
[X.Y.Z]: https://github.com/user/repo/releases/tag/vX.Y.Z
|
|
```
|
|
|
|
**Standards**:
|
|
- One entry per version, newest first
|
|
- Date in ISO 8601 format (YYYY-MM-DD)
|
|
- Link to GitHub release
|
|
- Group changes by type (Added, Changed, Fixed, Security)
|
|
- Keep descriptions concise (1-2 lines per item)
|
|
|
|
### 4. CONTRIBUTING.md Standard
|
|
|
|
**Required Sections**:
|
|
1. Code of Conduct (brief, respectful)
|
|
2. Getting Started (prerequisites, setup)
|
|
3. Development Workflow (feature development, testing)
|
|
4. Branching Strategy (feat/, fix/, docs/, chore/)
|
|
5. Commit Message Guidelines (Conventional Commits)
|
|
6. Pull Request Process (before creating, creating, review)
|
|
7. Code Style (TypeScript, React, linting, formatting)
|
|
8. Testing Requirements (unit, E2E, coverage goals)
|
|
9. Documentation (when to update docs)
|
|
10. Release Process (version numbering, creating releases)
|
|
|
|
**Formatting**:
|
|
- Use tables for branch naming conventions
|
|
- Code blocks for commit message examples
|
|
- Checklists for PR requirements
|
|
- Links to detailed guides in docs/development/
|
|
|
|
### 5. SECURITY.md Standard
|
|
|
|
**Required Sections**:
|
|
1. Overview (security model, read-only vs. write operations)
|
|
2. Data Flow Diagram (how data moves through system)
|
|
3. RBAC Requirements (minimal permissions table)
|
|
4. Network Security (NetworkPolicies, TLS)
|
|
5. Authentication Methods (service account, OIDC)
|
|
6. Vulnerability Reporting (supported versions table, how to report)
|
|
7. Dependency Security (scanning, update process)
|
|
8. Deployment Security (production checklist)
|
|
9. Common Security Scenarios (FAQs with solutions)
|
|
10. Compliance Considerations (audit trail, GDPR/privacy)
|
|
|
|
**Formatting**:
|
|
- Tables for permissions and supported versions
|
|
- YAML examples for RBAC manifests
|
|
- Bash commands for security verification
|
|
- Clear "Do NOT" warnings for unsafe practices
|
|
|
|
### 6. Documentation Hub (docs/README.md) Standard
|
|
|
|
**Purpose**: Central navigation for all documentation
|
|
|
|
**Structure**:
|
|
```markdown
|
|
# Documentation
|
|
|
|
Central hub for [Plugin Name] documentation.
|
|
|
|
## Quick Links
|
|
|
|
- 🚀 [Quick Start](getting-started/quick-start.md)
|
|
- 📖 [User Guide](user-guide/README.md)
|
|
- 🔧 [Troubleshooting](troubleshooting/README.md)
|
|
- 🏗️ [Architecture](architecture/overview.md)
|
|
- 💻 [Development](development/workflow.md)
|
|
|
|
## Getting Started
|
|
Description + links to installation, prerequisites, quick-start
|
|
|
|
## User Guide
|
|
Description + links to features, configuration, RBAC
|
|
|
|
## Tutorials
|
|
Description + links to plugin-specific tutorials
|
|
|
|
## Troubleshooting
|
|
Description + link to quick diagnosis + common issues
|
|
|
|
## Architecture
|
|
Description + links to overview, data flow, ADRs
|
|
|
|
## Development
|
|
Description + links to workflow, testing, code style, release
|
|
|
|
## Deployment
|
|
Description + links to Kubernetes, Helm, production
|
|
|
|
## API Reference
|
|
Link to JSDoc or generated API docs
|
|
```
|
|
|
|
**Formatting**:
|
|
- Emojis for visual scanning
|
|
- Brief descriptions (1-2 sentences) for each section
|
|
- Organized by user journey (beginner → advanced)
|
|
|
|
### 7. Architecture Decision Records (ADR) Standard
|
|
|
|
**When to Create ADRs**:
|
|
- Significant architectural choices
|
|
- Technology selection (libraries, patterns)
|
|
- Security or performance trade-offs
|
|
- Design patterns that impact maintainability
|
|
|
|
**Template** (Based on Michael Nygard's ADR):
|
|
```markdown
|
|
# ADR-NNN: Title
|
|
|
|
**Status**: [Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
|
|
**Date**: YYYY-MM-DD
|
|
**Deciders**: [List key decision makers]
|
|
|
|
## Context
|
|
|
|
What is the issue that we're seeing that is motivating this decision or change?
|
|
|
|
## Decision
|
|
|
|
What is the change that we're proposing and/or doing?
|
|
|
|
## Consequences
|
|
|
|
What becomes easier or more difficult to do because of this change?
|
|
|
|
### Positive
|
|
- ...
|
|
|
|
### Negative
|
|
- ...
|
|
|
|
### Neutral
|
|
- ...
|
|
|
|
## Alternatives Considered
|
|
|
|
### Option 1: Name
|
|
**Pros**: ...
|
|
**Cons**: ...
|
|
**Decision**: Not chosen because...
|
|
|
|
## References
|
|
|
|
- [Link to related issues, docs, discussions]
|
|
```
|
|
|
|
**Numbering**: ADR-001, ADR-002, etc. (zero-padded 3 digits)
|
|
|
|
**Index File** (architecture/adr/README.md):
|
|
```markdown
|
|
# Architecture Decision Records
|
|
|
|
| ADR | Title | Status | Date |
|
|
|-----|-------|--------|------|
|
|
| [001](001-title.md) | Title | Accepted | 2026-01-01 |
|
|
```
|
|
|
|
### 8. Troubleshooting Standard
|
|
|
|
**Structure**:
|
|
|
|
**troubleshooting/README.md** (Quick Diagnosis):
|
|
```markdown
|
|
# Troubleshooting
|
|
|
|
Quick diagnosis guide for common issues.
|
|
|
|
## Quick Reference
|
|
|
|
| Symptom | Likely Cause | Quick Fix |
|
|
|---------|-------------|-----------|
|
|
| ... | ... | ... |
|
|
|
|
## Detailed Guides
|
|
|
|
- [Common Errors](common-errors.md)
|
|
- [RBAC Issues](rbac-issues.md)
|
|
- [Network Problems](network-problems.md)
|
|
```
|
|
|
|
**Individual Issue Files**:
|
|
- Symptom-based organization
|
|
- Step-by-step resolution
|
|
- Bash commands for verification
|
|
- Links to related docs
|
|
- "Still Having Issues?" section with bug report link
|
|
|
|
### 9. Testing Documentation Standard
|
|
|
|
**docs/development/testing.md**:
|
|
|
|
**Required Sections**:
|
|
1. Overview (testing philosophy, types of tests)
|
|
2. Unit Testing (framework, running tests, writing tests, examples)
|
|
3. E2E Testing (framework, prerequisites, running tests, examples)
|
|
4. CI/CD Integration (workflows, required secrets)
|
|
5. Test Coverage (goals, generating reports)
|
|
6. Best Practices (unit, E2E, general)
|
|
7. Debugging (common issues, useful commands)
|
|
|
|
**Formatting**:
|
|
- Tables for test types and coverage goals
|
|
- Code blocks for examples
|
|
- Bash commands for running tests
|
|
- Links to test files in repository
|
|
|
|
### 10. Visual Formatting Standards
|
|
|
|
**Emoji Usage** (Strategic, Not Excessive):
|
|
- 📚 Documentation
|
|
- 🚀 Installation/Quick Start
|
|
- 🔒 Security
|
|
- 🛠️ Development
|
|
- ✅ Success/Completed
|
|
- ❌ Error/Failed
|
|
- ⚠️ Warning/Important
|
|
- 🔧 Troubleshooting/Fix
|
|
- 🏗️ Architecture
|
|
- 💻 Code/Technical
|
|
|
|
**Code Block Languages**:
|
|
- `bash` for shell commands
|
|
- `yaml` for Kubernetes/Helm manifests
|
|
- `typescript` for TypeScript code
|
|
- `json` for JSON config
|
|
- `diff` for showing changes
|
|
|
|
**Tables**:
|
|
- Use for structured data (prerequisites, commands, permissions, troubleshooting)
|
|
- Keep columns concise
|
|
- Left-align text columns, center-align status columns
|
|
|
|
**Links**:
|
|
- Use descriptive text, not "click here"
|
|
- Relative paths within repo (`docs/architecture/overview.md`)
|
|
- Absolute URLs for external resources
|
|
- Link to specific sections with anchors where helpful
|
|
|
|
## Implementation Plan
|
|
|
|
### Phase 1: Polaris Plugin Enhancements
|
|
|
|
**Priority 1: Granular Documentation Structure**
|
|
- [ ] Create docs/README.md (documentation hub)
|
|
- [ ] Break down DEPLOYMENT.md:
|
|
- [ ] docs/getting-started/installation.md
|
|
- [ ] docs/getting-started/prerequisites.md
|
|
- [ ] docs/deployment/kubernetes.md
|
|
- [ ] docs/deployment/helm.md
|
|
- [ ] docs/deployment/production.md
|
|
- [ ] Break down ARCHITECTURE.md:
|
|
- [ ] docs/architecture/overview.md
|
|
- [ ] docs/architecture/data-flow.md
|
|
- [ ] docs/architecture/design-decisions.md
|
|
- [ ] Move TROUBLESHOOTING.md → docs/troubleshooting/
|
|
- [ ] Create troubleshooting/README.md (quick diagnosis)
|
|
- [ ] Break into common-issues.md, rbac-issues.md, etc.
|
|
- [ ] Move TESTING.md → docs/development/testing.md
|
|
|
|
**Priority 2: Add Missing Content**
|
|
- [ ] Create docs/getting-started/quick-start.md (5-minute tutorial)
|
|
- [ ] Create docs/user-guide/features.md
|
|
- [ ] Create docs/user-guide/configuration.md
|
|
- [ ] Create docs/architecture/adr/ directory with ADR template
|
|
- [ ] Create FAQ section in troubleshooting
|
|
|
|
**Priority 3: Content Refinement**
|
|
- [ ] Add multi-platform instructions to installation.md
|
|
- [ ] Enhance README.md with better visual hierarchy
|
|
- [ ] Add more code examples to user guide
|
|
- [ ] Create architecture diagrams (ASCII art or mermaid)
|
|
|
|
### Phase 2: Sealed Secrets Plugin Enhancements
|
|
|
|
**Priority 1: Root-Level Documentation**
|
|
- [ ] Extract CONTRIBUTING.md from README
|
|
- [ ] Create SECURITY.md with vulnerability reporting
|
|
- [ ] Expand CHANGELOG.md to include all versions
|
|
- [ ] Update README.md to match standardized format
|
|
|
|
**Priority 2: Complete Incomplete Files**
|
|
- [ ] Finish placeholder tutorial files
|
|
- [ ] Add E2E testing guide to docs/development/testing.md
|
|
- [ ] Expand API reference (ensure generated docs are readable)
|
|
- [ ] Add FAQ section
|
|
|
|
**Priority 3: Content Refinement**
|
|
- [ ] Add CI/CD badges to README
|
|
- [ ] Ensure consistent emoji usage
|
|
- [ ] Standardize code block languages
|
|
- [ ] Add more cross-links between related topics
|
|
|
|
### Phase 3: Cross-Repository Standards
|
|
|
|
**Documentation Templates**
|
|
- [ ] ADR template in both repos
|
|
- [ ] Bug report template (GitHub issue template)
|
|
- [ ] Feature request template
|
|
- [ ] PR template
|
|
|
|
**Shared Patterns**
|
|
- [ ] Consistent branching strategy docs
|
|
- [ ] Identical commit message conventions
|
|
- [ ] Same release process documentation
|
|
- [ ] Unified code style guidelines
|
|
|
|
## Success Metrics
|
|
|
|
**Completeness**:
|
|
- [ ] All standard files present in both repos
|
|
- [ ] No broken links in documentation
|
|
- [ ] All code examples tested and functional
|
|
|
|
**Consistency**:
|
|
- [ ] Same file structure in both repos
|
|
- [ ] Same formatting standards applied
|
|
- [ ] Same terminology used for common concepts
|
|
|
|
**Usability**:
|
|
- [ ] New users can get started in < 5 minutes
|
|
- [ ] Contributors can find development workflow easily
|
|
- [ ] Troubleshooting guides resolve 80%+ of common issues
|
|
|
|
**Maintainability**:
|
|
- [ ] Documentation updates documented in CHANGELOG
|
|
- [ ] ADRs created for all major decisions
|
|
- [ ] Test documentation kept in sync with code
|
|
|
|
## Maintenance Guidelines
|
|
|
|
**When to Update Documentation**:
|
|
1. **New Feature**: Add to CHANGELOG, update user guide, add tutorial if complex
|
|
2. **Bug Fix**: Add to CHANGELOG, update troubleshooting if user-facing
|
|
3. **Architecture Change**: Create ADR, update architecture docs
|
|
4. **Breaking Change**: Add to CHANGELOG with migration guide, update SECURITY.md if relevant
|
|
5. **New Dependency**: Document in prerequisites, update installation guide
|
|
6. **Configuration Change**: Update user guide, add migration notes if needed
|
|
|
|
**Documentation Review Checklist**:
|
|
- [ ] Spelling and grammar checked
|
|
- [ ] Links tested (no 404s)
|
|
- [ ] Code examples tested
|
|
- [ ] Screenshots/diagrams up to date (if applicable)
|
|
- [ ] Cross-references added where relevant
|
|
- [ ] CHANGELOG updated
|
|
- [ ] Version numbers current
|
|
|
|
**Annual Documentation Audit**:
|
|
- Review all docs for accuracy (especially version numbers, screenshots)
|
|
- Check for outdated information
|
|
- Update ADR status if superseded
|
|
- Archive obsolete tutorials
|
|
- Refresh getting-started for latest best practices
|
|
|
|
## Appendix: File Mapping
|
|
|
|
### Polaris Plugin Current → Standard
|
|
|
|
| Current | Standard Location |
|
|
|---------|-------------------|
|
|
| README.md | README.md (enhanced) |
|
|
| CHANGELOG.md | CHANGELOG.md (no change) |
|
|
| CONTRIBUTING.md | CONTRIBUTING.md (no change) |
|
|
| SECURITY.md | SECURITY.md (no change) |
|
|
| docs/ARCHITECTURE.md | docs/architecture/overview.md + data-flow.md + design-decisions.md |
|
|
| docs/DEPLOYMENT.md | docs/getting-started/installation.md + docs/deployment/kubernetes.md + helm.md + production.md |
|
|
| docs/TROUBLESHOOTING.md | docs/troubleshooting/README.md + common-issues.md |
|
|
| docs/TESTING.md | docs/development/testing.md |
|
|
| — (new) | docs/README.md |
|
|
| — (new) | docs/getting-started/quick-start.md |
|
|
| — (new) | docs/user-guide/features.md |
|
|
| — (new) | docs/architecture/adr/ |
|
|
|
|
### Sealed Secrets Plugin Current → Standard
|
|
|
|
| Current | Standard Location |
|
|
|---------|-------------------|
|
|
| README.md | README.md (extract contributing section) |
|
|
| CHANGELOG.md | CHANGELOG.md (expand) |
|
|
| — (new) | CONTRIBUTING.md (extract from README) |
|
|
| — (new) | SECURITY.md (new file) |
|
|
| docs/* | docs/* (mostly keep, enhance incomplete files) |
|
|
|
|
---
|
|
|
|
**Document Version**: 1.0
|
|
**Last Updated**: 2026-02-12
|
|
**Approved By**: [Pending]
|