resource.customizations.ignoreDifferences doesn't save configuration
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
Research direction
No file, test, or code entry point is named; begin by tracing how resourceIgnoreDifferences is serialized into resource.customizations.ignoreDifferences and how the resulting Argo CD customization is consumed. Done means managedFieldManagers are preserved and the ConfigMap reports in sync for the shown configurations.
Written by the indexing model from the issue text.
Description
Describe the bug
I have an argocd application that contains a following configmap:
kind: ConfigMap
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"v1","data":{},"kind":"ConfigMap","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"kubecost","config.openshift.io/inject-trusted-cabundle":"true"},"name":"ca-inject","namespace":"kubecost"}}
creationTimestamp: '2023-12-16T02:24:01Z'
labels:
app.kubernetes.io/instance: kubecost
config.openshift.io/inject-trusted-cabundle: 'true'
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
'f:data':
'f:ca-bundle.crt': {}
manager: cluster-network-operator/configmap_ca
operation: Apply
time: '2023-12-16T02:24:01Z'
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:annotations':
.: {}
'f:kubectl.kubernetes.io/last-applied-configuration': {}
'f:labels':
.: {}
'f:app.kubernetes.io/instance': {}
'f:config.openshift.io/inject-trusted-cabundle': {}
manager: argocd-controller
operation: Update
time: '2023-12-16T02:24:01Z'
name: ca-inject
namespace: kubecost
resourceVersion: '351766'
uid: 0955b2d6-daf1-4544-b392-926fc14b960b
As you can see cluster-network-operator/configmap_ca is managing that data field and inject openshift ca-bundle content there. Since that field is different from desired it is always out of sync. I tried to add a configuration to my ArgoCD CDR instance in these ways, but that configmap still out of sync. Also I've spotted that ArgoCD doesn't save a piece of the configuration:
# input:
resourceIgnoreDifferences:
all:
managedFieldsManagers:
- cluster-network-operator/configmap_ca
- cluster-network-operator
- configmap_ca
# saved
resourceIgnoreDifferences:
all:
managedFieldsManagers:
- cluster-network-operator/configmap_ca
- cluster-network-operator
- configmap_ca
# in configmap
resource.customizations.ignoreDifferences.all: |
jqpathexpressions: []
jsonpointers: []
managedfieldsmanagers:
- cluster-network-operator/configmap_ca
- cluster-network-operator
- configmap_ca
# input
resourceIgnoreDifferences:
resourceIdentifiers:
- group: ''
kind: configmaps
customization:
managedFieldManagers:
- cluster-network-operator/configmap_ca
- cluster-network-operator
- configmap_ca
# saved
resourceIgnoreDifferences:
resourceIdentifiers:
- customization: {}
group: ''
kind: configmaps
# configmap
resource.customizations.ignoreDifferences.configmaps: |
jqpathexpressions: []
jsonpointers: []
managedfieldsmanagers: []
# input
resourceIgnoreDifferences:
resourceIdentifiers:
- group: ''
kind: configmaps
customization:
jsonpointers:
- /data
managedFieldManagers:
- cluster-network-operator/configmap_ca
- cluster-network-operator
- configmap_ca
# saved
resourceIgnoreDifferences:
resourceIdentifiers:
- customization:
jsonPointers:
- /data
group: ''
kind: configmaps
# configmap
resource.customizations.ignoreDifferences.configmaps: |
jqpathexpressions: []
jsonpointers:
- /data
managedfieldsmanagers: []
# input
resourceIgnoreDifferences:
resourceIdentifiers:
- group: ''
kind: configmaps
customization:
jqPathExpressions:
- .data
managedFieldManagers:
- cluster-network-operator/configmap_ca
- cluster-network-operator
- configmap_ca
# saved
resourceIgnoreDifferences:
resourceIdentifiers:
- customization:
jqPathExpressions:
- .data
group: ''
kind: configmaps
# configmap
resource.customizations.ignoreDifferences.configmaps: |
jqpathexpressions:
- .data
jsonpointers: []
managedfieldsmanagers: []
Expected behavior
Configmap is in sync
- Dominant language
- Go
- Stars
- 188
- Forks
- 359
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 21
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from redhat-developer/gitops-operator
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
redhat-developer/gitops-operator#1287 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
redhat-developer/gitops-operator#1311 ·
Maintainers usually reply within 1 day
-
Harden OpenShift manual-install SCC troubleshooting guidancePossibly taken @olivergondza claimed this 11 days ago. Open
redhat-developer/gitops-operator#1295 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
redhat-developer/gitops-operator#1139 ·
Maintainers usually reply within 1 day
-
triage:required
Difficulty 4/5 3-5 days Newbie friendliness 48/100
redhat-developer/gitops-operator#572 · 2 comments ·
Maintainers usually reply within 1 day
All issues in redhat-developer/gitops-operator
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
volodya-lombrozo/aidy#333 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
rossoctl/context-guru#314 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
OwO-Network/DLX#236 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100