-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating the egress tutorial to include a domain name clientintent ex…
…ample
- Loading branch information
Showing
6 changed files
with
702 additions
and
561 deletions.
There are no files selected for viewing
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
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
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
22 changes: 22 additions & 0 deletions
22
static/code-examples/egress-access-control/dns-enabled-npol.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: allow-dns-access | ||
spec: | ||
egress: | ||
- ports: | ||
- port: 53 | ||
protocol: UDP | ||
to: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: kube-system | ||
podSelector: | ||
matchLabels: | ||
k8s-app: kube-dns | ||
podSelector: | ||
matchExpressions: | ||
- key: intents.otterize.com/service | ||
operator: Exists | ||
policyTypes: | ||
- Egress |
26 changes: 26 additions & 0 deletions
26
static/code-examples/egress-access-control/domain-intents.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: k8s.otterize.com/v1alpha3 | ||
kind: ClientIntents | ||
metadata: | ||
name: frontend | ||
namespace: otterize-tutorial-egress-access | ||
spec: | ||
service: | ||
name: frontend | ||
calls: | ||
- name: backend | ||
--- | ||
apiVersion: k8s.otterize.com/v1alpha3 | ||
kind: ClientIntents | ||
metadata: | ||
name: backend | ||
namespace: otterize-tutorial-egress-access | ||
spec: | ||
service: | ||
name: backend | ||
calls: | ||
- type: internet | ||
internet: | ||
domains: | ||
# Domain name for our advice service | ||
- api.adviceslip.com | ||
- name: frontend |
Oops, something went wrong.