feat(catalogue,helm,ci): add private OCI auth, offline catalogue mirror, CI image/SBOM, metrics config, and OpenShift overlay (#2153)
This commit is contained in:
23 files changed
+1095
-12
No files matched your search
@@ -76,3 +76,26 @@ Migration secret name.
|
||||
{{- define "archie.migrateSecretName" -}}
|
||||
{{- default .Values.secrets.existingSecret .Values.migrate.existingSecret }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Render a map to YAML while omitting keys whose value is null (used so OpenShift
|
||||
restricted-v2 overlays can unset runAsUser, runAsGroup, and fsGroup cleanly).
|
||||
*/}}
|
||||
{{- define "archie.compactYaml" -}}
|
||||
{{- $out := dict -}}
|
||||
{{- range $k, $v := . -}}
|
||||
{{- if not (kindIs "invalid" $v) -}}
|
||||
{{- if kindIs "map" $v -}}
|
||||
{{- $sub := include "archie.compactYaml" $v -}}
|
||||
{{- if $sub -}}
|
||||
{{- $_ := set $out $k (fromYaml $sub) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $_ := set $out $k $v -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if $out -}}
|
||||
{{- toYaml $out -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
@@ -7,6 +7,9 @@ metadata:
|
||||
data:
|
||||
config.toml: |
|
||||
listen = {{ .Values.config.listen | quote }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
metrics_listen = {{ printf "0.0.0.0:%v" .Values.metrics.port | quote }}
|
||||
{{- end }}
|
||||
state_dir = {{ .Values.config.stateDir | quote }}
|
||||
shutdown_grace = {{ .Values.config.shutdownGrace | quote }}
|
||||
{{- if .Values.config.ageBackupRecipients }}
|
||||
@@ -25,6 +28,9 @@ data:
|
||||
{{- if .Values.config.catalogue.publicKey }}
|
||||
public_key = {{ .Values.config.catalogue.publicKey | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.config.catalogue.authSecret }}
|
||||
auth_file = "/run/secrets/archie-catalogue/config.json"
|
||||
{{- end }}
|
||||
|
||||
[extensions]
|
||||
require_remote = {{ .Values.config.extensions.requireRemote }}
|
||||
|
||||
@@ -25,8 +25,10 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: bootstrap
|
||||
image: {{ include "archie.image" . }}
|
||||
@@ -37,8 +39,10 @@ spec:
|
||||
- "-spec"
|
||||
- "/etc/archie/bootstrap.toml"
|
||||
- "bootstrap"
|
||||
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: HOME
|
||||
value: "/tmp"
|
||||
|
||||
@@ -31,8 +31,10 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: bundle-sync
|
||||
image: {{ include "archie.image" . }}
|
||||
@@ -55,8 +57,10 @@ spec:
|
||||
{{- if .Values.bundleSync.dryRun }}
|
||||
- "--dry-run"
|
||||
{{- end }}
|
||||
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: HOME
|
||||
value: "/tmp"
|
||||
|
||||
@@ -25,8 +25,10 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: migrate
|
||||
image: {{ include "archie.image" . }}
|
||||
@@ -35,8 +37,10 @@ spec:
|
||||
- "-config"
|
||||
- ""
|
||||
- "migrate"
|
||||
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: HOME
|
||||
value: "/tmp"
|
||||
|
||||
@@ -31,8 +31,10 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: archie
|
||||
image: {{ include "archie.image" . }}
|
||||
@@ -40,8 +42,10 @@ spec:
|
||||
args:
|
||||
- "-config"
|
||||
- "/etc/archie/config.toml"
|
||||
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
@@ -130,6 +134,11 @@ spec:
|
||||
mountPath: {{ .Values.config.extensions.tls.mountPath }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.config.catalogue.authSecret }}
|
||||
- name: catalogue-auth
|
||||
mountPath: /run/secrets/archie-catalogue
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
@@ -172,6 +181,15 @@ spec:
|
||||
secretName: {{ .Values.config.extensions.tls.existingSecret }}
|
||||
defaultMode: 0400
|
||||
{{- end }}
|
||||
{{- if .Values.config.catalogue.authSecret }}
|
||||
- name: catalogue-auth
|
||||
secret:
|
||||
secretName: {{ .Values.config.catalogue.authSecret }}
|
||||
defaultMode: 0400
|
||||
items:
|
||||
- key: {{ .Values.config.catalogue.authSecretKey }}
|
||||
path: config.json
|
||||
{{- end }}
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# OpenShift restricted-v2 SCC overlay: let OpenShift allocate namespace UIDs
|
||||
# and GID 0 rather than pinning UID/GID 65532.
|
||||
# Example:
|
||||
# helm upgrade --install archie deployments/helm/archie \
|
||||
# -f deployments/helm/archie/values-prod.yaml \
|
||||
# -f deployments/helm/archie/values-openshift.yaml
|
||||
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: null
|
||||
runAsGroup: null
|
||||
fsGroup: null
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: null
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
@@ -55,6 +55,9 @@ config:
|
||||
location: ""
|
||||
publicKey: ""
|
||||
disableAutoUpdate: true
|
||||
# Optional Secret containing Docker config.json for private OCI catalogue registries.
|
||||
authSecret: ""
|
||||
authSecretKey: "config.json"
|
||||
extensions:
|
||||
# Kubernetes restricted PSS forbids CLONE_NEWUSER namespaces; require remote gRPC+mTLS extensions.
|
||||
requireRemote: true
|
||||
@@ -200,6 +203,7 @@ service:
|
||||
annotations: {}
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
port: 9090
|
||||
path: "/metrics"
|
||||
serviceMonitor:
|
||||
|
||||
Reference in new issue
Block a user