Last active
May 26, 2021 18:10
-
-
Save mauriciovasquezbernal/530f20658beacbe1abaf22f60690b63a to your computer and use it in GitHub Desktop.
Cilium-SPIFFE integration tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: "cilium.io/v2" | |
kind: CiliumNetworkPolicy | |
metadata: | |
name: "deny-all-egress" | |
spec: | |
endpointSelector: | |
{} | |
egress: | |
- {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow pods running with the default service account to contact pods | |
# running with the foo service account. | |
apiVersion: "cilium.io/v2" | |
kind: CiliumNetworkPolicy | |
metadata: | |
name: "spiffe-based" | |
spec: | |
endpointSelector: | |
matchLabels: | |
spiffe://example.org/ns/default/sa/default: "" | |
egress: | |
- toEndpoints: | |
- matchLabels: | |
spiffe://example.org/ns/default/sa/foo: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: "cilium.io/v2" | |
kind: CiliumNetworkPolicy | |
metadata: | |
name: "tls-upgrade" | |
spec: | |
endpointSelector: | |
matchLabels: | |
type: mypod | |
egress: | |
- toPorts: | |
- ports: | |
- port: "8443" | |
protocol: "TCP" | |
originatingTLS: | |
spiffe: | |
peerIDs: | |
- spiffe://example.org/server | |
rules: | |
http: | |
- {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment