Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
CZI Argus Helm Publisher Bot committed Mar 3, 2025
2 parents aad0b8d + 00fe403 commit 4913a61
Show file tree
Hide file tree
Showing 17 changed files with 353 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chart-dependency-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
update_chart_locks:
runs-on: [ARM64, self-hosted, Linux]
runs-on: ARM64
steps:
- name: Generate token
id: generate_token
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

jobs:
check-chart-released:
runs-on: [ARM64, self-hosted, Linux]
runs-on: ARM64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -37,7 +37,7 @@ jobs:
if: ${{ needs.check-chart-released.outputs.chart_released == 'true' }}
needs:
- check-chart-released
runs-on: [ARM64, self-hosted, Linux]
runs-on: ARM64
steps:
- name: Parse Tag
id: parse_tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ concurrency:
cancel-in-progress: true
jobs:
conventional_commit_title:
runs-on: [ARM64, self-hosted, Linux]
runs-on: ARM64
steps:
- uses: chanzuckerberg/github-actions/.github/actions/conventional-commits@v1.4.0
2 changes: 1 addition & 1 deletion .github/workflows/generate-schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
update_schema_and_readme:
runs-on: [ARM64, self-hosted, Linux]
runs-on: ARM64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
name: release-please
jobs:
release-please:
runs-on: [ARM64, self-hosted, Linux]
runs-on: ARM64
steps:
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
# For why we need to generate a token and not use the default
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"stack": "2.5.3",
"stack": "2.6.0",
"argus-config": "1.2.3"
}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

include ./common.mk
8 changes: 8 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

.PHONY: test
test:
@for i in $$(find . -type d); do \
if [ -e "$$i/Chart.yaml" ]; then \
helm unittest $$i; \
fi; \
done
7 changes: 7 additions & 0 deletions stack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.6.0](https://github.com/chanzuckerberg/argo-helm-charts/compare/stack-v2.5.3...stack-v2.6.0) (2025-03-03)


### Features

* add support for k8s jobs to stack helm chart ([#190](https://github.com/chanzuckerberg/argo-helm-charts/issues/190)) ([2a396e0](https://github.com/chanzuckerberg/argo-helm-charts/commit/2a396e0078d5e481d149dc266318c2160a2f686a))

## [2.5.3](https://github.com/chanzuckerberg/argo-helm-charts/compare/stack-v2.5.2...stack-v2.5.3) (2025-01-22)


Expand Down
2 changes: 1 addition & 1 deletion stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.5.3
version: 2.6.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 2 additions & 0 deletions stack/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

include ../common.mk
1 change: 1 addition & 0 deletions stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ A Helm chart for deploying an Argus stack.
| `global.oidcProxy.resources.requests.memory` | Memory request | `4Gi` |
| `services` | Services to deploy, all values in the above global section are inherited by the services and each service can override them | `{}` |
| `cronJobs` | Cron jobs to deploy, all values in the above global section are inherited by the cron jobs and each cron job can override them | `{}` |
| `jobs` | Jobs to deploy, all values in the above global section are inherited by the jobs and each job can override them | `{}` |
179 changes: 179 additions & 0 deletions stack/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{{ $global := . }}
{{ range $jobName, $jobValues := .Values.jobs }}
{{- $globalValuesDict := $global.Values.global | toYaml -}}
{{- $values := fromYaml $globalValuesDict -}}
{{- $values = set $values "name" $jobName -}}
{{- $values := mergeOverwrite $values $jobValues -}}
{{- $job := dict "Chart" $global.Chart "Release" $global.Release "Capabilities" $global.Capabilities "Values" $values -}}
{{- with $job -}}
---
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "service.fullname" . }}
labels:
{{- include "service.labels" . | nindent 4 }}
annotations:
{{- toYaml (mergeOverwrite
(dict)
(fromYaml (include "stack.annotations" $job ))
) | nindent 4 }}
spec:
{{- if .Values.activeDeadlineSeconds }}
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
{{- end }}
{{- if .Values.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.ttlSecondsAfterFinished }}
{{- end }}
{{- if .Values.backoffLimit }}
backoffLimit: {{ .Values.backoffLimit }}
{{- end }}
{{- if .Values.completions }}
completions: {{ .Values.completions }}
{{- end }}
{{- if .Values.parallelism }}
parallelism: {{ .Values.parallelism }}
{{- end }}
template:
metadata:
{{- with mergeOverwrite .Values.podAnnotations (dict "linkerd.io/inject" "disabled") }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "service.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "service.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
shareProcessNamespace: {{ .Values.shareProcessNamespace }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if and .Values.args (ne (len .Values.args) 0) }}
args:
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
{{- if and .Values.command (ne (len .Values.command) 0) }}
command:
{{- toYaml .Values.command | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
{{- include "container.probe" .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- include "container.probe" .Values.readinessProbe | nindent 12 }}
{{- if eq .Values.startupProbe.enabled true }}
startupProbe:
{{- include "container.probe" (omit .Values.startupProbe "enabled") | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if or (and .Values.persistence.enabled .Values.persistence.mountPath) .Values.volumeMounts}}
volumeMounts:
{{- if and .Values.persistence.enabled .Values.persistence.mountPath }}
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- end }}
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- end }}
{{- include "service.configuration" . | nindent 10}}
{{- include "service.nonsensitiveEnvVars" (list $global.Values.global .Values) | nindent 10 }}
{{- range $i, $container := .Values.sidecars }}
{{- $imageDict := fromYaml (include "image" $container) }}
{{- $container = mergeOverwrite $container $imageDict }}
{{- with omit $container "envFrom" "env" }}
- {{- toYaml . | nindent 10 }}
{{- include "service.configuration" $job | nindent 10}}
{{- end }}
{{- include "service.nonsensitiveEnvVars" (list $global.Values.global $job.Values $container) | nindent 10 }}
{{- end }}
initContainers:
{{- range $i, $container := .Values.initContainers }}
{{- $imageDict := fromYaml (include "image" $container) }}
{{- $container = mergeOverwrite $container $imageDict }}
{{- with omit $container "envFrom" "env" }}
- {{- toYaml . | nindent 10 }}
{{- include "service.configuration" $job | nindent 10}}
{{- end }}
{{- include "service.nonsensitiveEnvVars" (list $global.Values.global $job.Values $container) | nindent 10 }}
{{- end }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- if eq .Values.restartPolicy "Always" }}
restartPolicy: OnFailure
{{- else }}
restartPolicy: {{ .Values.restartPolicy }}
{{- end }}
{{- if or .Values.persistence.enabled .Values.volumes}}
volumes:
{{- if .Values.persistence.enabled }}
- name: data
persistentVolumeClaim:
claimName: {{ include "service.claimName" . }}
{{- end }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.topologySpreadConstraints }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
topologySpreadConstraints:
- maxSkew: 2
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
{{- include "service.selectorLabels" . | nindent 14 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
{{ if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "service.serviceAccountName" . }}
labels:
{{- include "service.labels" . | nindent 4 }}
{{- with mergeOverwrite
(dict)
.Values.annotations
.Values.serviceAccount.annotations
}}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
---
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion stack/tests/cronjob_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ tests:
- containsDocument:
apiVersion: v1
kind: ServiceAccount
name: "release-name-stack-job1"
name: "release-name-stack-job2"
not: true

Loading

0 comments on commit 4913a61

Please sign in to comment.