-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
spec: | ||
message: DNS issues, troubleshooting in progress | ||
author: | ||
type: user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no documentation on what are the possible types. And perhaps a little bit related, what do we use this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was suggested in the RFC, and I think it opens an opportunity for an automated rollout block, maybe...
It might be redundant, I'm not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm of the opinion that until we need and actually do something useful with it, we should keep it out. @parhamdoustdar @icanhazbroccoli can you guys weigh in on this?
} | ||
|
||
existingRBs := rolloutblock.NewOverrideFromRolloutBlocks(append(nsRBs, gbRBs...)) | ||
obsoleteRbs := relOverrideRBs.Diff(existingRBs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit looks very similar to what happens in the application controller. Maybe we should DRY it up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried, it did not go well. It is very similar, but removing the duplications removed only 4 lines and introduces ambiguity...
8080bd6
to
812226d
Compare
8a7fa52
to
6f52f9e
Compare
n, ok := rbsPerNamespace[ns.Name] | ||
if !ok { | ||
n = 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: not needed: you can rely on golang map zero-value return, in this case it's going to be 0.0
|
||
rbsPerNamespace := make(map[string]float64) | ||
for _, rolloutBlock := range rolloutBlocks { | ||
rbsPerNamespace[rolloutBlock.Namespace]++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: if I understand correctly, float64 is chosen because prometheus gauge wants it. In the other hand, the semantics of this value is a counter, which means an integer-like value is more natural for operations like ++. See https://stackoverflow.com/questions/8561393/is-using-increment-operator-on-floats-bad-style for more details. As I said, this is a matter of polishing the semantics of this method, so, not a blocker to me.
pkg/client/clientset/versioned/typed/shipper/v1alpha1/fake/fake_rolloutblock.go
Show resolved
Hide resolved
pkg/client/clientset/versioned/typed/shipper/v1alpha1/fake/fake_rolloutblock.go
Show resolved
Hide resolved
dcd337b
to
b3778e7
Compare
e938a5c
to
b652098
Compare
create global rolloutblock namespace create rolloutblock override annotation create application condition type for rollout blocks add rollout block override annotation to application object blocking rollout or overriding according to rbs and annotations add rollout block related errors
update rolloutblock object status according to overriding applications and releases add tests for rollout block status
…nd statuses add rollout block override annotation to release object add validating path add validation for application and release annotations add validation for rolloutblock logic collect rollout block in prometheus give an example for a local rolloutblock in docs rename application rollout blocked condition to fit conventions add missing codegen files rate limiting the release objects that on update are unchanged (#127) update rolloutblock object if a release has added it to override annotation, or removed it from override annotation renaming Application condition blocked by rollout block make rolloutblock errors broadcast in webhook
15f1022
to
7fedd38
Compare
This introduces RolloutBlocks as a CRD in shipper.
Blocking rollouts locally or globally is possible using a RolloutBlock object in the relevant namespace.
Closes #1