Skip to content

Commit 150d8c3

Browse files
authored
Merge pull request #232 from rahulkjoshi/main
Update domain selector to domainNames
2 parents fcd330d + ca6a298 commit 150d8c3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

npeps/npep-133-fqdn-egress-selector.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ This NPEP proposes adding a new type of `AdminNetworkPolicyEgressPeer` called
104104

105105
```golang
106106

107-
// Domain describes one or more DNS names to be used as a peer.
107+
// DomainName describes one or more domain names to be used as a peer.
108108
//
109-
// Domain can be an exact match, or use the wildcard specifier '*' to match one
110-
// or more labels.
109+
// DomainName can be an exact match, or use the wildcard specifier '*' to match
110+
// one or more labels.
111111
//
112112
// '*', the wildcard specifier, matches one or more entire labels. It does not
113113
// support partial matches. '*' may only be specified as a prefix.
@@ -124,24 +124,24 @@ This NPEP proposes adding a new type of `AdminNetworkPolicyEgressPeer` called
124124
// "wikipedia.org" do not.
125125
//
126126
// +kubebuilder:validation:Pattern=`^(\*\.)?([a-zA-z0-9]([-a-zA-Z0-9_]*[a-zA-Z0-9])?\.)+[a-zA-z0-9]([-a-zA-Z0-9_]*[a-zA-Z0-9])?\.?$`
127-
type Domain string
127+
type DomainName string
128128

129129
type AdminNetworkPolicyEgressPeer struct {
130130
<snipped>
131-
// Domains provides a way to specify domain names as peers.
132-
//
133-
// Domains is only supported for ALLOW rules. In order to control access,
134-
// Domain ALLOW rules should be used with a lower priority egress deny --
135-
// this allows the admin to maintain an explicit "allowlist" of reachable
136-
// domains.
137-
//
131+
// DomainNames provides a way to specify domain names as peers.
132+
//
133+
// DomainNames is only supported for ALLOW rules. In order to control
134+
// access, DomainNames ALLOW rules should be used with a lower priority
135+
// egress deny -- this allows the admin to maintain an explicit "allowlist"
136+
// of reachable domains.
137+
//
138138
// Support: Extended
139139
//
140140
// <network-policy-api:experimental>
141141
// +optional
142142
// +listType=set
143143
// +kubebuilder:validation:MinItems=1
144-
Domains []Domain `json:"domains,omitempty"`
144+
DomainNames []Domain `json:"domainNames,omitempty"`
145145
}
146146
```
147147

@@ -164,7 +164,7 @@ spec:
164164
- name: "allow-to-my-service"
165165
action: "Allow"
166166
to:
167-
- domains:
167+
- domainNames:
168168
- "my-service.com"
169169
- "*.cloud-provider.io"
170170
ports:
@@ -194,7 +194,7 @@ spec:
194194
- name: "allow-to-my-service"
195195
action: "Allow"
196196
to:
197-
- domains:
197+
- domainNames:
198198
- "my-service.com"
199199
- "*.cloud-provider.io"
200200
ports:
@@ -225,7 +225,7 @@ spec:
225225
- name: "allow-to-my-service"
226226
action: "Allow"
227227
to:
228-
- domains:
228+
- domainNames:
229229
- "my-service.com"
230230
- "*.cloud-provider.io"
231231
ports:

0 commit comments

Comments
 (0)