Skip to content

Commit b545f7d

Browse files
committed
Add Network, NetworkLink, InterNetworkIngress, NetworkAccess CRD types and manifests
Introduces four new Skupper v2alpha1 API types to enable inter-network connectivity: - Network: identifies a Skupper network by its NetworkId - NetworkLink: establishes a link to another network via TLS hostname/port - InterNetworkIngress: routes traffic from a NetworkLink or NetworkAccess to a local routing key - NetworkAccess: exposes a local endpoint to another network with optional dynamic port allocation and TLS Also adds: - CRD YAML manifests for all four new types under config/crd/bases/ - Generated client, informer, and lister code for all four new types - Updates config/crd/kustomization.yaml to reference the new manifests - Updates pkg/apis/skupper/v2alpha1/register.go to register the new types - Updates zz_generated.deepcopy.go with DeepCopy methods for new types
1 parent e1fde23 commit b545f7d

31 files changed

Lines changed: 2588 additions & 3 deletions
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: internetworkingresses.skupper.io
5+
spec:
6+
group: skupper.io
7+
versions:
8+
- name: v2alpha1
9+
served: true
10+
storage: true
11+
schema:
12+
openAPIV3Schema:
13+
description: |-
14+
An InterNetworkIngress can be defined alongside a NetworkLink or a NetworkAccess, exposing
15+
a local ingress routing key to be used by the remote router through an inter-network
16+
mTLS connection.
17+
The remote router can only send messages to the provided routing key.
18+
type: object
19+
properties:
20+
spec:
21+
type: object
22+
properties:
23+
routingKey:
24+
type: string
25+
description: The local ingress key to be exposed through the inter-network connection.
26+
networkLink:
27+
type: string
28+
description: Name of the NetworkLink to expose the routing key through.
29+
networkAccess:
30+
type: string
31+
description: Name of the NetworkAccess to expose the routing key through.
32+
settings:
33+
description: |-
34+
Advanced. A map containing additional settings. Each map
35+
entry has a string name and a string value.
36+
37+
**Note:** In general, we recommend not changing `settings`
38+
from their default values.
39+
type: object
40+
additionalProperties:
41+
type: string
42+
x-kubernetes-validations:
43+
- message: At least one of networkLink or networkAccess must be set
44+
rule: has(self.networkLink) || has(self.networkAccess)
45+
required:
46+
- routingKey
47+
status:
48+
type: object
49+
properties:
50+
status:
51+
description: |-
52+
The current state of the resource.
53+
- `Pending`: The resource is being processed.
54+
- `Error`: There was an error processing the resource. See `message` for more information.
55+
- `Ready`: The resource is ready to use.
56+
type: string
57+
message:
58+
description: |-
59+
A human-readable status message. Error messages are reported here.
60+
type: string
61+
conditions:
62+
type: array
63+
description: |-
64+
A set of named conditions describing the current state of the resource.
65+
66+
- `Configured`: The output resources for this resource have been created.
67+
- `Running`: There is at least one router pod running.
68+
- `Resolved`: The hostname or IP address for link access is available.
69+
- `Ready`: The site is ready for use. All other conditions are true.
70+
items:
71+
type: object
72+
properties:
73+
lastTransitionTime:
74+
format: date-time
75+
type: string
76+
message:
77+
maxLength: 32768
78+
type: string
79+
observedGeneration:
80+
format: int64
81+
minimum: 0
82+
type: integer
83+
reason:
84+
maxLength: 1024
85+
minLength: 1
86+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
87+
type: string
88+
status:
89+
enum:
90+
- "True"
91+
- "False"
92+
- Unknown
93+
type: string
94+
type:
95+
maxLength: 316
96+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
97+
type: string
98+
required:
99+
- lastTransitionTime
100+
- message
101+
- reason
102+
- status
103+
- type
104+
subresources:
105+
status: {}
106+
additionalPrinterColumns:
107+
- name: Routing Key
108+
type: string
109+
description: The local ingress key
110+
jsonPath: .spec.routingKey
111+
- name: Network Link
112+
type: string
113+
description: The network link name to use
114+
jsonPath: .spec.networkLink
115+
- name: Network Access
116+
type: string
117+
description: The network access name to use
118+
jsonPath: .spec.networkAccess
119+
- name: Status
120+
type: string
121+
description: The status of the VAN site
122+
jsonPath: .status.status
123+
- name: Message
124+
type: string
125+
description: Any human readable message relevant to the site
126+
jsonPath: .status.message
127+
scope: Namespaced
128+
names:
129+
plural: internetworkingresses
130+
singular: internetworkingress
131+
kind: InterNetworkIngress
132+
listKind: InterNetworkIngressList
133+
shortNames:
134+
- ini
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: networkaccesses.skupper.io
5+
spec:
6+
group: skupper.io
7+
versions:
8+
- name: v2alpha1
9+
served: true
10+
storage: true
11+
schema:
12+
openAPIV3Schema:
13+
description: |-
14+
Configuration for secure access to the site router for inter-network communication.
15+
The configuration includes TLS credentials and router ports.
16+
The NetworkAccess resource is used to implement inter-network access for sites.
17+
type: object
18+
properties:
19+
spec:
20+
type: object
21+
properties:
22+
port:
23+
description: The port for the router to bind.
24+
type: integer
25+
generateTlsCredentials:
26+
description: |-
27+
When set, Skupper generates the TLS credentials to be
28+
stored in the Secret specified by `tlsCredentials`. See
29+
also `issuer`.
30+
type: boolean
31+
issuer:
32+
type: string
33+
description: |-
34+
The name of the Kubernetes Secret containing the signing CA
35+
used to generate TLS certificates for the NetworkAccess when
36+
`generateTlsCredentials` is set.
37+
remoteIssuer:
38+
description: |-
39+
Advanced. Enable it if you want the Skupper Controller to
40+
generate CertificateRequests (CRs) instead of the default
41+
self-signed certificates.
42+
The CRs must be reconciled by an external application.
43+
type: boolean
44+
accessType:
45+
description: |-
46+
Configures the access type for the router endpoints.
47+
Available access types and the default selection is
48+
configured on the Skupper controller for Kubernetes.
49+
50+
The options available by default are:
51+
- `local`: No external ingress. Implies a Kubernetes Service with type ClusterIP.
52+
- `route`: Exposed via an OpenShift Route.
53+
- `loadbalancer`: Exposed via a Kubernetes Service with type LoadBalancer.
54+
type: string
55+
tlsCredentials:
56+
description: |-
57+
The name of a bundle of TLS certificates used for mutual TLS
58+
router-to-router communication. The bundle contains the
59+
server certificate and key and the trusted client certificate
60+
(usually a CA).
61+
62+
On Kubernetes, the value is the name of a Secret in the
63+
current namespace.
64+
65+
On Docker, Podman, and Linux, the value is the name of a
66+
directory under `input/certs/` in the current namespace.
67+
type: string
68+
bindHost:
69+
description: |-
70+
The hostname or IP address of the network interface to bind
71+
to. By default, Skupper binds all the interfaces on the host.
72+
type: string
73+
subjectAlternativeNames:
74+
type: array
75+
description: |-
76+
The hostnames and IPs secured by the router TLS certificate.
77+
items:
78+
type: string
79+
settings:
80+
description: |-
81+
Advanced. A map containing additional settings. Each map
82+
entry has a string name and a string value.
83+
84+
**Note:** In general, we recommend not changing `settings`
85+
from their default values.
86+
type: object
87+
additionalProperties:
88+
type: string
89+
required:
90+
- tlsCredentials
91+
status:
92+
type: object
93+
properties:
94+
status:
95+
description: |-
96+
The current state of the resource.
97+
- `Pending`: The resource is being processed.
98+
- `Error`: There was an error processing the resource. See `message` for more information.
99+
- `Ready`: The resource is ready to use.
100+
type: string
101+
message:
102+
description: |-
103+
A human-readable status message. Error messages are reported here.
104+
type: string
105+
networkId:
106+
description: |-
107+
The network id currently associated with the Network Access.
108+
type: string
109+
port:
110+
description: |-
111+
If a port is not specified, the controller assigns a dynamic port and reports it here.
112+
type: integer
113+
conditions:
114+
type: array
115+
description: |-
116+
A set of named conditions describing the current state of the resource.
117+
118+
- `Configured`: The output resources for this resource have been created.
119+
- `Resolved`: The connection endpoints are available.
120+
- `Ready`: The router access is ready for use. All other conditions are true.
121+
items:
122+
type: object
123+
properties:
124+
lastTransitionTime:
125+
format: date-time
126+
type: string
127+
message:
128+
maxLength: 32768
129+
type: string
130+
observedGeneration:
131+
format: int64
132+
minimum: 0
133+
type: integer
134+
reason:
135+
maxLength: 1024
136+
minLength: 1
137+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
138+
type: string
139+
status:
140+
enum:
141+
- "True"
142+
- "False"
143+
- Unknown
144+
type: string
145+
type:
146+
maxLength: 316
147+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
148+
type: string
149+
required:
150+
- lastTransitionTime
151+
- message
152+
- reason
153+
- status
154+
- type
155+
endpoints:
156+
type: array
157+
description: |-
158+
An array of connection endpoints. Each item has a name, host,
159+
port, and group.
160+
items:
161+
type: object
162+
properties:
163+
name:
164+
type: string
165+
host:
166+
type: string
167+
port:
168+
type: string
169+
group:
170+
type: string
171+
subresources:
172+
status: {}
173+
additionalPrinterColumns:
174+
- name: Status
175+
type: string
176+
description: The status of the router access
177+
jsonPath: .status.status
178+
- name: Message
179+
type: string
180+
description: Any relevant human readable message
181+
jsonPath: .status.message
182+
scope: Namespaced
183+
names:
184+
plural: networkaccesses
185+
singular: networkaccess
186+
kind: NetworkAccess

0 commit comments

Comments
 (0)