Skip to content
Draft
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
1 change: 0 additions & 1 deletion charts/workflows-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ vcluster:
"/argo-server-sso": "workflows/argo-server-sso"
"/sessionspaces-ispyb": "kube-system/sessionspaces-ispyb"
"/artifact-s3-secret": "graph-proxy/artifact-s3-secret"
"/s3-artifact": "workflows/artifact-s3"
rbac:
clusterRole:
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion charts/workflows/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: workflows
description: Data Analysis workflow orchestration
type: application

version: 0.13.25
version: 0.13.26

dependencies:
- name: argo-workflows
Expand Down
50 changes: 26 additions & 24 deletions charts/workflows/templates/sessionspace-clusterpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,29 +111,31 @@ spec:
name: argo-workflow
apiGroup: rbac.authorization.k8s.io
---
apiVersion: policies.kyverno.io/v1alpha1
kind: GeneratingPolicy
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: copy-host-secret-artifact-s3
name: {{ .Release.Name }}-copy-artifact-s3-secret
spec:
evaluation:
generateExisting:
enabled: true
synchronize:
enabled: true
matchConstraints:
resourceRules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["namespaces"]
namespaceSelector:
matchLabels:
app.kubernetes.io/managed-by: sessionspaces
variables:
- name: targetNs
expression: "object.metadata.name"
- name: sourceSecret
expression: resource.Get("v1", "secrets", "workflows", "artifact-s3")
generate:
- expression: generator.Apply(variables.targetNs, [variables.sourceSecret])
validationFailureAction: Enforce
background: true
generateExisting: true
mutateExistingOnPolicyUpdate: true
useServerSideApply: true
rules:
- name: copy-artifact-s3-secret
match:
resources:
kinds:
- Namespace
selector:
matchLabels:
app.kubernetes.io/managed-by: sessionspaces
generate:
synchronize: true
apiVersion: v1
kind: Secret
name: artifact-s3
namespace: "{{ `{{request.object.metadata.name}}` }}"
clone:
namespace: workflows
name: artifact-s3
Loading