mirror of https://github.com/hashicorp/consul
Update service-intentions.mdx
parent
f9d14519e8
commit
a6322d8c94
|
@ -816,6 +816,8 @@ Sources = [
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: consul.hashicorp.com/v1alpha1
|
apiVersion: consul.hashicorp.com/v1alpha1
|
||||||
kind: ServiceIntentions
|
kind: ServiceIntentions
|
||||||
|
metadata:
|
||||||
|
name: db
|
||||||
spec:
|
spec:
|
||||||
destination:
|
destination:
|
||||||
name: db
|
name: db
|
||||||
|
@ -865,6 +867,8 @@ Sources = [
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: consul.hashicorp.com/v1alpha1
|
apiVersion: consul.hashicorp.com/v1alpha1
|
||||||
kind: ServiceIntentions
|
kind: ServiceIntentions
|
||||||
|
metadata:
|
||||||
|
name: web-deny-all
|
||||||
spec:
|
spec:
|
||||||
destination:
|
destination:
|
||||||
name: *
|
name: *
|
||||||
|
@ -908,6 +912,8 @@ Sources = [
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: consul.hashicorp.com/v1alpha1
|
apiVersion: consul.hashicorp.com/v1alpha1
|
||||||
kind: ServiceIntentions
|
kind: ServiceIntentions
|
||||||
|
metadata:
|
||||||
|
name: db
|
||||||
spec:
|
spec:
|
||||||
destination:
|
destination:
|
||||||
name: db
|
name: db
|
||||||
|
@ -1251,20 +1257,19 @@ When using cluster peering connections, intentions secure your deployments with
|
||||||
```
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
```yaml
|
apiVersion: consul.hashicorp.com/v1alpha1
|
||||||
apiVersion: consul.hashicorp.com/v1alpha1
|
kind: ServiceIntentions
|
||||||
kind: ServiceIntentions
|
metadata:
|
||||||
metadata:
|
name: backend-deny
|
||||||
name: backend-deny
|
spec:
|
||||||
spec:
|
destination:
|
||||||
destination:
|
name: backend
|
||||||
name: backend
|
sources:
|
||||||
sources:
|
- name: "*"
|
||||||
- name: "*"
|
action: deny
|
||||||
action: deny
|
- name: frontend
|
||||||
- name: frontend
|
action: allow
|
||||||
action: allow
|
peer: cluster-01 ## The peer of the source service
|
||||||
peer: cluster-01 ## The peer of the source service
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
@ -1281,4 +1286,4 @@ When using cluster peering connections, intentions secure your deployments with
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
</CodeTabs>
|
</CodeTabs>
|
||||||
|
|
Loading…
Reference in New Issue