mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
add examples
This commit is contained in:
@ -11,16 +11,60 @@ Compatibility:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ cat example.yaml | jc --yaml -p
|
$ cat istio-mtls-permissive.yaml
|
||||||
|
apiVersion: "authentication.istio.io/v1alpha1"
|
||||||
|
kind: "Policy"
|
||||||
|
metadata:
|
||||||
|
name: "default"
|
||||||
|
namespace: "default"
|
||||||
|
spec:
|
||||||
|
peers:
|
||||||
|
- mtls: {}
|
||||||
|
---
|
||||||
|
apiVersion: "networking.istio.io/v1alpha3"
|
||||||
|
kind: "DestinationRule"
|
||||||
|
metadata:
|
||||||
|
name: "default"
|
||||||
|
namespace: "default"
|
||||||
|
spec:
|
||||||
|
host: "*.default.svc.cluster.local"
|
||||||
|
trafficPolicy:
|
||||||
|
tls:
|
||||||
|
mode: ISTIO_MUTUAL
|
||||||
|
|
||||||
|
$ cat istio-mtls-permissive.yaml | jc --yaml -p
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Description": "This is a YAML document",
|
"apiVersion": "authentication.istio.io/v1alpha1",
|
||||||
"Number": 42
|
"kind": "Policy",
|
||||||
|
"metadata": {
|
||||||
|
"name": "default",
|
||||||
|
"namespace": "default"
|
||||||
},
|
},
|
||||||
{
|
"spec": {
|
||||||
"Description": "Yet Another YAML document"
|
"peers": [
|
||||||
"Boolean": true
|
{
|
||||||
|
"mtls": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"apiVersion": "networking.istio.io/v1alpha3",
|
||||||
|
"kind": "DestinationRule",
|
||||||
|
"metadata": {
|
||||||
|
"name": "default",
|
||||||
|
"namespace": "default"
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"host": "*.default.svc.cluster.local",
|
||||||
|
"trafficPolicy": {
|
||||||
|
"tls": {
|
||||||
|
"mode": "ISTIO_MUTUAL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
## info
|
## info
|
||||||
|
@ -10,16 +10,60 @@ Compatibility:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ cat example.yaml | jc --yaml -p
|
$ cat istio-mtls-permissive.yaml
|
||||||
|
apiVersion: "authentication.istio.io/v1alpha1"
|
||||||
|
kind: "Policy"
|
||||||
|
metadata:
|
||||||
|
name: "default"
|
||||||
|
namespace: "default"
|
||||||
|
spec:
|
||||||
|
peers:
|
||||||
|
- mtls: {}
|
||||||
|
---
|
||||||
|
apiVersion: "networking.istio.io/v1alpha3"
|
||||||
|
kind: "DestinationRule"
|
||||||
|
metadata:
|
||||||
|
name: "default"
|
||||||
|
namespace: "default"
|
||||||
|
spec:
|
||||||
|
host: "*.default.svc.cluster.local"
|
||||||
|
trafficPolicy:
|
||||||
|
tls:
|
||||||
|
mode: ISTIO_MUTUAL
|
||||||
|
|
||||||
|
$ cat istio-mtls-permissive.yaml | jc --yaml -p
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Description": "This is a YAML document",
|
"apiVersion": "authentication.istio.io/v1alpha1",
|
||||||
"Number": 42
|
"kind": "Policy",
|
||||||
|
"metadata": {
|
||||||
|
"name": "default",
|
||||||
|
"namespace": "default"
|
||||||
},
|
},
|
||||||
{
|
"spec": {
|
||||||
"Description": "Yet Another YAML document"
|
"peers": [
|
||||||
"Boolean": true
|
{
|
||||||
|
"mtls": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"apiVersion": "networking.istio.io/v1alpha3",
|
||||||
|
"kind": "DestinationRule",
|
||||||
|
"metadata": {
|
||||||
|
"name": "default",
|
||||||
|
"namespace": "default"
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"host": "*.default.svc.cluster.local",
|
||||||
|
"trafficPolicy": {
|
||||||
|
"tls": {
|
||||||
|
"mode": "ISTIO_MUTUAL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"""
|
"""
|
||||||
import jc.utils
|
import jc.utils
|
||||||
|
Reference in New Issue
Block a user