• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando-incubator / stackset-controller / 19443784616

17 Nov 2025 08:36PM UTC coverage: 50.075% (+0.3%) from 49.791%
19443784616

Pull #716

github

szuecs
fix: deployment nil

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Pull Request #716: feature: zalando.org/forward-backend annotation support to enable migration to eks

41 of 50 new or added lines in 4 files covered. (82.0%)

82 existing lines in 2 files now uncovered.

2662 of 5316 relevant lines covered (50.08%)

0.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.89
/controller/stack_resources.go
1
package controller
2

3
import (
4
        "context"
5
        "fmt"
6

7
        rgv1 "github.com/szuecs/routegroup-client/apis/zalando.org/v1"
8
        zv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1"
9
        "github.com/zalando-incubator/stackset-controller/pkg/core"
10
        apps "k8s.io/api/apps/v1"
11
        v2 "k8s.io/api/autoscaling/v2"
12
        apiv1 "k8s.io/api/core/v1"
13
        networking "k8s.io/api/networking/v1"
14
        "k8s.io/apimachinery/pkg/api/equality"
15
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
16
        "k8s.io/apimachinery/pkg/types"
17
)
18

19
func pint32Equal(p1, p2 *int32) bool {
1✔
20
        if p1 == nil && p2 == nil {
1✔
21
                return true
×
22
        }
×
23
        if p1 != nil && p2 != nil {
2✔
24
                return *p1 == *p2
1✔
25
        }
1✔
26
        return false
×
27
}
28

29
// syncObjectMeta copies metadata elements such as labels or annotations from source to target
30
func syncObjectMeta(target, source metav1.Object) {
1✔
31
        target.SetLabels(source.GetLabels())
1✔
32
        target.SetAnnotations(source.GetAnnotations())
1✔
33
}
1✔
34

35
// isOwned checks if the resource is owned and returns the UID of the owner.
36
func isOwned(ownerReferences []metav1.OwnerReference) (bool, types.UID) {
1✔
37
        for _, ownerRef := range ownerReferences {
2✔
38
                return true, ownerRef.UID
1✔
39
        }
1✔
40

41
        return false, ""
1✔
42
}
43

44
func (c *StackSetController) ReconcileStackDeployment(ctx context.Context, stack *zv1.Stack, existing *apps.Deployment, generateUpdated func() *apps.Deployment) error {
1✔
45
        deployment := generateUpdated()
1✔
46

1✔
47
        if deployment == nil {
1✔
NEW
UNCOV
48
                return nil
×
NEW
UNCOV
49
        }
×
50

51
        // Create new deployment
52
        if existing == nil {
2✔
53
                _, err := c.client.AppsV1().Deployments(deployment.Namespace).Create(ctx, deployment, metav1.CreateOptions{})
1✔
54
                if err != nil {
1✔
UNCOV
55
                        return err
×
UNCOV
56
                }
×
57
                c.recorder.Eventf(
1✔
58
                        stack,
1✔
59
                        apiv1.EventTypeNormal,
1✔
60
                        "CreatedDeployment",
1✔
61
                        "Created Deployment %s",
1✔
62
                        deployment.Name)
1✔
63
                return nil
1✔
64
        }
65

66
        // Check if we need to update the deployment
67
        if core.IsResourceUpToDate(stack, existing.ObjectMeta) && pint32Equal(existing.Spec.Replicas, deployment.Spec.Replicas) {
2✔
68
                return nil
1✔
69
        }
1✔
70

71
        updated := existing.DeepCopy()
1✔
72
        syncObjectMeta(updated, deployment)
1✔
73
        updated.Spec = deployment.Spec
1✔
74
        updated.Spec.Selector = existing.Spec.Selector
1✔
75

1✔
76
        _, err := c.client.AppsV1().Deployments(updated.Namespace).Update(ctx, updated, metav1.UpdateOptions{})
1✔
77
        if err != nil {
1✔
UNCOV
78
                return err
×
UNCOV
79
        }
×
80
        c.recorder.Eventf(
1✔
81
                stack,
1✔
82
                apiv1.EventTypeNormal,
1✔
83
                "UpdatedDeployment",
1✔
84
                "Updated Deployment %s",
1✔
85
                deployment.Name)
1✔
86
        return nil
1✔
87
}
88

89
func (c *StackSetController) ReconcileStackHPA(ctx context.Context, stack *zv1.Stack, existing *v2.HorizontalPodAutoscaler, generateUpdated func() (*v2.HorizontalPodAutoscaler, error)) error {
1✔
90
        hpa, err := generateUpdated()
1✔
91
        if err != nil {
1✔
UNCOV
92
                return err
×
UNCOV
93
        }
×
94

95
        // HPA removed
96
        if hpa == nil {
2✔
97
                if existing != nil {
2✔
98
                        err := c.client.AutoscalingV2().HorizontalPodAutoscalers(existing.Namespace).Delete(ctx, existing.Name, metav1.DeleteOptions{})
1✔
99
                        if err != nil {
1✔
UNCOV
100
                                return err
×
UNCOV
101
                        }
×
102
                        c.recorder.Eventf(
1✔
103
                                stack,
1✔
104
                                apiv1.EventTypeNormal,
1✔
105
                                "DeletedHPA",
1✔
106
                                "Deleted HPA %s",
1✔
107
                                existing.Namespace)
1✔
108
                }
109
                return nil
1✔
110
        }
111

112
        // Create new HPA
113
        if existing == nil {
2✔
114
                _, err := c.client.AutoscalingV2().HorizontalPodAutoscalers(hpa.Namespace).Create(ctx, hpa, metav1.CreateOptions{})
1✔
115
                if err != nil {
1✔
UNCOV
116
                        return err
×
UNCOV
117
                }
×
118
                c.recorder.Eventf(
1✔
119
                        stack,
1✔
120
                        apiv1.EventTypeNormal,
1✔
121
                        "CreatedHPA",
1✔
122
                        "Created HPA %s",
1✔
123
                        hpa.Name)
1✔
124
                return nil
1✔
125
        }
126

127
        // Check if we need to update the HPA
128
        if core.IsResourceUpToDate(stack, existing.ObjectMeta) &&
1✔
129
                pint32Equal(existing.Spec.MinReplicas, hpa.Spec.MinReplicas) &&
1✔
130
                core.AreAnnotationsUpToDate(hpa.ObjectMeta, existing.ObjectMeta) {
2✔
131
                return nil
1✔
132
        }
1✔
133

134
        updated := existing.DeepCopy()
1✔
135
        syncObjectMeta(updated, hpa)
1✔
136
        updated.Spec = hpa.Spec
1✔
137

1✔
138
        _, err = c.client.AutoscalingV2().HorizontalPodAutoscalers(updated.Namespace).Update(ctx, updated, metav1.UpdateOptions{})
1✔
139
        if err != nil {
1✔
UNCOV
140
                return err
×
UNCOV
141
        }
×
142
        c.recorder.Eventf(
1✔
143
                stack,
1✔
144
                apiv1.EventTypeNormal,
1✔
145
                "UpdatedHPA",
1✔
146
                "Updated HPA %s",
1✔
147
                hpa.Name)
1✔
148
        return nil
1✔
149
}
150

151
func (c *StackSetController) ReconcileStackService(ctx context.Context, stack *zv1.Stack, existing *apiv1.Service, generateUpdated func() (*apiv1.Service, error)) error {
1✔
152
        service, err := generateUpdated()
1✔
153
        if err != nil {
1✔
UNCOV
154
                return err
×
UNCOV
155
        }
×
156

157
        // Create new service
158
        if existing == nil {
2✔
159
                _, err := c.client.CoreV1().Services(service.Namespace).Create(ctx, service, metav1.CreateOptions{})
1✔
160
                if err != nil {
1✔
UNCOV
161
                        return err
×
UNCOV
162
                }
×
163
                c.recorder.Eventf(
1✔
164
                        stack,
1✔
165
                        apiv1.EventTypeNormal,
1✔
166
                        "CreatedService",
1✔
167
                        "Created Service %s",
1✔
168
                        service.Name)
1✔
169
                return nil
1✔
170
        }
171

172
        // Check if we need to update the service
173
        if core.IsResourceUpToDate(stack, existing.ObjectMeta) {
2✔
174
                return nil
1✔
175
        }
1✔
176

177
        updated := existing.DeepCopy()
1✔
178
        syncObjectMeta(updated, service)
1✔
179
        updated.Spec = service.Spec
1✔
180
        updated.Spec.ClusterIP = existing.Spec.ClusterIP // ClusterIP is immutable
1✔
181

1✔
182
        _, err = c.client.CoreV1().Services(updated.Namespace).Update(ctx, updated, metav1.UpdateOptions{})
1✔
183
        if err != nil {
1✔
UNCOV
184
                return err
×
UNCOV
185
        }
×
186
        c.recorder.Eventf(
1✔
187
                stack,
1✔
188
                apiv1.EventTypeNormal,
1✔
189
                "UpdatedService",
1✔
190
                "Updated Service %s",
1✔
191
                service.Name)
1✔
192
        return nil
1✔
193
}
194

195
func (c *StackSetController) ReconcileStackIngress(ctx context.Context, stack *zv1.Stack, existing *networking.Ingress, generateUpdated func() (*networking.Ingress, error)) error {
1✔
196
        ingress, err := generateUpdated()
1✔
197
        if err != nil {
1✔
UNCOV
198
                return err
×
UNCOV
199
        }
×
200

201
        // Ingress removed
202
        if ingress == nil {
2✔
203
                if existing != nil {
2✔
204
                        err := c.client.NetworkingV1().Ingresses(existing.Namespace).Delete(ctx, existing.Name, metav1.DeleteOptions{})
1✔
205
                        if err != nil {
1✔
UNCOV
206
                                return err
×
UNCOV
207
                        }
×
208
                        c.recorder.Eventf(
1✔
209
                                stack,
1✔
210
                                apiv1.EventTypeNormal,
1✔
211
                                "DeletedIngress",
1✔
212
                                "Deleted Ingress %s",
1✔
213
                                existing.Namespace)
1✔
214
                }
215
                return nil
1✔
216
        }
217

218
        // Create new Ingress
219
        if existing == nil {
2✔
220
                _, err := c.client.NetworkingV1().Ingresses(ingress.Namespace).Create(ctx, ingress, metav1.CreateOptions{})
1✔
221
                if err != nil {
1✔
UNCOV
222
                        return err
×
UNCOV
223
                }
×
224
                c.recorder.Eventf(
1✔
225
                        stack,
1✔
226
                        apiv1.EventTypeNormal,
1✔
227
                        "CreatedIngress",
1✔
228
                        "Created Ingress %s",
1✔
229
                        ingress.Name)
1✔
230
                return nil
1✔
231
        }
232

233
        // Check if we need to update the Ingress
234
        if core.IsResourceUpToDate(stack, existing.ObjectMeta) &&
1✔
235
                core.AreAnnotationsUpToDate(ingress.ObjectMeta, existing.ObjectMeta) {
2✔
236

1✔
237
                return nil
1✔
238
        }
1✔
239

240
        updated := existing.DeepCopy()
1✔
241
        syncObjectMeta(updated, ingress)
1✔
242
        updated.Spec = ingress.Spec
1✔
243

1✔
244
        _, err = c.client.NetworkingV1().Ingresses(updated.Namespace).Update(ctx, updated, metav1.UpdateOptions{})
1✔
245
        if err != nil {
1✔
UNCOV
246
                return err
×
UNCOV
247
        }
×
248
        c.recorder.Eventf(
1✔
249
                stack,
1✔
250
                apiv1.EventTypeNormal,
1✔
251
                "UpdatedIngress",
1✔
252
                "Updated Ingress %s",
1✔
253
                ingress.Name)
1✔
254
        return nil
1✔
255
}
256

257
func (c *StackSetController) ReconcileStackRouteGroup(ctx context.Context, stack *zv1.Stack, existing *rgv1.RouteGroup, generateUpdated func() (*rgv1.RouteGroup, error)) error {
1✔
258
        routegroup, err := generateUpdated()
1✔
259
        if err != nil {
1✔
UNCOV
260
                return err
×
UNCOV
261
        }
×
262

263
        // RouteGroup removed
264
        if routegroup == nil {
2✔
265
                if existing != nil {
2✔
266
                        err := c.client.RouteGroupV1().RouteGroups(existing.Namespace).Delete(ctx, existing.Name, metav1.DeleteOptions{})
1✔
267
                        if err != nil {
1✔
UNCOV
268
                                return err
×
UNCOV
269
                        }
×
270
                        c.recorder.Eventf(
1✔
271
                                stack,
1✔
272
                                apiv1.EventTypeNormal,
1✔
273
                                "DeletedRouteGroup",
1✔
274
                                "Deleted RouteGroup %s",
1✔
275
                                existing.Namespace)
1✔
276
                }
277
                return nil
1✔
278
        }
279

280
        // Create new RouteGroup
281
        if existing == nil {
2✔
282
                _, err := c.client.RouteGroupV1().RouteGroups(routegroup.Namespace).Create(ctx, routegroup, metav1.CreateOptions{})
1✔
283
                if err != nil {
1✔
UNCOV
284
                        return err
×
UNCOV
285
                }
×
286
                c.recorder.Eventf(
1✔
287
                        stack,
1✔
288
                        apiv1.EventTypeNormal,
1✔
289
                        "CreatedRouteGroup",
1✔
290
                        "Created RouteGroup %s",
1✔
291
                        routegroup.Name)
1✔
292
                return nil
1✔
293
        }
294

295
        // Check if we need to update the RouteGroup
296
        if core.IsResourceUpToDate(stack, existing.ObjectMeta) &&
1✔
297
                equality.Semantic.DeepEqual(routegroup.Spec, existing.Spec) &&
1✔
298
                core.AreAnnotationsUpToDate(
1✔
299
                        routegroup.ObjectMeta,
1✔
300
                        existing.ObjectMeta,
1✔
301
                ) {
2✔
302

1✔
303
                return nil
1✔
304
        }
1✔
305

306
        updated := existing.DeepCopy()
1✔
307
        syncObjectMeta(updated, routegroup)
1✔
308
        updated.Spec = routegroup.Spec
1✔
309

1✔
310
        _, err = c.client.RouteGroupV1().RouteGroups(updated.Namespace).Update(ctx, updated, metav1.UpdateOptions{})
1✔
311
        if err != nil {
1✔
UNCOV
312
                return err
×
UNCOV
313
        }
×
314
        c.recorder.Eventf(
1✔
315
                stack,
1✔
316
                apiv1.EventTypeNormal,
1✔
317
                "UpdatedRouteGroup",
1✔
318
                "Updated RouteGroup %s",
1✔
319
                routegroup.Name)
1✔
320
        return nil
1✔
321
}
322

323
// ReconcileStackConfigMapRefs will update the named user-provided ConfigMaps to be
324
// attached to the Stack by ownerReferences, when a list of Configuration
325
// Resources are defined on the Stack template.
326
//
327
// The provided ConfigMap name must be prefixed by the Stack name.
328
// eg: Stack: myapp-v1 ConfigMap: myapp-v1-my-config
329
//
330
// User update of running versioned ConfigMaps is not encouraged but is allowed
331
// on consideration of emergency needs. Similarly, addition of ConfigMaps to
332
// running resources is also allowed, so the method checks for changes on the
333
// ConfigurationResources to ensure all listed ConfigMaps are properly linked
334
// to the Stack.
335
func (c *StackSetController) ReconcileStackConfigMapRefs(
336
        ctx context.Context,
337
        stack *zv1.Stack,
338
        updateObjMeta func(*metav1.ObjectMeta) *metav1.ObjectMeta,
339
) error {
1✔
340
        for _, rsc := range stack.Spec.ConfigurationResources {
2✔
341
                if !rsc.IsConfigMapRef() {
1✔
UNCOV
342
                        continue
×
343
                }
344

345
                if err := validateConfigurationResourceName(stack.Name, rsc.GetName()); err != nil {
2✔
346
                        return err
1✔
347
                }
1✔
348

349
                if err := c.ReconcileStackConfigMapRef(ctx, stack, rsc, updateObjMeta); err != nil {
1✔
UNCOV
350
                        return err
×
UNCOV
351
                }
×
352
        }
353

354
        return nil
1✔
355
}
356

357
func (c *StackSetController) ReconcileStackConfigMapRef(
358
        ctx context.Context,
359
        stack *zv1.Stack,
360
        rsc zv1.ConfigurationResourcesSpec,
361
        updateObjMeta func(*metav1.ObjectMeta) *metav1.ObjectMeta,
362
) error {
1✔
363
        configMap, err := c.client.CoreV1().ConfigMaps(stack.Namespace).
1✔
364
                Get(ctx, rsc.GetName(), metav1.GetOptions{})
1✔
365
        if err != nil {
1✔
UNCOV
366
                return err
×
UNCOV
367
        }
×
368

369
        // Check if the ConfigMap is already owned by us or another resource.
370
        isOwned, owner := isOwned(configMap.OwnerReferences)
1✔
371
        if isOwned {
2✔
372
                // If the ConfigMap is already owned by us, we don't need to do anything.
1✔
373
                if owner == stack.UID {
2✔
374
                        return nil
1✔
375
                }
1✔
376

377
                // If the ConfigMap is owned by another resource, we should not update it.
UNCOV
378
                return fmt.Errorf("ConfigMap already owned by other resource. "+
×
UNCOV
379
                        "ConfigMap: %s, Stack: %s", rsc.GetName(), stack.Name)
×
380
        }
381

382
        objectMeta := updateObjMeta(&configMap.ObjectMeta)
1✔
383
        configMap.ObjectMeta = *objectMeta
1✔
384

1✔
385
        _, err = c.client.CoreV1().ConfigMaps(configMap.Namespace).
1✔
386
                Update(ctx, configMap, metav1.UpdateOptions{})
1✔
387
        if err != nil {
1✔
UNCOV
388
                return err
×
UNCOV
389
        }
×
390

391
        c.recorder.Eventf(
1✔
392
                stack,
1✔
393
                apiv1.EventTypeNormal,
1✔
394
                "UpdatedConfigMap",
1✔
395
                "Updated ConfigMap %s",
1✔
396
                configMap.Name,
1✔
397
        )
1✔
398

1✔
399
        return nil
1✔
400
}
401

402
// ReconcileStackSecretRefs will update the named user-provided Secrets to be
403
// attached to the Stack by ownerReferences, when a list of Configuration
404
// Resources are defined on the Stack template.
405
//
406
// The provided Secret name must be prefixed by the Stack name.
407
// eg: Stack: myapp-v1 Secret: myapp-v1-my-secret
408
//
409
// User update of running versioned Secrets is not encouraged but is allowed
410
// on consideration of emergency needs. Similarly, addition of Secrets to
411
// running resources is also allowed, so the method checks for changes on the
412
// ConfigurationResources to ensure all listed Secrets are properly linked
413
// to the Stack.
414
func (c *StackSetController) ReconcileStackSecretRefs(
415
        ctx context.Context,
416
        stack *zv1.Stack,
417
        updateObjMeta func(*metav1.ObjectMeta) *metav1.ObjectMeta,
418
) error {
1✔
419
        for _, rsc := range stack.Spec.ConfigurationResources {
2✔
420
                if !rsc.IsSecretRef() {
2✔
421
                        continue
1✔
422
                }
423

424
                if err := validateConfigurationResourceName(stack.Name, rsc.GetName()); err != nil {
1✔
425
                        return err
×
426
                }
×
427

428
                if err := c.ReconcileStackSecretRef(ctx, stack, rsc, updateObjMeta); err != nil {
1✔
UNCOV
429
                        return err
×
UNCOV
430
                }
×
431
        }
432

433
        return nil
1✔
434
}
435

436
func (c *StackSetController) ReconcileStackSecretRef(ctx context.Context,
437
        stack *zv1.Stack,
438
        rsc zv1.ConfigurationResourcesSpec,
439
        updateObjMeta func(*metav1.ObjectMeta) *metav1.ObjectMeta,
440
) error {
1✔
441
        secret, err := c.client.CoreV1().Secrets(stack.Namespace).
1✔
442
                Get(ctx, rsc.GetName(), metav1.GetOptions{})
1✔
443
        if err != nil {
1✔
UNCOV
444
                return err
×
UNCOV
445
        }
×
446

447
        // Check if the Secret is already owned by us or another resource.
448
        isOwned, owner := isOwned(secret.OwnerReferences)
1✔
449
        if isOwned {
2✔
450
                // If the Secret is already owned by us, we don't need to do anything.
1✔
451
                if owner == stack.UID {
2✔
452
                        return nil
1✔
453
                }
1✔
454

455
                // If the Secret is owned by another resource, we should not update it.
UNCOV
456
                return fmt.Errorf("secret already owned by other resource. "+
×
UNCOV
457
                        "Secret: %s, Stack: %s", rsc.GetName(), stack.Name)
×
458
        }
459

460
        objectMeta := updateObjMeta(&secret.ObjectMeta)
1✔
461
        secret.ObjectMeta = *objectMeta
1✔
462

1✔
463
        _, err = c.client.CoreV1().Secrets(secret.Namespace).
1✔
464
                Update(ctx, secret, metav1.UpdateOptions{})
1✔
465
        if err != nil {
1✔
UNCOV
466
                return err
×
UNCOV
467
        }
×
468

469
        c.recorder.Eventf(
1✔
470
                stack,
1✔
471
                apiv1.EventTypeNormal,
1✔
472
                "UpdatedSecret",
1✔
473
                "Updated Secret %s",
1✔
474
                secret.Name,
1✔
475
        )
1✔
476

1✔
477
        return nil
1✔
478
}
479

480
func (c *StackSetController) ReconcileStackPlatformCredentialsSets(
481
        ctx context.Context,
482
        stack *zv1.Stack,
483
        existing []*zv1.PlatformCredentialsSet,
484
        generateUpdated func(*zv1.PCS) (*zv1.PlatformCredentialsSet, error),
485
) error {
1✔
486
        for _, rsc := range stack.Spec.ConfigurationResources {
2✔
487
                if !rsc.IsPlatformCredentialsSet() {
1✔
UNCOV
488
                        continue
×
489
                }
490

491
                if err := c.ReconcileStackPlatformCredentialsSet(
1✔
492
                        ctx, stack, rsc.PlatformCredentialsSet, existing, generateUpdated); err != nil {
1✔
UNCOV
493
                        return err
×
UNCOV
494
                }
×
495
        }
496
        return nil
1✔
497
}
498

499
func (c *StackSetController) ReconcileStackPlatformCredentialsSet(
500
        ctx context.Context,
501
        stack *zv1.Stack,
502
        rsc *zv1.PCS,
503
        existing []*zv1.PlatformCredentialsSet,
504
        generateUpdated func(*zv1.PCS) (*zv1.PlatformCredentialsSet, error),
505
) error {
1✔
506
        pcs, err := generateUpdated(rsc)
1✔
507
        if err != nil {
1✔
UNCOV
508
                return err
×
UNCOV
509
        }
×
510

511
        // Check if a PlatformCredentialsSet needs update
512
        for _, e := range existing {
2✔
513
                if pcs.Name != e.Name {
2✔
514
                        continue
1✔
515
                }
516

517
                if core.IsResourceUpToDate(stack, e.ObjectMeta) &&
1✔
518
                        equality.Semantic.DeepEqual(pcs.Spec, e.Spec) &&
1✔
519
                        core.AreAnnotationsUpToDate(pcs.ObjectMeta, e.ObjectMeta) {
1✔
UNCOV
520
                        return nil
×
UNCOV
521
                }
×
522

523
                updated := e.DeepCopy()
1✔
524
                syncObjectMeta(updated, pcs)
1✔
525
                updated.Spec = pcs.Spec
1✔
526

1✔
527
                _, err := c.client.ZalandoV1().PlatformCredentialsSets(updated.Namespace).
1✔
528
                        Update(ctx, updated, metav1.UpdateOptions{})
1✔
529
                if err != nil {
1✔
UNCOV
530
                        return err
×
UNCOV
531
                }
×
532
                c.recorder.Eventf(
1✔
533
                        stack,
1✔
534
                        apiv1.EventTypeNormal,
1✔
535
                        "UpdatedPlatformCredentialsSet",
1✔
536
                        "Updated PlatformCredentialsSet %s",
1✔
537
                        pcs.Name,
1✔
538
                )
1✔
539
                return nil
1✔
540
        }
541

542
        // Create new PlatformCredentialsSet
543
        _, err = c.client.ZalandoV1().PlatformCredentialsSets(pcs.Namespace).
1✔
544
                Create(ctx, pcs, metav1.CreateOptions{})
1✔
545
        if err != nil {
1✔
UNCOV
546
                return err
×
UNCOV
547
        }
×
548
        c.recorder.Eventf(
1✔
549
                stack,
1✔
550
                apiv1.EventTypeNormal,
1✔
551
                "CreatedPlatformCredentialsSet",
1✔
552
                "Created PlatformCredentialsSet %s",
1✔
553
                pcs.Name,
1✔
554
        )
1✔
555

1✔
556
        return nil
1✔
557
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc