wennan.he
01/12/2023, 2:49 AMKathy Satterlee
01/12/2023, 4:49 PMlabels
table.
A manually managed label is one that is applied to the list of hosts you provide rather than applied dynamically based on a query. The first example in the docs section you linked is a dynamic label and will run that query on hosts periodically and apply the label to hosts that match the condition set in the query.
apiVersion: v1
kind: label
spec:
name: slack_not_running
query: >
SELECT * FROM system_info
WHERE NOT EXISTS (
SELECT *
FROM processes
WHERE name LIKE "%Slack%"
);
The second example is a manual label and will automatically be applied to the hosts listed:
apiVersion: v1
kind: label
spec:
name: Manually Managed Example
label_membership_type: manual
hosts:
- hostname1
- hostname2
- hostname3
The table that stores data about which hosts belong to which label is label_membership
.
You can add, modify and remove labels using the Fleet configuration or the REST APIwennan.he
01/12/2023, 8:46 PMKathy Satterlee
01/12/2023, 8:56 PMlabels
table. Membership is stored in label_membership
wennan.he
01/12/2023, 9:00 PMKathy Satterlee
01/12/2023, 9:01 PMfleetctl