| # The following policy selects workload c in namespace 2 |
| |
| apiVersion: security.istio.io/v1beta1 |
| kind: AuthorizationPolicy |
| metadata: |
| name: policy-ns2-{{ .c }} |
| namespace: "{{ .Namespace2 }}" |
| spec: |
| selector: |
| matchLabels: |
| "app": "{{ .c }}" |
| rules: |
| - to: |
| - operation: |
| paths: ["/policy-ns2-{{ .c }}"] |
| --- |
| |
| # The following policy selects all workloads in namespace 2 |
| |
| apiVersion: security.istio.io/v1beta1 |
| kind: AuthorizationPolicy |
| metadata: |
| name: policy-ns2-all |
| namespace: "{{ .Namespace2 }}" |
| spec: |
| rules: |
| - to: |
| - operation: |
| paths: ["/policy-ns2-all"] |
| --- |