-
Notifications
You must be signed in to change notification settings - Fork 25
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
[Feature] Ability to set annotations for checker job #20
Comments
You can use
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: milvus-operator
includeCRDs: true
valuesInline:
image:
repository: milvusdb/milvus-operator
pullPolicy: IfNotPresent
tag: "v0.8.1"
# {...}
# The rest of your values here
releaseName: milvus-operator
version: 0.8.1
repo: https://zilliztech.github.io/milvus-operator/
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./base
patchesJson6902:
- target:
group: batch
version: v1
kind: Job
name: milvus-operator-checker
patch: |-
- op: add
path: /metadata/annotations/argocd.argoproj.io~1hook
value: PostSync
- op: add
path: /metadata/annotations/argocd.argoproj.io~1hook-delete-policy
value: BeforeHookCreation
- op: remove
path: /spec/ttlSecondsAfterFinished
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: milvus-operator
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
source:
repoURL: 'https://github.com/{your git}'
path: {your base kustomize.yaml path}
targetRevision: main
destination:
namespace: milvus-operator
name: in-cluster
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=false
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- Prune=true
- ServerSideApply=true
retry:
limit: 5
backoff:
duration: 20s
factor: 2
maxDuration: 15m I did a similar setup here and here. How it'd look like at the end: app/
├── base/
│ └── kustomization.yaml # Helm chart settings
├── kustomization.yaml # Merges all the things
└── app.yaml # ArgoCD app specs Just make sure you've enabled Helm support in ArgoCD by setting --enable-helm to true. This ensures that ArgoCD understands the Helm-related directives in your Kustomization. |
Or we can add a value in helm chart, would you like to make a PR? |
Currently it does not seem possible to set annotations on just the checker job. I need this in order to add some annotations used by ArgoCD.
Without being able to set these annotations, ArgoCD views the job as "missing" once the has completed and the
ttlSecondsAfterFinished
has expired. It then re-creates the job, resulting in new jobs being run every few minutes.The text was updated successfully, but these errors were encountered: