Add Job and secrets support for k8s-kind deployments #995
Merged
prathamesh
merged 26 commits from 2026-03-11 03:56:22 +00:00
feature/k8s-jobs into main
No Reviewers
Labels
Clear labels
K8s
bug
documentation
duplicate
enhancement
feature
good first issue
help wanted
in progress
invalid
question
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
This will not be worked on
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/stack-orchestrator#995
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of https://plan.wireit.in/deepstack/browse/VUL-315
The secrets: {} key added by init_operation for k8s deployments became the last key in the spec file, breaking the raw string append that assumed network: was always last. Replace with proper YAML load/modify/dump. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>pods_in_deployment() and containers_in_pod() hardcoded namespace="default", but pods are created in the deployment-specific namespace (laconic-{cluster-id}). This caused logs() to return "Pods not running" even when pods were healthy. Add namespace parameter to both functions and pass self.k8s_namespace from the logs() caller. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a312bb5ee7to183a188874The deployment control test queries pods with raw kubectl but didn't specify the namespace. Since pods now live in laconic-{deployment_id} instead of default, the query returned empty results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Add a job compose file for the test stack and extend the k8s deploy test to verify new features: - Namespace isolation: pod exists in laconic-{id}, not default - Stack labels: app.kubernetes.io/stack label set on pods - Job completion: test-job runs to completion (status.succeeded=1) - Secrets: spec secrets: key results in envFrom secretRef on pod Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>deploy init already writes 'secrets: {}' into the spec file. The test was appending a second secrets block via heredoc, which ruamel.yaml rejects as a duplicate key. Use sed to replace the empty value instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Job pod templates used the same app={deployment_id} label as deployment pods, causing pods_in_deployment() to return both. This made the logs command warn about multiple pods and pick the wrong one. Use app={deployment_id}-job for job pod templates so they are not matched by pods_in_deployment(). The Job metadata itself retains the original app label for stack-level queries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>