Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NETOBSERV-90: enable deployment as Daemonset #29

Merged
merged 1 commit into from
Nov 26, 2021
Merged

NETOBSERV-90: enable deployment as Daemonset #29

merged 1 commit into from
Nov 26, 2021

Conversation

mariomac
Copy link
Contributor

  • Adding a HostPort to the container specification in the DaemonSet
  • Setting the proper RBAC permissions
  • Enable the deployment in the master node

Copy link
Contributor

@OlivierCazade OlivierCazade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, my only comment is more a question than a comment

@@ -172,7 +173,6 @@ func (r *FlowCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error {
Owns(&corev1.ConfigMap{}).
Owns(&appsv1.Deployment{}).
Owns(&appsv1.DaemonSet{}).
Owns(&corev1.Service{}).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is duplicated 2 lines below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jotak
Copy link
Member

jotak commented Nov 26, 2021

/lgtm thanks Mario

Comment on lines 79 to 83
func buildPodTemplate(desired *flowsv1alpha1.FlowCollectorGoflowKube, forDaemonSet bool) corev1.PodTemplateSpec {
cmd := buildMainCommand(desired)
return &corev1.PodTemplateSpec{
var ports []corev1.ContainerPort
var tolerations []corev1.Toleration
if forDaemonSet {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we use desired.Kind == constants.DaemonSetKind here instead of an additionnal parameter ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Changing

- Adding a HostPort to the container specification in the DaemonSet
- Setting the proper RBAC permissions
- Enable the deployment in the master node
@openshift-ci openshift-ci bot removed the approved label Nov 26, 2021
Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci openshift-ci bot added the lgtm label Nov 26, 2021
@mariomac mariomac added approved no-qe This PR doesn't necessitate QE approval labels Nov 26, 2021
@openshift-ci
Copy link

openshift-ci bot commented Nov 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 96979c8 into netobserv:main Nov 26, 2021
@mariomac mariomac deleted the daemonset branch November 26, 2021 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm no-qe This PR doesn't necessitate QE approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants