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"
@@ -356,8 +357,14 @@ func (r EnvironmentRequestReconciler) environmentProviderJob(ctx context.Context
356
357
return nil , err
357
358
}
358
359
360
+ identifier := environmentrequest .Spec .Identifier
361
+ if identifier == "" {
362
+ identifier = string (uuid .NewUUID ())
363
+ }
364
+ environmentrequest .Labels ["etos.eiffel-community.github.io/id" ] = identifier
365
+
359
366
labels := map [string ]string {
360
- "etos.eiffel-community.github.io/id" : environmentrequest . Spec . Identifier , // TODO: omitempty
367
+ "etos.eiffel-community.github.io/id" : identifier ,
361
368
"app.kubernetes.io/name" : "environment-provider" ,
362
369
"app.kubernetes.io/part-of" : "etos" ,
363
370
}
You can’t perform that action at this time.
0 commit comments