Skip to content

Commit 392c85d

Browse files
authored
Nest Interface Policy under the interface field (#625)
* Change cloud-foundry type to nomad
1 parent 0b97fe7 commit 392c85d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2246
-1960
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ insert_final_newline = true
44
[{*.yml, *.yaml}]
55
indent_size = 2
66

7+
[*.graphql]
8+
indent_size = 4
9+
indent_style = space
10+
711
[Makefile]
812
indent_style = tab
913
indent_size = 4

deploy/kubernetes/charts/capact/charts/engine/templates/clusterpolicy-configmap.yaml

+1-7
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,4 @@ metadata:
66
{{- include "engine.labels" . | nindent 4 }}
77
data:
88
cluster-policy.yaml: |
9-
apiVersion: 0.2.0
10-
11-
rules:
12-
{{- if .Values.testSetup.enabled }}
13-
{{- toYaml .Values.testSetup.globalPolicyRules | nindent 8 }}
14-
{{- end }}
15-
{{- toYaml .Values.globalPolicyRules | nindent 8 }}
9+
{{- toYaml .Values.globalPolicy | nindent 4 }}

deploy/kubernetes/charts/capact/charts/engine/values.yaml

+53-63
Original file line numberDiff line numberDiff line change
@@ -60,67 +60,57 @@ affinity: {}
6060

6161
# order from highest priority to the lowest
6262
policyOrder: "ACTION,GLOBAL,WORKFLOW"
63-
globalPolicyRules:
63+
globalPolicy:
6464
# Insert Interface paths with Implementations. For example:
65-
#
66-
# - interface:
67-
# # Rules for exact path and revision (looked up in first place)
68-
# path: "cap.interface.database.postgresql.install"
69-
# revision: "0.1.0"
70-
# oneOf:
71-
# - implementationConstraints:
72-
# requires:
73-
# - path: "cap.type.gcp.auth.service-account"
74-
# # any revision
75-
# attributes:
76-
# - path: "cap.attribute.cloud.provider.gcp"
77-
# # any revision
78-
# inject:
79-
# typeInstances:
80-
# - id: "{uuid}"
81-
# typeRef:
82-
# path: "cap.type.gcp.auth.service-account"
83-
# revision: "0.1.0"
84-
# - implementationConstraints:
85-
# attributes:
86-
# - path: cap.attribute.cloud.provider.aws
87-
# # any revision
88-
# - implementationConstraints:
89-
# path: cap.implementation.bitnami.postgresql.install
90-
# - interface:
91-
# # Rules for exact path in any revision (looked up in second place)
92-
# path: "cap.interface.database.postgresql.install"
93-
# oneOf:
94-
# - implementationConstraints:
95-
# requires:
96-
# - path: "cap.type.gcp.auth.service-account"
97-
# # any revision
98-
# attributes:
99-
# - path: "cap.attribute.cloud.provider.gcp"
100-
# # any revision
101-
102-
- interface:
103-
# any other Interface (looked up in third place, if there is no rule for `path` and `revision` or `path`)
104-
path: "cap.*"
105-
oneOf:
106-
- implementationConstraints: # prefer Implementation for Kubernetes
107-
requires:
108-
- path: "cap.core.type.platform.kubernetes"
109-
# any revision
110-
- implementationConstraints: {} # fallback to any Implementation
111-
112-
testSetup:
113-
enabled: false
114-
globalPolicyRules:
115-
- interface:
116-
path: "cap.interface.capactio.capact.validation.action.passing"
117-
oneOf:
118-
- implementationConstraints:
119-
requires:
120-
- path: "cap.type.capactio.capact.validation.single-key"
121-
attributes:
122-
- path: "cap.attribute.capactio.capact.validation.policy.most-preferred"
123-
inject:
124-
requiredTypeInstances: [] # DO NOT MODIFY this line, as it is found and replaced during integration tests
125-
- implementationConstraints:
126-
path: cap.implementation.capactio.capact.validation.action.passing-a
65+
# interface:
66+
# rules:
67+
# - interface:
68+
# # Rules for exact path and revision (looked up in first place)
69+
# path: "cap.interface.database.postgresql.install"
70+
# revision: "0.1.0"
71+
# oneOf:
72+
# - implementationConstraints:
73+
# requires:
74+
# - path: "cap.type.gcp.auth.service-account"
75+
# # any revision
76+
# attributes:
77+
# - path: "cap.attribute.cloud.provider.gcp"
78+
# # any revision
79+
# inject:
80+
# typeInstances:
81+
# - id: "{uuid}"
82+
# typeRef:
83+
# path: "cap.type.gcp.auth.service-account"
84+
# revision: "0.1.0"
85+
# - implementationConstraints:
86+
# attributes:
87+
# - path: cap.attribute.cloud.provider.aws
88+
# # any revision
89+
# - implementationConstraints:
90+
# path: cap.implementation.bitnami.postgresql.install
91+
# - interface:
92+
# # Rules for exact path in any revision (looked up in second place)
93+
# path: "cap.interface.database.postgresql.install"
94+
# oneOf:
95+
# - implementationConstraints:
96+
# requires:
97+
# - path: "cap.type.gcp.auth.service-account"
98+
# # any revision
99+
# attributes:
100+
# - path: "cap.attribute.cloud.provider.gcp"
101+
# # any revision
102+
interface:
103+
rules:
104+
- interface:
105+
# any other Interface (looked up in third place, if there is no rule for `path` and `revision` or `path`)
106+
path: "cap.*"
107+
oneOf:
108+
- implementationConstraints: # prefer Implementation for Kubernetes
109+
requires:
110+
- path: "cap.core.type.platform.kubernetes"
111+
# any revision
112+
- implementationConstraints: {} # fallback to any Implementation
113+
114+
## Currently, not used but setting this filed is supported by all scripts and CLI.
115+
#testSetup:
116+
# enabled: false

deploy/kubernetes/charts/capact/templates/tests/test-e2e.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,5 @@ spec:
2222
value: "{{ .Values.global.gateway.auth.username }}"
2323
- name: GATEWAY_PASSWORD
2424
value: "{{ .Values.global.gateway.auth.password }}"
25-
- name: APP_CLUSTER_POLICY_NAME
26-
value: {{ include "capact.fullname" . }}-engine-cluster-policy
27-
- name: APP_CLUSTER_POLICY_NAMESPACE
28-
value: {{.Release.Namespace}}
2925
imagePullPolicy: {{ .Values.integrationTest.image.pullPolicy }}
3026
restartPolicy: Never

0 commit comments

Comments
 (0)