-
Notifications
You must be signed in to change notification settings - Fork 198
Issue #517: PetSet and DaemonSet support #620
Issue #517: PetSet and DaemonSet support #620
Conversation
|
Thanks, will have a look ASAP. |
rhuss
left a comment
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.
Except for some minor things, looks good to me.
Could you please fix that and update the PR ?
Thanks a lot !
|
|
||
| private ObjectMeta createPetSetMetaData(ResourceConfig config) { | ||
| return new ObjectMetaBuilder() | ||
| .withName(KubernetesHelper.validateKubernetesId(config.getReplicaSetName(), "replica set name")) |
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.
wdyt, maybe we should rename replicaSetName to controllerName ?
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.
Good idea, I've added that to this PR.
| probe.setTimeoutSeconds(timeoutSeconds); | ||
| } | ||
| HTTPGetAction getAction = getHTTPGetAction(probeConfig.getGetUrl()); | ||
| if(StringUtils.isEmpty(getAction.getHost())) { |
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 check can lead to a NPE since getAction can be null. Could explain briefly why an empty String as host is an issue ?
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 a bit of a hack to allow an empty HTTP host to be set in the liveness/readiness checks. Without this minor change an empty host value would result in a literal empty host value being added to the output YAML. For now I've just removed this, as it should have been a part of issue #622.
|
|
||
| @Override | ||
| protected Kind getKind() { | ||
| return Kind.DAEMON_SET; |
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.
Shouldn't this be Kind.PET_SET ?
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.
Indeed it should be, fixed.
|
Any news on this one? :-) |
rhuss
left a comment
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.
Thanks a lot and sorry for the long delay. There is only one minor issue, if this is fixed we can merge it into master.
| @Override | ||
| public void visit(PetSetSpecBuilder item) { | ||
| Map<String, String> selectorMatchLabels = | ||
| KubernetesResourceUtil.removeVersionSelector(enricherManager.extractSelector(getConfig(), Kind.REPLICATION_CONTROLLER)); |
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.
Should be Kind.PET_SET
| @Override | ||
| public void visit(DaemonSetSpecBuilder item) { | ||
| Map<String, String> selectorMatchLabels = | ||
| KubernetesResourceUtil.removeVersionSelector(enricherManager.extractSelector(getConfig(), Kind.REPLICATION_CONTROLLER)); |
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.
shoud be Kind.DAEMON_SET (btw, there is an error for the Deployment selector, I will fix that.
|
If you don't mind I would fix the outstanding issues and integrate this PR next week. |
|
I'd like to see this one merged, to update the cassandra quickstart with a PetSet configuration :-) |
|
@oscerd back right now, will go through the PRs here soon. Happy new year ;-) ! |
|
@rhuss happy new year! :-) Thanks for your work! :-) |
|
Sorry for the delay, this has been updated now. |
fixed up changed method names
…host field for probe check to leave the host field out of the check as per Kubernetes documentation
9262620 to
3ec77b6
Compare
Codecov Report@@ Coverage Diff @@
## master #620 +/- ##
============================================
- Coverage 17.02% 16.24% -0.78%
+ Complexity 431 403 -28
============================================
Files 150 148 -2
Lines 8102 8102
Branches 1478 1468 -10
============================================
- Hits 1379 1316 -63
- Misses 6565 6633 +68
+ Partials 158 153 -5Continue to review full report at Codecov.
|
|
I would love to see this one merged. |
|
will check that this later today or tomorrow, will merge it this week. |
|
though |
|
Right, should be changed to |
|
We could support |
|
FWIW this PR will bring in the StatefulSet rename fabric8io/kubernetes-client#646, once we're happy with that I was going to upgrade fabric8 and then fabric8-maven-plugin asap. |
|
@rawlingsj thanks a lot for StatefulSet, I'm going to rename it in this PR. Is the kubernetes-client already released with this addition ? |
no problem! yes if you rebase this PR then you should get the new fabric8 version which includes the updated kubernetes client and model with StatefulSet. |
|
Hmm. I see still fabric8 2.2.193 as the latest referring to kubernetes-client 2.0.0 (but 2.0.2 is the latest which contains the changes). |
|
Let me debug that a bit here, looks a bit weird ... (using a kubernetes client 1.4.33 and so). Probably my fault. |
|
ok, got it now properly. all good :) |
|
Looks like there's been a couple more releases but 2.0.0 was the one that I did which includes the statefulset rename. So hopefully you should be good. |
ah cool :) |
|
I updated from Changes look good to me. Some tests would have been nice but due to the fact that we don't have tests for the other handlers, too, its not fair to call for one here now ;-) |
|
[merge] |
I've had some time to work on issue #517, adding support for generating PetSet and DaemonSet configurations using the fabric8-maven-plugin. I'll have a go at updating the documentation as well, to reflect some of these changes.
For now I've been using it by configuring the
fmp-controllerenricher to generate the PetSet and DaemonSet types.The following snippet of code seems to work for my needs.