Skip to content
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
6 changes: 3 additions & 3 deletions charts/static-site/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
repository: file://charts/common
version: 0.7.0
digest: sha256:a97ffdc0ab67ba57b6fb03ab3f98bbbc488f0630f2160b75e937c27d19a2fa08
generated: "2024-09-09T08:36:50.241133151Z"
digest: sha256:add56ef2d982ba863c26d56ce67dbdab941634dc81301cea01221a22ccce8bc4
generated: "2026-08-12T09:57:03.192194304+02:00"
11 changes: 9 additions & 2 deletions charts/static-site/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ 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: 0.73.0
version: 0.73.1

home: https://www.ethswarm.org
icon: https://docs.ethswarm.org/img/swarm-logo-2.svg

maintainers:
- name: darkobas
email: devops@ethswarm.org

dependencies:
- name: common
version: 0.7.0
repository: file://../common
repository: file://charts/common
18 changes: 18 additions & 0 deletions charts/static-site/PROVENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,21 @@ to keep existing deployments installable.
- Upstream licence: Apache-2.0 (see `LICENSE` in this directory)
- Templates are unmodified; `helm template` output is byte-for-byte identical to the
original `static-site-0.73.0.tgz` artifact.

## Local versions

Templates and values remain upstream `v0.73.0` verbatim. The chart version is
bumped locally only when repackaging metadata changes, because `chart-testing`
requires a version bump for any modified chart.

- `0.73.0` - initial vendoring.
- `0.73.1` - declare the vendored `common` subchart as
`repository: file://charts/common` and ship it unpacked rather than as a
tarball. Upstream's `file://../common` assumed onechart's monorepo layout and
broke `helm dependency update`, which failed the Release workflow for the
whole repository. Also strips two trailing-whitespace occurrences from
`values.yaml` that `chart-testing`'s yamllint rejects. No template changes
and no semantic values changes; rendered output is unchanged apart from the
`helm.sh/chart` version label. Adds the `maintainers`, `home` and `icon`
metadata that `chart-testing` requires and that the other charts in this
repository already carry; upstream shipped none.
Binary file removed charts/static-site/charts/common-0.7.0.tgz
Binary file not shown.
23 changes: 23 additions & 0 deletions charts/static-site/charts/common/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
5 changes: 5 additions & 0 deletions charts/static-site/charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
description: A Helm chart for Kubernetes
name: common
type: library
version: 0.7.0
16 changes: 16 additions & 0 deletions charts/static-site/charts/common/templates/_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- define "common.configmap.tpl" -}}
{{- if .Values.vars }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.robustName" .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "helm-chart.labels" . | nindent 4 }}
data:
{{- range $key, $val := .Values.vars }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- end -}}
54 changes: 54 additions & 0 deletions charts/static-site/charts/common/templates/_container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{{- define "common.container.tpl" -}}
name: {{ template "robustName" .Release.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 2 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.command }}
command:
- {{ .Values.shell }}
- -c
- {{ .Values.command | quote }}
{{- end }}
ports:
{{- if not .Values.ports }}
- name: http
containerPort: {{ .Values.containerPort }}
protocol: TCP
{{- else }}
{{- range .Values.ports }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
protocol: TCP
{{- end }}
{{- end }}
{{- if .Values.probe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.probe.path }}
port: {{ .Values.containerPort }}
scheme: HTTP
{{- with .Values.probe.settings }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.livenessProbe.path }}
port: {{ .Values.containerPort }}
scheme: HTTP
{{- with .Values.livenessProbe.settings }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- if not .Values.resources.ignore }}
resources:
{{- if .Values.resources.ignoreLimits }}
requests:
{{- toYaml .Values.resources.requests | nindent 4 }}
{{- else }}
{{- toYaml .Values.resources | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- define "common.customFileConfigmap.tpl" -}}
{{- range .Values.volumes }}
{{- if .fileName }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.robustName" (printf "%s-%s" $.Release.Name .name) }}
namespace: {{ $.Release.Namespace }}
data:
{{ .fileName }}: |
{{- .fileContent | nindent 4 }}

{{- end }}
{{- end }}
{{- end -}}
31 changes: 31 additions & 0 deletions charts/static-site/charts/common/templates/_envFromRef.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{- define "common.envFromRef.tpl" -}}
{{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets -}}
envFrom:
{{- if .Values.vars }}
- configMapRef:
name: {{ template "common.robustName" .Release.Name }}
{{- end }}
{{- range .Values.existingSecrets }}
- secretRef:
name: {{ .name }}
optional: {{ .optional | default false }}
{{- end }}
{{- range .Values.existingConfigMaps }}
- configMapRef:
name: {{ .name }}
optional: {{ .optional | default false }}
{{- end }}
{{- if .Values.secretEnabled }}
- secretRef:
name: {{ include "common.robustName" $.Release.Name }}
{{- end }}
{{- if .Values.secretName }}
- secretRef:
name: {{ .Values.secretName }}
{{- end }}
{{- if .Values.sealedSecrets }}
- secretRef:
name: {{ template "common.robustName" .Release.Name }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/static-site/charts/common/templates/_fileSecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- define "common.fileSecret.tpl" -}}
{{- range .Values.fileSecrets }}
---
kind: Secret
apiVersion: v1
type: Opaque
metadata:
name: {{ printf "%s-%s" $.Release.Name .name }}
namespace: {{ $.Release.Namespace }}
data:
{{- range $key, $val := .secrets }}
{{ $key }}: {{ $val | b64enc }}
{{- end }}
{{- end }}
{{- end -}}
10 changes: 10 additions & 0 deletions charts/static-site/charts/common/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Create robustName that can be used as Kubernetes resource name, and as subdomain as well
\w – Latin letters, digits, underscore '_' .
\W – all but \w .
*/}}
{{- define "common.robustName" -}}
{{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" }}
{{- end }}
83 changes: 83 additions & 0 deletions charts/static-site/charts/common/templates/_podSpec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{{- define "common.podSpec.tpl" -}}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 2 }}
{{- if .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount }}
{{- end }}
initContainers:
{{- range .Values.initContainers }}
- name: {{ .name }}
image: "{{ .image }}:{{ .tag }}"
imagePullPolicy: {{ .imagePullPolicy | default "IfNotPresent" }}
{{- include "common.envFromRef.tpl" $ | nindent 4 }}
{{- if .command }}
command:
- {{ $.Values.shell }}
- -c
- {{ .command | quote}}
{{- end }}
volumeMounts:
{{- range $.Values.volumes }}
{{- if (or (hasPrefix "shared-" .name) (hasPrefix "init-" .name))}}
- mountPath: {{ .path }}
name: {{ .name }}
{{- end }}
{{- end }}
{{- if .securityContext }}
securityContext:
{{- toYaml .securityContext | nindent 6 }}
{{- end}}
{{- end }}
containers:
{{- $containerTpl := include "common.container.tpl" . | fromYaml }}
{{- $container := mergeOverwrite $containerTpl .Values.container }}
- {{ toYaml $container | nindent 4 }}
{{- include "common.envFromRef.tpl" . | nindent 4 }}
{{- include "common.volumeMountsRef.tpl" . | nindent 4 }}
{{- if .Values.sidecar }}
- name: {{ template "robustName" .Release.Name }}-sidecar
securityContext:
{{- toYaml .Values.securityContext | nindent 6 }}
image: {{ .Values.sidecar.repository }}:{{ .Values.sidecar.tag }}
{{- if .Values.sidecar.command }}
command:
- {{ .Values.sidecar.shell }}
- -c
- {{ .Values.sidecar.command | quote }}
{{- end }}
{{- include "common.envFromRef.tpl" . | nindent 4 }}
{{- include "common.volumeMountsRef.tpl" . | nindent 4 }}
{{- end }}
{{- include "common.volumesRef.tpl" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- if or .Values.spreadAcrossNodes .Values.affinity }}
affinity:
{{- if .Values.spreadAcrossNodes }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/instance"
operator: In
values:
- {{ template "robustName" .Release.Name }}
topologyKey: "kubernetes.io/hostname"
{{- end }}
{{- if .Values.affinity }}
{{- toYaml .Values.affinity | nindent 2 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
26 changes: 26 additions & 0 deletions charts/static-site/charts/common/templates/_pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- define "common.pvc.tpl" -}}
{{- range .Values.volumes }}
{{- if not (or .existingClaim .hostPath .fileName .emptyDir .existingConfigMap) }}
{{- $robustName := include "common.robustName" $.Release.Name }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ printf "%s-%s" $robustName .name }}
namespace: {{ $.Release.Namespace }}
{{- if .pvcAnnotations }}
annotations:
{{- toYaml .pvcAnnotations | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .accessMode | default "ReadWriteOnce" }}
{{- if .storageClass }}
storageClassName: {{ .storageClass }}
{{- end }}
resources:
requests:
storage: {{ .size | default "1Gi" }}
{{- end }}
{{- end }}
{{- end -}}
26 changes: 26 additions & 0 deletions charts/static-site/charts/common/templates/_sealedFileSecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- define "common.sealedFileSecret.tpl" -}}
{{- range .Values.sealedFileSecrets }}
{{- $robustName := include "common.robustName" $.Release.Name }}
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: {{ printf "%s-%s" $robustName .name }}
namespace: {{ $.Release.Namespace }}
annotations:
sealedsecrets.bitnami.com/cluster-wide: "true"
spec:
encryptedData:
{{- range $f := .filesToMount }}
{{ $f.name }}: |-
{{- $f.source | nindent 6 }}
{{- /*
{{- $.Files.Get $f.sourcePath | nindent 6 }}
*/}}
{{- end }}
template:
metadata:
name: {{ printf "%s-%s" $.Release.Name .name }}
namespace: {{ $.Release.Namespace }}
{{- end }}
{{- end -}}
22 changes: 22 additions & 0 deletions charts/static-site/charts/common/templates/_sealedSecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- define "common.sealedSecret.tpl" -}}
{{- if .Values.sealedSecrets }}
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: {{ template "common.robustName" .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "helm-chart.labels" . | nindent 4 }}
annotations:
sealedsecrets.bitnami.com/cluster-wide: "true"
spec:
encryptedData:
{{- range $key, $val := .Values.sealedSecrets }}
{{ $key }}: {{ $val | quote }}
{{- end }}
template:
metadata:
name: {{ template "common.robustName" .Release.Name }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end -}}
Loading
Loading