Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
c264018a
Unverified
Commit
c264018a
authored
Aug 06, 2025
by
mohammedabdulwahhab
Committed by
GitHub
Aug 06, 2025
Browse files
fix: nil pointer deref in dynamo controller (#2333)
parent
6a1a801c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
deploy/cloud/operator/internal/dynamo/graph.go
deploy/cloud/operator/internal/dynamo/graph.go
+8
-4
No files found.
deploy/cloud/operator/internal/dynamo/graph.go
View file @
c264018a
...
@@ -166,12 +166,16 @@ func GenerateDynamoComponentsDeployments(ctx context.Context, parentDynamoGraphD
...
@@ -166,12 +166,16 @@ func GenerateDynamoComponentsDeployments(ctx context.Context, parentDynamoGraphD
labels
[
commonconsts
.
KubeLabelDynamoComponent
]
=
componentName
labels
[
commonconsts
.
KubeLabelDynamoComponent
]
=
componentName
labels
[
commonconsts
.
KubeLabelDynamoNamespace
]
=
dynamoNamespace
labels
[
commonconsts
.
KubeLabelDynamoNamespace
]
=
dynamoNamespace
if
component
.
ComponentType
==
commonconsts
.
ComponentTypePlanner
{
if
component
.
ComponentType
==
commonconsts
.
ComponentTypePlanner
{
// ensure that the extraPodSpec is not nil
if
deployment
.
Spec
.
ExtraPodSpec
==
nil
{
if
deployment
.
Spec
.
ExtraPodSpec
==
nil
{
deployment
.
Spec
.
ExtraPodSpec
=
&
common
.
ExtraPodSpec
{
deployment
.
Spec
.
ExtraPodSpec
=
&
common
.
ExtraPodSpec
{}
PodSpec
:
&
corev1
.
PodSpec
{},
}
}
// ensure that the embedded PodSpec struct is not nil
if
deployment
.
Spec
.
ExtraPodSpec
.
PodSpec
==
nil
{
deployment
.
Spec
.
ExtraPodSpec
.
PodSpec
=
&
corev1
.
PodSpec
{}
}
}
deployment
.
Spec
.
ExtraPodSpec
.
ServiceAccountName
=
commonconsts
.
PlannerServiceAccountName
// finally set the service account name
deployment
.
Spec
.
ExtraPodSpec
.
PodSpec
.
ServiceAccountName
=
commonconsts
.
PlannerServiceAccountName
}
}
if
deployment
.
IsMainComponent
()
&&
defaultIngressSpec
!=
nil
&&
deployment
.
Spec
.
Ingress
==
nil
{
if
deployment
.
IsMainComponent
()
&&
defaultIngressSpec
!=
nil
&&
deployment
.
Spec
.
Ingress
==
nil
{
deployment
.
Spec
.
Ingress
=
defaultIngressSpec
deployment
.
Spec
.
Ingress
=
defaultIngressSpec
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment