Closed r0bobo closed 4 months ago
Any updates on this?
seLinuxMount
is in the spec since kubernetes v1.25!
see:
Hi, have similar issue, but with Jobs "error building typed results: error creating typedLive: errors: .spec.podReplacementPolicy: field not declared in schema." JobPodReplacementPolicy featuregate now in beta and enabled by default. eks 1.29 + argo v2.10.0+2175939
I'm also currently hitting this with Kyverno latest chart and multiple fields, the only way to make the chart compute without having Failed to compare desired state to live state: failed to calculate diff: error calculating structured merge diff: error building typed value from live resource: XYZ: field not declared in schema
is to ignore them like so.
ignoreDifferences:
- group: kyverno.io
kind: ClusterPolicy
jqPathExpressions:
- .status.validatingadmissionpolicy
- .status.autogen
- '.spec.rules[].skipBackgroundRequests'
- .spec.admission
Hello @wpi86 I have the same issue here, What did you do regarding your error "errors: .spec.podReplacementPolicy: field not declared in schema"?
Hi, have similar issue, but with Jobs "error building typed results: error creating typedLive: errors: .spec.podReplacementPolicy: field not declared in schema." JobPodReplacementPolicy featuregate now in beta and enabled by default. eks 1.29 + argo v2.10.0+2175939
Hello @wpi86 I have the same issue here, What did you do regarding your error "errors: .spec.podReplacementPolicy: field not declared in schema"?
Hi, have similar issue, but with Jobs "error building typed results: error creating typedLive: errors: .spec.podReplacementPolicy: field not declared in schema." JobPodReplacementPolicy featuregate now in beta and enabled by default. eks 1.29 + argo v2.10.0+2175939
Hi, currently we keep our jobs as argo hooks, in this case argo doesn't try to validate them on sync and it works
think i got a similar issue with the latest gatekeeper release i got this error even the field is in the scheme k8s 1.28+
helm:
kind: ValidatingWebhookConfiguration
{{- if ge (int .Capabilities.KubeVersion.Minor) 28 }}
matchConditions: {{ toYaml .Values.validatingWebhookMatchConditions | nindent 4 }}
{{- end }}
Failed to compare desired state to live state: failed to perform pre-diff normalization: error building typed results: error creating typedConfig: .webhooks[name="validation.gatekeeper.sh"].matchConditions: field not declared in schema
eks 1.28 argo v2.10.1+a79e0ea
update could fix it by removing
resource.customizations.ignoreDifferences.all: |
managedFieldsManagers:
- kube-controller-manager
from my argocd configmap
I also have a problem with a simple job that breaks the complete deployment.
Sync operation to 3a93a6cc5f459e30b53659ffcd0b8fc9e5df2acb failed: ComparisonError: Failed to compare desired state to live state: failed to perform pre-diff normalization: error building typed results: error creating typedLive: errors:
.spec.podReplacementPolicy: field not declared in schema
.status.terminating: field not declared in schema
I tried to fix it with
ignoreDifferences:
- kind: Job
jqPathExpressions:
- .spec.podReplacementPolicy
- .status.terminating
without success.
Any idea?
I also have a problem with a simple job that breaks the complete deployment.
Sync operation to 3a93a6cc5f459e30b53659ffcd0b8fc9e5df2acb failed: ComparisonError: Failed to compare desired state to live state: failed to perform pre-diff normalization: error building typed results: error creating typedLive: errors: .spec.podReplacementPolicy: field not declared in schema .status.terminating: field not declared in schema
I tried to fix it with
ignoreDifferences: - kind: Job jqPathExpressions: - .spec.podReplacementPolicy - .status.terminating
without success.
Any idea?
Argo has released a new version that knows this field, the update solved our problem
@wpi86 thank you, but updating argocd to v2.12.0-rc1 for me does not solve the problem with the job, maybe it's additionally due to using server-side-apply (https://github.com/argoproj/argo-cd/issues/17358)
Failed to compare desired state to live state: failed to calculate diff: error calculating structured merge diff: error building typed value from live resource: .spec.podReplacementPolicy: field not declared in schema
The only difference I notice is ignoring field managers in argocd-cm produces 2 errors (spec.podReplacementPolicy
, status.terminating
):
Failed to compare desired state to live state: failed to perform pre-diff normalization: error building typed results: error creating typedLive: errors: .status.terminating: field not declared in schema .spec.podReplacementPolicy: field not declared in schema
Removing the filed managers ignore rules from argocd-cd produces 1 error (podReplacementPolicy
):
Failed to compare desired state to live state: failed to calculate diff: error calculating structured merge diff: error building typed value from live resource: .spec.podReplacementPolicy: field not declared in schema
I'm having the same problem with other fields. Another workaround is to disable validation completely in the sync policy.
syncOptions:
- Validate=false
I've updated the static schema to 0.29. Please try Argo CD 2.12.0-rc3. https://github.com/argoproj/gitops-engine/pull/588
I've had two cases of sync errors in ArgoCD:
For
CSIDriver
:For
Pod
with native sidecar containers and the field.spec.initContainers.restartPolicy
:After digging around in the code I think the problem might be that the static inlined schema here is outdated and is missing those fields.
Here is a related ArgoCD issue for the
CSIDriver
problem.Kubernetes version: v1.28.4 with the
SidecarContainers
feature gate enabled ArgoCD version: v2.9.3