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
2 changes: 1 addition & 1 deletion components/repository-validator/base/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: repository-validator
labels:
app.kubernetes.io/name: repository-validator
app.kubernetes.io/component: admission-policy
app.kubernetes.io/component: admission-policy
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ spec:
variables.allowedPrefixes[0] == "*"
validations:
- expression: |
variables.allowAll ||
variables.allowedPrefixes.exists(prefix,
variables.allowAll ||
variables.allowedPrefixes.exists(prefix,
prefix != "" && object.spec.url.startsWith(prefix)
)
messageExpression: |
'Repository URL "' + object.spec.url +
'" is not allowed on this cluster. Contact support.'
'Repository URL "' + object.spec.url +
'" is not allowed on this cluster. Contact support.'
reason: Forbidden
auditAnnotations:
- key: "repository-url-validation"
valueExpression: |
'Repository URL: ' + object.spec.url +
'Repository URL: ' + object.spec.url +
', Allowed prefixes: [' + variables.allowedPrefixes.join(', ') + ']'
3 changes: 1 addition & 2 deletions components/repository-validator/staging/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/redhat-appstudio/internal-infra-deployments/components/repository-validator/staging?ref=f15be7d510b152f7b7f3d0f3f921c7c9c73cadd4
- https://github.com/redhat-appstudio/internal-infra-deployments/components/repository-validator/staging?ref=f15be7d510b152f7b7f3d0f3f921c7c9c73cadd4
- ../base