-
Notifications
You must be signed in to change notification settings - Fork 16
Service Accounts - Enhanced Security Visualization #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for gorgeous-maamoul-daf273 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduces first-class support for Service Accounts and Jobs/CronJobs across YAML generation, storage, UI forms, and visualization.
- Adds ServiceAccount, Job, and CronJob types plus corresponding YAML generators
- Persists service accounts in localStorage and updates global label merging
- Extends UI components (VisualPreview, ResourceSummary, DeploymentForm, App sidebar) to create, edit, visualize, and summarize service accounts and jobs
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/utils/yamlGenerator.ts | Added generateServiceAccountYaml , generateJobYaml , generateCronJobYaml , and updated generateMultiDeploymentYaml to include serviceAccounts |
src/utils/localStorage.ts | Included serviceAccounts in saved and loaded KubeConfig |
src/types/index.ts | Defined ServiceAccount interface and added serviceAccount field to Deployment/DaemonSet |
src/components/VisualPreview.tsx | Extended flow visualization with service accounts, jobs, cronjobs, and filtering logic |
src/components/ServiceAccountsList.tsx | New component to list, select, duplicate, and delete service accounts |
src/components/ServiceAccountManager.tsx | New modal for creating/editing service accounts |
src/components/ResourceSummary.tsx | Updated summary view to include counts/details for service accounts and jobs |
src/components/KubernetesIcons.tsx | Added K8sSecurityIcon and K8sServiceAccountIcon SVG icons |
src/components/DeploymentForm.tsx | Added service account dropdown and navigation button |
src/App.tsx | Integrated service account management in sidebar, state, modals, and filterType logic |
Comments suppressed due to low confidence (2)
src/utils/yamlGenerator.ts:463
- [nitpick] New functions
generateServiceAccountYaml
,generateJobYaml
, andgenerateCronJobYaml
lack unit tests. Consider adding test coverage to verify correct YAML output for various inputs.
export function generateServiceAccountYaml(serviceAccounts: ServiceAccount[], projectSettings?: ProjectSettings): string {
src/components/VisualPreview.tsx:22
- Several icons used later (e.g., CheckCircle, AlertTriangle, XCircle, Clock, RotateCcw, Info, Network, HardDrive) are not imported, causing runtime errors. Please import all referenced icons from 'lucide-react'.
} from 'lucide-react';
case 'job': | ||
return <Play className="w-4 h-4 text-orange-500" />; | ||
case 'cronjob': | ||
return <Clock className="w-4 h-4 text-purple-500" />; | ||
return <Settings className="w-4 h-4 text-orange-500" />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is unreachable because there is a return just above it in the same case 'cronjob'
block. Remove the redundant return or merge logic into one branch.
return <Settings className="w-4 h-4 text-orange-500" />; |
Copilot uses AI. Check for mistakes.
allResources.push(objectToYaml(serviceAccountResource)); | ||
}); | ||
|
||
return allResources.join('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generateServiceAccountYaml
joins multiple resources with just '\n', whereas other generators use '\n---\n' to separate YAML documents. This may produce invalid combined YAML. Align separators with the rest of the generators.
return allResources.join('\n'); | |
return allResources.join('\n---\n'); |
Copilot uses AI. Check for mistakes.
No description provided.