Skip to content
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

add cni+masterInterface to workload cluster #37

Merged
merged 2 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions config/crd/bases/infra.nephio.org_networks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,10 @@ spec:
labels:
additionalProperties:
type: string
description: Labels provide metadata to the prefix. They
are part of the spec since the allocation selector will
use these labels for finer grane selection As such we
distinguish clearly between the metadata labels and
the labels used in the spec
description: Labels as user defined labels
type: object
prefix:
description: Prefix defines the ip cidr in prefix or address
notation. It can be used to define a subnet or specifc
addresses
description: Prefix defines the ip cidr in prefix notation.
pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))
type: string
required:
Expand Down
9 changes: 9 additions & 0 deletions config/crd/bases/infra.nephio.org_workloadclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ spec:
clusterName:
description: ClusterName is the unique name for this cluster
type: string
cnis:
description: CNIs defines the CNIs required for the workload cluster
items:
type: string
type: array
masterInterface:
description: MasterInterface define the master interface for secondary
networking in the nodes on the cluster
type: string
type: object
status:
description: WorkloadClusterStatus defines the observed state of WorkloadCluster
Expand Down
70 changes: 51 additions & 19 deletions config/crd/bases/req.nephio.org_datanetworks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,47 +102,79 @@ spec:
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource
properties:
kind:
description: Type of this condition. At most one of
each condition type may apply to a resource at any
point in time.
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this
description: lastTransitionTime is the last time the
condition transitioned from one status to another.
This should be when the underlying condition changed. If
that is not known, then using the time when the
API field changed is acceptable.
format: date-time
type: string
message:
description: A Message containing details about this
condition's last transition from one status to another,
if any.
description: message is a human readable message indicating
details about the transition. This may be an empty
string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance,
if .metadata.generation is currently 12, but the
.status.conditions[x].observedGeneration is 9, the
condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: A Reason for this condition's last transition
from one status to another.
description: reason contains a programmatic identifier
indicating the reason for the condition's last transition.
Producers of specific condition types may define
expected values and meanings for this field, and
whether the values are considered a guaranteed API.
The value should be a CamelCase string. This field
may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: Status of this condition; is it currently
True, False, or Unknown?
description: status of the condition, one of True,
False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in
foo.example.com/CamelCase. --- Many .condition.type
values are consistent across resources like Available,
but because arbitrary conditions can be useful (see
.node.status.conditions), the ability to deconflict
is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
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])$
type: string
required:
- kind
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
expiryTime:
description: expiryTime indicated when the allocation expires
description: ExpiryTime defines when the allocation expires
type: string
gateway:
description: Gateway identifies the gatway IP for the network
description: Gateway defines the gateway IP for the allocated
prefix Gateway is only relevant for prefix kind = network
type: string
prefix:
description: AllocatedPrefix identifies the prefix that
was allocated by the IPAM system
description: Prefix defines the prefix, allocated by the
IPAM backend
type: string
type: object
name:
Expand Down
135 changes: 96 additions & 39 deletions config/crd/bases/req.nephio.org_interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,46 +98,75 @@ spec:
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource
properties:
kind:
description: Type of this condition. At most one of each
condition type may apply to a resource at any point in
time.
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be
when the underlying condition changed. If that is not
known, then using the time when the API field changed
is acceptable.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if
.metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the
current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: A Reason for this condition's last transition
from one status to another.
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values
and meanings for this field, and whether the values are
considered a guaranteed API. The value should be a CamelCase
string. This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown?
description: status of the condition, one of True, False,
Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across
resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability
to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
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])$
type: string
required:
- kind
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
expiryTime:
description: expiryTime indicated when the allocation expires
description: ExpiryTime defines when the allocation expires
type: string
gateway:
description: Gateway identifies the gatway IP for the network
description: Gateway defines the gateway IP for the allocated
prefix Gateway is only relevant for prefix kind = network
type: string
prefix:
description: AllocatedPrefix identifies the prefix that was allocated
by the IPAM system
description: Prefix defines the prefix, allocated by the IPAM
backend
type: string
type: object
vlanAllocationStatus:
Expand All @@ -146,47 +175,75 @@ spec:
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource
properties:
kind:
description: Type of this condition. At most one of each
condition type may apply to a resource at any point in
time.
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be
when the underlying condition changed. If that is not
known, then using the time when the API field changed
is acceptable.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if
.metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the
current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: A Reason for this condition's last transition
from one status to another.
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values
and meanings for this field, and whether the values are
considered a guaranteed API. The value should be a CamelCase
string. This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown?
description: status of the condition, one of True, False,
Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across
resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability
to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
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])$
type: string
required:
- kind
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
expiryTime:
description: expiryTime indicated when the allocation expires
description: ExpiryTime indicated when the allocation expires
type: string
vlanID:
description: AllocatedVlan identifies the vlan that was allocated
by the VLAN backend
description: VLANID defines the vlan ID, allocated by the VLAN
backend
type: integer
vlanRange:
description: AllocatedVlan identifies the vlan range that was
allocated by the VLAN backend
description: VLANRange defines the vlan range, allocated by the
VLAN backend
type: string
type: object
type: object
Expand Down
5 changes: 5 additions & 0 deletions infra/v1alpha1/workload_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ const (
type WorkloadClusterSpec struct {
// ClusterName is the unique name for this cluster
ClusterName string `json:"clusterName,omitempty"`
// CNIs defines the CNIs required for the workload cluster
CNIs []string `json:"cnis,omitempty"`
// MasterInterface define the master interface for secondary networking in the nodes
// on the cluster
MasterInterface *string `json:"masterInterface,omitempty"`
}

// WorkloadClusterStatus defines the observed state of WorkloadCluster
Expand Down
Loading