mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 02:04:07 +08:00
Remote provisioning: fix webhook event processing (#103122)
Set the namespace in the context on Insert
This commit is contained in:

committed by
GitHub

parent
4c2790c41b
commit
1ebcb3f604
@ -379,6 +379,7 @@ func (s *persistentStore) cleanupClaims(ctx context.Context) error {
|
||||
func (s *persistentStore) Insert(ctx context.Context, job *provisioning.Job) (*provisioning.Job, error) {
|
||||
s.generateJobName(job) // Side-effect: updates the job's name.
|
||||
|
||||
ctx = request.WithNamespace(ctx, job.GetNamespace())
|
||||
obj, err := s.jobStore.Create(ctx, job, nil, &metav1.CreateOptions{})
|
||||
if apierrors.IsAlreadyExists(err) {
|
||||
return nil, apifmt.Errorf("job '%s' in '%s' already exists: %w", job.GetName(), job.GetNamespace(), err)
|
||||
|
Reference in New Issue
Block a user