Skip to content
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

Annotation not working argocd.argoproj.io/sync-options: Force=true,Replace=true #18245

Open
3 tasks done
ybucci opened this issue May 16, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@ybucci
Copy link

ybucci commented May 16, 2024

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

I Using the latest version ArgoCD 2.11, but the annotation not working

error when replacing "/dev/shm/2809239019": EC2NodeClass.karpenter.k8s.aws "aws-node-template" is invalid: spec.role: Invalid value: "string": immutable field changed

apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
metadata:
  annotations:
    argocd.argoproj.io/sync-options: Force=true,Replace=true
  name: aws-node-template
spec:
  amiFamily: Bottlerocket
  blockDeviceMappings:
  - deviceName: /dev/xvda
    ebs:
      deleteOnTermination: true
      encrypted: true
      volumeSize: 4Gi
      volumeType: gp3
  - deviceName: /dev/xvdb
    ebs:
      deleteOnTermination: true
      encrypted: true
      volumeSize: 120Gi
      volumeType: gp3
  metadataOptions:
    httpEndpoint: enabled
    httpProtocolIPv6: disabled
    httpPutResponseHopLimit: 2
    httpTokens: required
  role: XXXXXXXX
  securityGroupSelectorTerms:
  - tags:
      karpenter.sh/discovery: XXXXXXXX
  subnetSelectorTerms:
  - tags:
      Name: '*private*'
  tags:
    karpenter.sh/discovery: XXXXXXXX
{{- if and .Values.karpenterTemplates .Values.karpenterTemplates.enable -}}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: karpenter-templates
  namespace: {{ .Values.argoNamespace | default "argocd" }}
  annotations:
    argocd.argoproj.io/sync-wave: "{{ .Values.karpenterTemplates.syncWave | default '0' }}"
  labels:
    app: "karpenter-templates"
    env: "{{ .Values.environment }}"
    clusterName: "{{ .Values.clusterName }}"
spec:
  project: {{ .Values.argoProject | default "default" }}
  source:
    repoURL: {{ .Values.repoUrl }}
    path: 05-helm/karpenter-templates
    targetRevision: {{ .Values.targetRevision }}
    helm:
      values: |-
{{- toYaml .Values.karpenterTemplates | nindent 8 }}
  destination:
    server: {{ .Values.destinationServer | default "https://kubernetes.default.svc" }}
    namespace: {{ .Values.karpenterTemplates.namespace }}
  syncPolicy:
    automated:
      prune: true
      selfHeal: true 
    syncOptions:
#      - Replace=true
      - CreateNamespace=true
      # - ApplyOutOfSyncOnly=true
      # - ServerSideApply=true
      # - Force=true
    retry:
      limit: 10
      backoff:
        duration: 5s
        factor: 2
        maxDuration: 1m
{{- end -}}

To Reproduce

Expected behavior

Screenshots

Version

Paste the output from `argocd version` here.

Logs

Paste any relevant application logs here.
@ybucci ybucci added the bug Something isn't working label May 16, 2024
@ChristianCiach
Copy link
Contributor

The commit dd4ee83 didn't make it into v2.11.0. You will have to wait for v2.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants