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: NEW
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Vikram Goyal
QA Contact: Xiaoli Tian
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-30 04:18 UTC by Brendan Shirren
Modified: 2019-07-30 04:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


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.