Skip to content

Commit

Permalink
docs; update toService docs about headless services
Browse files Browse the repository at this point in the history
.ToService rules only apply to services without selectors. The term
headless service is a service without a ClusterIP; and those are
distinct terms.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
  • Loading branch information
odinuge committed Jun 2, 2023
1 parent fc6376f commit 44d1008
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Documentation/security/policy/language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ namespace ``default``.
.. literalinclude:: ../../../examples/policies/l3/service/service.json

This example shows how to allow all endpoints with the label ``id=app2``
to talk to all endpoints of all kubernetes headless services which
have ``head:none`` set as the label.
to talk to all endpoints of all kubernetes services without selectors which
have ``external:yes`` set as the label.

.. only:: html

Expand Down
2 changes: 1 addition & 1 deletion examples/policies/l3/service/service-labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"k8sServiceSelector": {
"selector": {
"matchLabels": {
"head": "none"
"external": "yes"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/policies/l3/service/service-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
- k8sServiceSelector:
selector:
matchLabels:
head: none
external: yes

0 comments on commit 44d1008

Please sign in to comment.