Skip to content

Commit 7402308

Browse files
authored
Merge pull request #620 from kartverket/add-support-for-tls-ports
service-entry: add support for TLS ports
2 parents a189969 + 43dd111 commit 7402308

File tree

6 files changed

+46
-8
lines changed

6 files changed

+46
-8
lines changed

api/v1alpha1/podtypes/access_policy.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ type ExternalPort struct {
123123
//+kubebuilder:validation:Required
124124
Port int `json:"port"`
125125

126-
// The protocol to use for communication with the host. Only HTTP, HTTPS and TCP are supported.
126+
// The protocol to use for communication with the host. Supported protocols are: HTTP, HTTPS, TCP and TLS.
127127
//
128128
//+kubebuilder:validation:Required
129-
// +kubebuilder:validation:Enum=HTTP;HTTPS;TCP
129+
// +kubebuilder:validation:Enum=HTTP;HTTPS;TCP;TLS
130130
Protocol string `json:"protocol"`
131131
}

config/crd/skiperator.kartverket.no_applications.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,14 @@ spec:
172172
description: The port number of the external host
173173
type: integer
174174
protocol:
175-
description: The protocol to use for communication
176-
with the host. Only HTTP, HTTPS and TCP are
177-
supported.
175+
description: 'The protocol to use for communication
176+
with the host. Supported protocols are: HTTP,
177+
HTTPS, TCP and TLS.'
178178
enum:
179179
- HTTP
180180
- HTTPS
181181
- TCP
182+
- TLS
182183
type: string
183184
required:
184185
- name

config/crd/skiperator.kartverket.no_skipjobs.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,14 @@ spec:
184184
host
185185
type: integer
186186
protocol:
187-
description: The protocol to use for communication
188-
with the host. Only HTTP, HTTPS and TCP
189-
are supported.
187+
description: 'The protocol to use for communication
188+
with the host. Supported protocols are:
189+
HTTP, HTTPS, TCP and TLS.'
190190
enum:
191191
- HTTP
192192
- HTTPS
193193
- TCP
194+
- TLS
194195
type: string
195196
required:
196197
- name

tests/application/access-policy/chainsaw-test.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@ spec:
4747
file: external-ip-policy.yaml
4848
- assert:
4949
file: external-ip-policy-assert.yaml
50+
- try:
51+
- apply:
52+
file: dns-lookup.yaml
53+
- assert:
54+
file: dns-lookup-assert.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: networking.istio.io/v1
2+
kind: ServiceEntry
3+
metadata:
4+
name: dns-lookup-egress-9cb096c5f59540a7
5+
spec:
6+
exportTo:
7+
- .
8+
- istio-system
9+
- istio-gateways
10+
resolution: DNS
11+
hosts:
12+
- directory.example.com
13+
ports:
14+
- name: ldaps
15+
number: 636
16+
protocol: TLS
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: skiperator.kartverket.no/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: dns-lookup
5+
spec:
6+
image: image
7+
port: 8080
8+
accessPolicy:
9+
outbound:
10+
external:
11+
- host: directory.example.com
12+
ports:
13+
- name: ldaps
14+
port: 636
15+
protocol: TLS

0 commit comments

Comments
 (0)