Skip to content
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

[FEATURE] Patch global config to abort-fuse job pod #1184

Open
SonglinLife opened this issue Nov 18, 2024 · 0 comments
Open

[FEATURE] Patch global config to abort-fuse job pod #1184

SonglinLife opened this issue Nov 18, 2024 · 0 comments
Labels
kind/feature New feature or request

Comments

@SonglinLife
Copy link

What feature you'd like to add:

when create a job pod, patch the global config to abort fuse job pod.

return &batchv1.Job{
ObjectMeta: metav1.ObjectMeta{
Name: jobName,
Namespace: mountpod.Namespace,
},
Spec: batchv1.JobSpec{
TTLSecondsAfterFinished: &ttlSecond,
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{

maybe the code like

	patch := config.GlobalConfig.GenMountPodPatch(config.JfsSetting{VolumeId: "abort-fuse-mock-volume"})
	job.Spec.Template.SetAnnotations(patch.Annotations)
	job.Spec.Template.SetLabels(patch.Labels)

And also for other jobs like cleanup job.
Why is this feature needed:
Due to certain security and network policies, our prod k8s requires pods to have specific annotations and labels.

@SonglinLife SonglinLife added the kind/feature New feature or request label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant