File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import (
29
29
"k8s.io/apimachinery/pkg/fields"
30
30
"k8s.io/apimachinery/pkg/runtime"
31
31
"k8s.io/apimachinery/pkg/types"
32
+ "k8s.io/apimachinery/pkg/util/uuid"
32
33
ref "k8s.io/client-go/tools/reference"
33
34
ctrl "sigs.k8s.io/controller-runtime"
34
35
"sigs.k8s.io/controller-runtime/pkg/builder"
@@ -365,8 +366,14 @@ func (r EnvironmentRequestReconciler) environmentProviderJob(ctx context.Context
365
366
return nil , err
366
367
}
367
368
369
+ identifier := environmentrequest .Spec .Identifier
370
+ if identifier == "" {
371
+ identifier = string (uuid .NewUUID ())
372
+ }
373
+ environmentrequest .Labels ["etos.eiffel-community.github.io/id" ] = identifier
374
+
368
375
labels := map [string ]string {
369
- "etos.eiffel-community.github.io/id" : environmentrequest . Spec . Identifier , // TODO: omitempty
376
+ "etos.eiffel-community.github.io/id" : identifier ,
370
377
"app.kubernetes.io/name" : "environment-provider" ,
371
378
"app.kubernetes.io/part-of" : "etos" ,
372
379
}
You can’t perform that action at this time.
0 commit comments