Bug 1734241

Summary: oc patch command to modify the daemonset nodeSelector adds extra label
Product: OpenShift Container Platform Reporter: Brendan Shirren <bshirren>
Component: DocumentationAssignee: Latha S <lmurthy>
Status: CLOSED WONTFIX QA Contact: Anping Li <anli>
Severity: low Docs Contact: Latha S <lmurthy>
Priority: low    
Version: 3.11.0CC: aos-bugs, cbremble, lmurthy
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-08 07:44:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brendan Shirren 2019-07-30 04:18:05 UTC
Document URL: https://docs.openshift.com/container-platform/3.11/install_config/aggregate_logging.html#aggregated-fluentd

Section Number and Name: Throttling logs in Fluentd

Describe the issue:

The "oc patch" instructions add another nodeSelector label "nonexistlabel=true" instead of overwriting existing nodeSelector label "logging-infra-fluentd=true".

Use the oc patch command to modify the daemonset nodeSelector:

$ oc patch ds logging-fluentd -p '{"spec":{"template":{"spec":{"nodeSelector":{"nonexistlabel":"true"}}}}}'


Suggestions for improvement: 

Use the oc patch command to modify the daemonset nodeSelector:

$ oc patch --type=merge ds logging-fluentd -p '{"spec":{"template":{"spec":{"nodeSelector":{"nonexistlabel":"true"}}}}}'


--type=merge should replace existing nodeSelector label with new one??


Additional information: 

DaemonSet fails to redeploy to nodes (due to "nonexistlabel" label in nodeSelector not matching any nodes) at the last instruction:

Use the oc patch command to modify the daemonset nodeSelector:

oc patch ds logging-fluentd -p '{"spec":{"template":{"spec":{"nodeSelector":{"logging-infra-fluentd":"true"}}}}}'