-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend workload pools to include ingress firewall and ip allocations #6
Changes from all commits
c155e59
5b526af
c309f5f
57b61fa
967c644
35ca1ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,8 +159,97 @@ components: | |
description: Flavor ID. | ||
type: string | ||
minLength: 1 | ||
firewall: | ||
description: A list of firewall rules applied to a workload pool. | ||
type: object | ||
properties: | ||
ingress: | ||
$ref: '#/components/schemas/firewallRules' | ||
publicIPAllocation: | ||
$ref: '#/components/schemas/publicIPAllocation' | ||
image: | ||
$ref: '#/components/schemas/imageSelector' | ||
ssh: | ||
description: SSH settings. | ||
type: object | ||
properties: | ||
publicKeys: | ||
description: A list of public SSH keys to allow access to the machine. | ||
type: array | ||
items: | ||
type: string | ||
firewallRules: | ||
description: A list of firewall rules applied to a workload pool. | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/firewallRule' | ||
firewallRule: | ||
description: A firewall rule applied to a workload pool. | ||
type: object | ||
required: | ||
- protocol | ||
- port | ||
- cidr | ||
properties: | ||
protocol: | ||
description: The protocol to allow. | ||
type: string | ||
enum: | ||
- tcp | ||
- udp | ||
port: | ||
$ref: '#/components/schemas/firewallRulePort' | ||
cidr: | ||
description: A list of CIDR blocks to allow, it might be any IPv4 or IPv6 in CIDR notation. | ||
type: array | ||
items: | ||
type: string | ||
firewallRulePort: | ||
description: The port definition to allow traffic. | ||
type: object | ||
properties: | ||
number: | ||
description: The port to allow. | ||
type: integer | ||
range: | ||
$ref: '#/components/schemas/firewallRulePortRange' | ||
firewallRulePortRange: | ||
description: The port range to allow traffic. | ||
type: object | ||
required: | ||
- start | ||
- end | ||
properties: | ||
start: | ||
description: The start of the port range. | ||
type: integer | ||
end: | ||
description: The end of the port range. | ||
type: integer | ||
publicIPAllocation: | ||
description: A public IP allocation settings. | ||
type: object | ||
required: | ||
- enabled | ||
properties: | ||
enabled: | ||
description: Enable public IP allocation. | ||
type: boolean | ||
imageSelector: | ||
description: A server image selector. | ||
type: object | ||
required: | ||
- os | ||
- version | ||
properties: | ||
os: | ||
description: The operating system to use. | ||
type: string | ||
version: | ||
description: The operating system version to use. | ||
type: string | ||
computeClusterWorkloadPool: | ||
description: A Kuberntes cluster workload pool. | ||
description: A Compute cluster workload pool. | ||
type: object | ||
required: | ||
- name | ||
|
@@ -189,6 +278,59 @@ components: | |
type: string | ||
workloadPools: | ||
$ref: '#/components/schemas/computeClusterWorkloadPools' | ||
computeClusterStatus: | ||
description: Compute cluster status. | ||
type: object | ||
properties: | ||
workloadPools: | ||
$ref: '#/components/schemas/computeClusterWorkloadPoolsStatus' | ||
computeClusterWorkloadPoolsStatus: | ||
description: A list of Compute cluster workload pools status. | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/computeClusterWorkloadPoolStatus' | ||
computeClusterWorkloadPoolStatus: | ||
description: Compute cluster workload pool status. | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
description: Workload pool name. | ||
type: string | ||
machines: | ||
$ref: '#/components/schemas/computeClusterMachinesStatus' | ||
computeClusterMachinesStatus: | ||
description: A list of Compute cluster machines status. | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/computeClusterMachineStatus' | ||
computeClusterMachineStatus: | ||
description: Compute cluster machine status. | ||
type: object | ||
required: | ||
- hostname | ||
- privateIP | ||
- status | ||
properties: | ||
hostname: | ||
description: Machine hostname. | ||
type: string | ||
privateIP: | ||
description: Machine private IP address. | ||
type: string | ||
publicIP: | ||
description: Machine public IP address. | ||
type: string | ||
status: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should reference https://github.com/unikorn-cloud/core/blob/main/pkg/openapi/common.spec.yaml#L90 here to keep things in sync. |
||
description: Machine status. | ||
type: string | ||
enum: | ||
- unknown | ||
- provisioning | ||
- provisioned | ||
- deprovisioning | ||
- error | ||
computeClusterRead: | ||
description: Compute cluster read. | ||
type: object | ||
|
@@ -200,6 +342,8 @@ components: | |
$ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/schemas/projectScopedResourceReadMetadata' | ||
spec: | ||
$ref: '#/components/schemas/computeClusterSpec' | ||
status: | ||
$ref: '#/components/schemas/computeClusterStatus' | ||
computeClusterWrite: | ||
description: Compute cluster create or update. | ||
type: object | ||
|
@@ -234,6 +378,30 @@ components: | |
machine: | ||
flavorId: c7568e2d-f9ab-453d-9a3a-51375f78426b | ||
replicas: 3 | ||
firewall: | ||
ingress: | ||
- protocol: tcp | ||
port: | ||
number: 80 | ||
cidr: | ||
- 192.168.1.0/24 | ||
- protocol: tcp | ||
port: | ||
range: | ||
start: 1066 | ||
end: 1999 | ||
cidr: | ||
- 10.0.0.0/8 | ||
- 172.16.0.0/12 | ||
publicIPAllocation: | ||
enabled: true | ||
image: | ||
os: ubuntu | ||
version: 20.04 | ||
ssh: | ||
publicKeys: | ||
- ssh-rsa AAA3NzC1yc2AAADAQABAABgQDZ6... | ||
- ssh-rsa AAA3NzaC1yc2AADAQAAAABgQDZ7... | ||
responses: | ||
computeClusterResponse: | ||
description: A Compute cluster. | ||
|
@@ -256,6 +424,38 @@ components: | |
machine: | ||
flavorId: c7568e2d-f9ab-453d-9a3a-51375f78426b | ||
replicas: 3 | ||
firewall: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Examples are obviously the best illustration to review 😸 Looks good so far. I'd have a word with Adam, the firewall rules may need a description to make the UI happier. |
||
ingress: | ||
- protocol: tcp | ||
port: | ||
number: 80 | ||
cidr: | ||
- 192.168.1.0/24 | ||
- protocol: tcp | ||
port: | ||
range: | ||
start: 1066 | ||
end: 1999 | ||
cidr: | ||
- 10.0.0.0/8 | ||
- 172.16.0.0/12 | ||
publicIPAllocation: | ||
enabled: true | ||
image: | ||
os: ubuntu | ||
version: 20.04 | ||
ssh: | ||
publicKeys: | ||
- ssh-rsa AAA3NzC1yc2AAADAQABAABgQDZ6... | ||
- ssh-rsa AAA3NzaC1yc2AADAQAAAABgQDZ7... | ||
status: | ||
workloadPools: | ||
- name: default | ||
machines: | ||
- hostname: machine-1 | ||
privateIP: 10.0.0.1 | ||
publicIP: 172.16.0.2 | ||
status: provisioned | ||
computeClustersResponse: | ||
description: A list of Compute clusters. | ||
content: | ||
|
@@ -277,6 +477,38 @@ components: | |
machine: | ||
flavorId: c7568e2d-f9ab-453d-9a3a-51375f78426b | ||
replicas: 3 | ||
firewall: | ||
ingress: | ||
- protocol: tcp | ||
port: | ||
number: 80 | ||
cidr: | ||
- 192.168.1.0/24 | ||
- protocol: tcp | ||
port: | ||
range: | ||
start: 1066 | ||
end: 1999 | ||
cidr: | ||
- 10.0.0.0/8 | ||
- 172.16.0.0/12 | ||
publicIPAllocation: | ||
enabled: true | ||
image: | ||
os: ubuntu | ||
version: 20.04 | ||
ssh: | ||
publicKeys: | ||
- ssh-rsa AAA3NzC1yc2AAADAQABAABgQDZ6... | ||
- ssh-rsa AAA3NzaC1yc2AADAQAAAABgQDZ7... | ||
status: | ||
workloadPools: | ||
- name: default | ||
machines: | ||
- hostname: machine-1 | ||
privateIP: 10.0.0.1 | ||
publicIP: 172.16.0.2 | ||
status: provisioned | ||
securitySchemes: | ||
oauth2Authentication: | ||
description: Operation requires OAuth2 bearer token authentication. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprise I've not done this yet, but we should probably have a type definition in core for an IPv4 CIDR with the required regular expression patter matcher too.