-
Notifications
You must be signed in to change notification settings - Fork 111
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
Job CRD #116
Job CRD #116
Conversation
c5eec60
to
7d98f61
Compare
4d229fa
to
911320e
Compare
WIP parking adds generated job template; controller updates addtl cleanup refactors some chart operations; converts job.command to job.containers adds unit tests; refactors AppCondition fixes one merge conflict rm unneeded tests manifests update stubs out Job WIP parking adds generated job template; controller updates addtl cleanup refactors some chart operations; converts job.command to job.containers adds unit tests; refactors AppCondition fixes one merge conflict rm unneeded tests reset manager controller name add jobs to framework status
911320e
to
c01dd8e
Compare
cmd/manager/main.go
Outdated
@@ -87,6 +87,10 @@ func main() { | |||
setupLog.Error(err, "unable to set default templates") | |||
os.Exit(1) | |||
} | |||
if err = storage.Update(templates.IngressConfigMapName("none"), templates.NoIngressTemplates); err != nil { |
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.
how about templates.JobConfigMapName()
and templates.JobTemplates
?
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.
Good call, change made. Deciding what to call this was something I was unsure of.
internal/api/v1beta1/job_types.go
Outdated
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! |
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.
let's remove this comment)
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.
Removed.
internal/templates/generator/main.go
Outdated
Traefik bool | ||
Istio bool | ||
Common bool | ||
NoIngress bool |
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.
How about Job
instead of NoIngress
?
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.
Good call. Renamed all NoIngress -> Job.
internal/templates/storage.go
Outdated
@@ -71,6 +71,9 @@ var ( | |||
TraefikDefaultTemplates = Templates{ | |||
Yamls: GeneratedYamls.TraefikYamls, | |||
} | |||
NoIngressTemplates = Templates{ | |||
Yamls: GeneratedYamls.NoIngressYamls, |
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.
GeneratedYamls.NoIngressYamls
?
Description
Adds a Job CRD/Controller. Spec.
Quickstart:
make uninstall
make manager install
- assure job CRD is live:k get crd
(Missing "Jobs" CRD?kubectl apply -f config/crd/bases/theketch.io_jobs.yaml
./bin/manager --enable-leader-election=false --disable-webhooks
- run managerkubectl apply -f sample-ketch-job.yaml
(assumes you have framework "myframework" created")kubectl get jobs -A
kubectl get pods -A
kubectl logs <pod> -n ketch-myframework pi
andkubectl logs <pod> -n ketch-myframework lister
kubectl delete -f sample-ketch-job.yaml
(should remove the job, i.e.kubectl get jobs -A
shows no "crd-test")sample-ketch-job.yaml:
kubectl get jobs -n ketch-myframework
kubectl get pods -n ketch-myframework
kubectl logs <pod> -n ketch-myframework pi
- for "pi" container in jobkubectl logs <pod> -n ketch-myframework lister
- for "ls /" container in jobFixes # 1541
Type of change
Testing
Documentation
Final Checklist:
Additional Information (omit if empty)
Please include anything else relevant to this PR that may be useful to know.