Files
jobs-manager-operator/plugins/krew/managedjob.yaml
T
lukaszraczylo 2b36071647 Multiple fixes (#29)
* Multiple fixes

- add goreleaser to the build / release process
- add kubectl plugin for job graphs visualization
- add installation scripts
- update dependencies

* Update the release & CRD content.

* Next set of improvements.

  Code Quality

  - Label constants: Added LabelWorkflowName, LabelGroupName, LabelJobName, LabelJobID in controllers/definitions.go
  - Removed commented debug code: Cleaned up dead code from multiple files
  - Removed unused dependencyTree field: Cleaned connPackage struct
  - Fixed snake_case variables: Changed to camelCase (runGroup, groupDep, runJob, jobDep, k8sJob)

  Kubernetes Best Practices

  - Finalizers: Implemented handleDeletion() and deleteChildJobs() for proper cleanup
  - Status enum validation: Added +kubebuilder:validation:Enum=pending;running;succeeded;failed;aborted
  - ImagePullPolicy default: Created getImagePullPolicy() helper that defaults to IfNotPresent
  - Resource limits support: Added Resources *corev1.ResourceRequirements to ManagedJobParameters

  Observability

  - Prometheus metrics: Created controllers/metrics.go with counters (jobs created/succeeded/failed), histogram (reconciliation duration), and gauge (active jobs)
  - Structured logging: Added logger field to connPackage, used context-based logging throughout

  Configuration

  - Leader election ID: Made configurable via --leader-election-id flag
  - Development mode: Made configurable via --dev-mode flag and LOG_LEVEL env var

  Performance

  - Dependency lookup optimization: Changed from O(n*m) to O(1) using lookup maps (jobDepMap, groupDepMap)
  - Reconciliation backoff: Added RequeueAfter: 30*time.Second when workflow is running

  Documentation & Testing

  - Godoc documentation: Added comprehensive comments to API types and controller
  - Unit tests: Added helpers_test.go with tests for all helper functions
  - Integration tests: Added managedjob_controller_test.go with Ginkgo/Gomega tests

* Add the helm chart release.

* Add reasonable test coverage.
2025-12-17 22:33:23 +00:00

72 lines
2.6 KiB
YAML

apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: managedjob
spec:
version: v0.0.33
homepage: https://github.com/lukaszraczylo/jobs-manager-operator
shortDescription: Visualize ManagedJob workflows
description: |
A kubectl plugin for visualizing ManagedJob workflows from the
Jobs Manager Operator. It provides ASCII tree visualization of
workflow structure and execution status with colored output.
Features:
- Visualize workflow structure as ASCII tree
- Color-coded status indicators (green=succeeded, yellow=running, red=failed)
- Watch mode for real-time status updates
- List all ManagedJobs in a namespace
- Quick status summary view
Usage:
kubectl managedjob visualize <name> -n <namespace>
kubectl managedjob visualize <name> -w # Watch mode
kubectl managedjob list -n <namespace>
kubectl managedjob status <name> -n <namespace>
caveats: |
This plugin requires the Jobs Manager Operator CRD to be installed
in your cluster. See https://github.com/lukaszraczylo/jobs-manager-operator
for installation instructions.
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/lukaszraczylo/jobs-manager-operator/releases/download/v0.0.33/jobs-manager-operator_0.0.33_darwin_amd64.tar.gz
sha256: REPLACE_WITH_ACTUAL_SHA256
bin: kubectl-managedjob
- selector:
matchLabels:
os: darwin
arch: arm64
uri: https://github.com/lukaszraczylo/jobs-manager-operator/releases/download/v0.0.33/jobs-manager-operator_0.0.33_darwin_arm64.tar.gz
sha256: REPLACE_WITH_ACTUAL_SHA256
bin: kubectl-managedjob
- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/lukaszraczylo/jobs-manager-operator/releases/download/v0.0.33/jobs-manager-operator_0.0.33_linux_amd64.tar.gz
sha256: REPLACE_WITH_ACTUAL_SHA256
bin: kubectl-managedjob
- selector:
matchLabels:
os: linux
arch: arm64
uri: https://github.com/lukaszraczylo/jobs-manager-operator/releases/download/v0.0.33/jobs-manager-operator_0.0.33_linux_arm64.tar.gz
sha256: REPLACE_WITH_ACTUAL_SHA256
bin: kubectl-managedjob
- selector:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/lukaszraczylo/jobs-manager-operator/releases/download/v0.0.33/jobs-manager-operator_0.0.33_windows_amd64.zip
sha256: REPLACE_WITH_ACTUAL_SHA256
bin: kubectl-managedjob.exe