ce7cb702218693d08ea6d83464d2457c9250027c

This commit is contained in:
ms2k 2026-11-12 20:46:28 +09:00
commit 34c5f8963c
2 changed files with 145336 additions and 0 deletions

View file

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- workflowtemplate.yaml

View file

@ -0,0 +1,594 @@
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: saltatory-delivery
namespace: project-delivery
labels:
app.kubernetes.io/name: project-delivery
app.kubernetes.io/instance: saltatory
spec:
entrypoint: workflow
serviceAccountName: project-delivery-executor
automountServiceAccountToken: false
executor:
serviceAccountName: project-delivery-executor
parallelism: 2
podGC:
strategy: OnWorkflowCompletion
podMetadata:
labels:
app.kubernetes.io/name: project-delivery
delivery.quorate.dev/project: saltatory
podSpecPatch: |
dnsConfig:
options:
- name: ndots
value: '1'
containers:
- name: wait
volumeMounts:
- name: exec-sa-token
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
readOnly: true
image: quay.io/argoproj/argoexec:v4.1.6@sha256:28432d912a716167709429b28e2755f49416eb4754c35ca3013863fb72717a00
volumes:
- name: exec-sa-token
secret: null
projected:
defaultMode: 0440
sources:
- serviceAccountToken:
expirationSeconds: 1800
path: token
- configMap:
name: kube-root-ca.crt
items:
- key: ca.crt
path: ca.crt
- downwardAPI:
items:
- path: namespace
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
initContainers:
- name: init
image: quay.io/argoproj/argoexec:v4.1.6@sha256:28432d912a716167709429b28e2755f49416eb4754c35ca3013863fb72717a00
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
arguments:
parameters:
- name: source-repository
- name: source-ref
- name: source-revision
- name: targets
imagePullSecrets:
- name: quay-reader
templates:
- name: workflow
steps:
- - name: initialize
template: initialize
- - name: delivery
template: delivery
arguments:
parameters:
- name: working-pvc
value: '{{steps.initialize.outputs.parameters.working-pvc}}'
outputs:
parameters:
- name: delivery-result
valueFrom:
parameter: '{{steps.delivery.outputs.parameters.delivery-result}}'
- name: initialize
metadata:
labels:
delivery.quorate.dev/stage: mc-initialize
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/initialize.fsx
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 2Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /workspace
- name: workflow-workspace
mountPath: /tmp
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-hostpath-ssd
resources:
requests:
storage: 25Gi
outputs:
parameters:
- name: working-pvc
valueFrom:
path: /workspace/.claim-name
- name: delivery
inputs:
parameters:
- name: working-pvc
dag:
tasks:
- name: source
template: source
arguments:
parameters:
- name: working-pvc
value: '{{inputs.parameters.working-pvc}}'
- name: cache-pull
template: cache-pull
arguments:
parameters:
- name: working-pvc
value: '{{inputs.parameters.working-pvc}}'
dependencies:
- source
- name: tools
template: tools
arguments:
parameters:
- name: working-pvc
value: '{{inputs.parameters.working-pvc}}'
dependencies:
- cache-pull
- name: build
template: build
arguments:
parameters:
- name: working-pvc
value: '{{inputs.parameters.working-pvc}}'
dependencies:
- tools
- name: publish
template: publish
arguments:
parameters:
- name: working-pvc
value: '{{inputs.parameters.working-pvc}}'
dependencies:
- build
- name: cache-export
template: cache-export
arguments:
parameters:
- name: working-pvc
value: '{{inputs.parameters.working-pvc}}'
dependencies:
- build
outputs:
parameters:
- name: delivery-result
valueFrom:
parameter: '{{tasks.publish.outputs.parameters.delivery-result}}'
- name: source
metadata:
labels:
delivery.quorate.dev/stage: mc-source
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/source.fsx
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 2Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /source
subPath: source
- name: workflow-workspace
mountPath: /tmp
subPath: source/tmp
env:
- name: SOURCE_REPOSITORY
value: '{{workflow.parameters.source-repository}}'
- name: SOURCE_REVISION
value: '{{workflow.parameters.source-revision}}'
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
persistentVolumeClaim:
claimName: '{{inputs.parameters.working-pvc}}'
inputs:
parameters:
- name: working-pvc
- name: cache-pull
metadata:
labels:
delivery.quorate.dev/stage: mc-cache-pull
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/cache.fsx
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 2Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /source
subPath: source
readOnly: true
- name: workflow-workspace
mountPath: /toolchain
subPath: toolchain
- name: workflow-workspace
mountPath: /work
subPath: work
- name: workflow-workspace
mountPath: /state
subPath: state
- name: workflow-workspace
mountPath: /tmp
subPath: state/pull-tmp
- name: cache-auth
mountPath: /cache-auth
readOnly: true
- name: cache-ca
mountPath: /cache-ca
readOnly: true
env:
- name: BUILD_MODULE
value: server
- name: CACHE_ACTION
value: pull
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
persistentVolumeClaim:
claimName: '{{inputs.parameters.working-pvc}}'
- name: cache-auth
secret:
secretName: project-delivery-cache-reader
defaultMode: 0440
- name: cache-ca
secret:
secretName: quay-internal-ca
defaultMode: 0440
inputs:
parameters:
- name: working-pvc
- name: tools
metadata:
labels:
delivery.quorate.dev/stage: mc-tools
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/tools.fsx
env:
- name: BUILD_MODULE
value: server
resources:
requests:
cpu: '2'
memory: 1Gi
limits:
memory: 8Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /source
subPath: source
readOnly: true
- name: workflow-workspace
mountPath: /toolchain
subPath: toolchain
- name: workflow-workspace
mountPath: /work
subPath: work
- name: workflow-workspace
mountPath: /state
subPath: state
readOnly: true
- name: workflow-workspace
mountPath: /tmp
subPath: state/tools-tmp
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
persistentVolumeClaim:
claimName: '{{inputs.parameters.working-pvc}}'
inputs:
parameters:
- name: working-pvc
podSpecPatch: |
runtimeClassName: gvisor
- name: build
metadata:
labels:
delivery.quorate.dev/stage: mc-build
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/build.fsx
env:
- name: BUILD_MODULE
value: server
resources:
requests:
cpu: '2'
memory: 1Gi
limits:
memory: 8Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /toolchain
subPath: toolchain
- name: workflow-workspace
mountPath: /work
subPath: work
- name: workflow-workspace
mountPath: /output
subPath: output
- name: workflow-workspace
mountPath: /tmp
subPath: state/build-tmp
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
persistentVolumeClaim:
claimName: '{{inputs.parameters.working-pvc}}'
inputs:
parameters:
- name: working-pvc
podSpecPatch: |
runtimeClassName: gvisor
- name: publish
metadata:
labels:
delivery.quorate.dev/stage: mc-publish
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/publish.fsx
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 2Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /handoff
subPath: output/jars
readOnly: true
- name: workflow-workspace
mountPath: /result
subPath: output/result
- name: workflow-workspace
mountPath: /tmp
subPath: output/publish-tmp
- name: publisher-auth
mountPath: /publisher-auth
readOnly: true
- name: publisher-ca
mountPath: /publisher-ca
readOnly: true
env:
- name: SOURCE_REVISION
value: '{{workflow.parameters.source-revision}}'
- name: TARGETS
value: '{{workflow.parameters.targets}}'
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
persistentVolumeClaim:
claimName: '{{inputs.parameters.working-pvc}}'
- name: publisher-auth
secret:
secretName: mc-publisher
defaultMode: 0440
- name: publisher-ca
secret:
secretName: quay-internal-ca
defaultMode: 0440
inputs:
parameters:
- name: working-pvc
outputs:
parameters:
- name: delivery-result
valueFrom:
path: /result/delivery-result
- name: cache-export
metadata:
labels:
delivery.quorate.dev/stage: mc-cache-export
container:
image: registry.quorate.internal/quorate/fsharp-runner@sha256:d7b904f4f0cae9fdba7c7345cdf08c91162245834a8a13658d93396272aeec83
command:
- /usr/share/dotnet/dotnet
- /opt/fsi/fsi.dll
- --exec
args:
- /orchestration/cache.fsx
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 2Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: orchestration
mountPath: /orchestration
readOnly: true
- name: workflow-workspace
mountPath: /source
subPath: source
readOnly: true
- name: workflow-workspace
mountPath: /toolchain
subPath: toolchain
readOnly: true
- name: workflow-workspace
mountPath: /work
subPath: work
readOnly: true
- name: workflow-workspace
mountPath: /state
subPath: state
readOnly: true
- name: workflow-workspace
mountPath: /tmp
subPath: output/export-tmp
- name: cache-auth
mountPath: /cache-auth
readOnly: true
- name: cache-ca
mountPath: /cache-ca
readOnly: true
env:
- name: BUILD_MODULE
value: server
- name: CACHE_ACTION
value: export
volumes:
- name: orchestration
configMap:
name: saltatory-orch
defaultMode: 0444
- name: workflow-workspace
persistentVolumeClaim:
claimName: '{{inputs.parameters.working-pvc}}'
- name: cache-auth
secret:
secretName: project-delivery-cache-writer
defaultMode: 0440
- name: cache-ca
secret:
secretName: quay-internal-ca
defaultMode: 0440
inputs:
parameters:
- name: working-pvc