Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
17ddb19a
Commit
17ddb19a
authored
Aug 16, 2016
by
Matt Liggett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TODO comment.
parent
2bc5414d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
disruption.go
pkg/controller/disruption/disruption.go
+4
-0
No files found.
pkg/controller/disruption/disruption.go
View file @
17ddb19a
...
@@ -462,6 +462,10 @@ func (dc *DisruptionController) trySync(pdb *policy.PodDisruptionBudget) error {
...
@@ -462,6 +462,10 @@ func (dc *DisruptionController) trySync(pdb *policy.PodDisruptionBudget) error {
func
(
dc
*
DisruptionController
)
getExpectedPodCount
(
pdb
*
policy
.
PodDisruptionBudget
,
pods
[]
*
api
.
Pod
)
(
expectedCount
,
desiredHealthy
int32
,
err
error
)
{
func
(
dc
*
DisruptionController
)
getExpectedPodCount
(
pdb
*
policy
.
PodDisruptionBudget
,
pods
[]
*
api
.
Pod
)
(
expectedCount
,
desiredHealthy
int32
,
err
error
)
{
err
=
nil
err
=
nil
// TODO(davidopp): consider making the way expectedCount and rules about
// permitted controller configurations (specifically, considering it an error
// if a pod covered by a PDB has 0 controllers or > 1 controller) should be
// handled the same way for integer and percentage minAvailable
if
pdb
.
Spec
.
MinAvailable
.
Type
==
intstr
.
Int
{
if
pdb
.
Spec
.
MinAvailable
.
Type
==
intstr
.
Int
{
desiredHealthy
=
pdb
.
Spec
.
MinAvailable
.
IntVal
desiredHealthy
=
pdb
.
Spec
.
MinAvailable
.
IntVal
expectedCount
=
int32
(
len
(
pods
))
expectedCount
=
int32
(
len
(
pods
))
...
...
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