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

Use latest tag for cronjob #23

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions argocd/app/app-spamooor.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
# Source https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/application.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: spamooor
namespace: argocd
spec:
project: default
destination:
server: https://kubernetes.default.svc
namespace: spamooor-cronjobs
source:
repoURL: https://github.com/astriaorg/spamooor.git
targetRevision: helm-chart
targetRevision: master
path: charts/spamooor-cronjobs
helm:
valueFiles:
- values.yaml
- values.yaml
# parameters: # Paramters to override default values in values.yaml
# - name: jobs.erctxsjob.image.tag
# value: latest
# - name: jobs.eoatxsjob.image.tag
# value: latest
# - name: jobs.univ2txsjob.image.tag
# value: latest
# - name: jobs.gasburnertxsjob.image.tag
# value: latest
syncPolicy:
automated:
prune: true
allowEmpty: true
syncOptions:
- CreateNamespace=true
managedNamespaceMetadata:
labels:
argocd.argoproj.io/instance: spamooor
annotations:
argocd.argoproj.io/tracking-id: spamooor/Namespace:spamooor-cronjobs
43 changes: 25 additions & 18 deletions argocd/appset/spamooor-applicationset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: pr-spamooor
name: spamooor-preview
namespace: argocd
spec:
goTemplate: true
Expand Down Expand Up @@ -32,27 +32,34 @@ spec:
requeueAfterSeconds: 60
template:
metadata:
name: pr-{{.number}}-spamooor
name: spamooor-pr-{{.number}}
spec:
destination:
server: https://kubernetes.default.svc
namespace: pr-{{.number}}-spamooor
namespace: spamooor-pr-{{.number}}
project: default
sources:
- repoURL: https://github.com/astriaorg/spamooor.git
targetRevision: 'pull/{{.number}}/head' # '{{.head_sha}}'
path: charts/spamooor-cronjobs
helm:
# https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#helm-value-precedence
# Order of precedence is as follows:
# lowest -> valueFiles
# -> values
# -> valuesObject
# highest -> parameters

valueFiles:
- values.yaml

source:
repoURL: https://github.com/astriaorg/spamooor.git
targetRevision: 'pull/{{.number}}/head' # '{{.head_sha}}'
path: charts/spamooor-cronjobs
helm:
# https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#helm-value-precedence
# Order of precedence is as follows:
# lowest -> valueFiles
# -> values
# -> valuesObject
# highest -> parameters
valueFiles:
- values.yaml
parameters: # Paramters to override default values in values.yaml
- name: jobs.erctxsjob.image.tag
value: pr-{{.number}}
- name: jobs.eoatxsjob.image.tag
value: pr-{{.number}}
- name: jobs.univ2txsjob.image.tag
value: pr-{{.number}}
- name: jobs.gasburnertxsjob.image.tag
value: pr-{{.number}}
syncPolicy:
automated:
prune: true
Expand Down
2 changes: 1 addition & 1 deletion charts/spamooor-cronjobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 0.1.0
description: A Helm chart for Kubernetes
name: spamooor-cronjobs
type: application
version: 0.1.2
version: 0.1.3

maintainers:
- name: bharath-123
Expand Down
8 changes: 4 additions & 4 deletions charts/spamooor-cronjobs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fsGroup: 2000
image:
repository: ghcr.io/astriaorg/spamooor
tag: pr-12
tag: latest
imagePullPolicy: Always
schedule: "*/20 * * * *"
command: ["/app/spamooor"]
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
fsGroup: 2000
image:
repository: ghcr.io/astriaorg/spamooor
tag: pr-12
tag: latest
imagePullPolicy: Always
schedule: "*/15 * * * *"
command: ["/app/spamooor"]
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
fsGroup: 2000
image:
repository: ghcr.io/astriaorg/spamooor
tag: pr-12
tag: latest
imagePullPolicy: Always
# run every 10mins
schedule: "*/25 * * * *"
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
fsGroup: 2000
image:
repository: ghcr.io/astriaorg/spamooor
tag: pr-12
tag: latest
imagePullPolicy: Always
schedule: "*/30 * * * *"
command: ["/app/spamooor"]
Expand Down