Skip to content
GitLab
Next
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GitLab Operator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GitLab.org
OpenShift
GitLab Operator
Commits
ef6a2ba4
Commit
ef6a2ba4
authored
Sep 14, 2020
by
Edmund Ochieng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'autoscale_bug' into 'master'
handle nil HPA pointer exception See merge request
!19
parents
dcbdece5
a7a96db3
Pipeline
#189770628
passed with stages
in 10 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
controllers/gitlab_controller.go
controllers/gitlab_controller.go
+5
-0
No files found.
controllers/gitlab_controller.go
View file @
ef6a2ba4
...
...
@@ -652,6 +652,11 @@ func (r *GitLabReconciler) reconcileHPA(ctx context.Context, deployment *appsv1.
err
:=
r
.
Get
(
ctx
,
types
.
NamespacedName
{
Name
:
deployment
.
Name
,
Namespace
:
cr
.
Namespace
},
found
)
if
err
!=
nil
{
if
errors
.
IsNotFound
(
err
)
{
// return nil if hpa is nil
if
hpa
==
nil
{
return
nil
}
if
err
:=
controllerutil
.
SetControllerReference
(
cr
,
hpa
,
r
.
Scheme
);
err
!=
nil
{
return
err
}
...
...
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