Bug 1734241 - oc patch command to modify the daemonset nodeSelector adds extra label
Summary: oc patch command to modify the daemonset nodeSelector adds extra label
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.11.z
Assignee: Latha S
QA Contact: Anping Li
Latha S
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-30 04:18 UTC by Brendan Shirren
Modified: 2022-08-08 07:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-08 07:44:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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"}}}}}'


Note You need to log in before you can comment on or make changes to this bug.