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
Controller should set a proper field manager #84
Comments
@erikgb |
Accurate does not use server-side apply yet. It might be better to set an appropriate FieldManager, but not setting it is not a bug as we are not using SSA. |
Figured out that setting This is fixed in controller-runtime v0.16, so Accurate will set the field manager to I checked the current code and saw: $ kubectl -n sub1 get secrets -o yaml --show-managed-fields
apiVersion: v1
items:
- apiVersion: v1
data:
foo: YmFy
kind: Secret
metadata:
annotations:
accurate.cybozu.com/from: root1
accurate.cybozu.com/propagate: update
creationTimestamp: "2023-09-27T13:47:06Z"
labels:
app.kubernetes.io/created-by: accurate
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
.: {}
f:foo: {}
f:metadata:
f:annotations:
.: {}
f:accurate.cybozu.com/from: {}
f:accurate.cybozu.com/propagate: {}
f:labels:
.: {}
f:app.kubernetes.io/created-by: {}
f:type: {}
manager: accurate-controller
operation: Update
time: "2023-09-27T13:47:06Z" |
What
Using Server-Side Apply in Kubernetes requires that controllers set a non-dummy field manager. Below is an extract of a namespace created by the accurate controller in one of our clusters. As you can see, the field manager for fields set by accurate is marked with
Go-http-client
as the manager. This will cause issues if another controller does not set a non-default manager value. We also usemanagedFields
a lot when debugging issues in our clusters.Accurate controller should set a field manager value when creating/updating API resources. Suggested value
accurate
.How
Describe how to address the issue.
Checklist
The text was updated successfully, but these errors were encountered: