Skip to content

Commit ba65ae5

Browse files
authored
Merge branch 'main' into feat/service-catalog-registration-design
2 parents 8b96dc4 + 6b87e21 commit ba65ae5

34 files changed

Lines changed: 789 additions & 39 deletions

.github/workflows/publish.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
contents: read
1717
packages: write
1818
attestations: write
19-
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1.13.1
19+
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1.14.0
2020
with:
2121
image-name: network-services-operator
2222
platforms: linux/amd64,linux/arm64
@@ -27,8 +27,10 @@ jobs:
2727
id-token: write
2828
contents: read
2929
packages: write
30-
uses: datum-cloud/actions/.github/workflows/publish-kustomize-bundle.yaml@v1.5.1
30+
uses: datum-cloud/actions/.github/workflows/publish-kustomize-bundle.yaml@v1.14.0
3131
with:
3232
bundle-name: ghcr.io/datum-cloud/network-services-operator-kustomize
3333
bundle-path: config
34+
image-name: ghcr.io/datum-cloud/network-services-operator
35+
image-overlays: config/manager
3436
secrets: inherit

PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ resources:
6464
version: v1alpha
6565
- api:
6666
crdVersion: v1
67-
namespaced: true
67+
namespaced: false
6868
domain: datumapis.com
6969
group: networking
7070
kind: Location

api/v1alpha/location_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ type LocationStatus struct {
6969
}
7070

7171
// +kubebuilder:object:root=true
72+
// +kubebuilder:resource:scope=Cluster
7273
// +kubebuilder:subresource:status
7374
// +kubebuilder:printcolumn:name="Class",type="string",JSONPath=".spec.locationClassName"
7475
// +kubebuilder:printcolumn:name="City",type="string",JSONPath=`.spec.topology.topology\.datum\.net/city-code`
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// SPDX-License-Identifier: AGPL-3.0-only
2+
3+
package v1alpha
4+
5+
import (
6+
corev1 "k8s.io/api/core/v1"
7+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
8+
)
9+
10+
// LocationBindingSpec defines the desired state of LocationBinding.
11+
type LocationBindingSpec struct {
12+
// LocationRef references the canonical cluster-scoped Location object.
13+
LocationRef corev1.LocalObjectReference `json:"locationRef"`
14+
15+
// LocationClassName mirrors spec.locationClassName from the referenced Location.
16+
LocationClassName string `json:"locationClassName,omitempty"`
17+
18+
// DisplayName is a human-readable label for the location.
19+
// +optional
20+
DisplayName string `json:"displayName,omitempty"`
21+
22+
// Topology mirrors spec.topology from the referenced Location, containing
23+
// well-known keys like topology.datum.net/city-code and topology.datum.net/region.
24+
// +optional
25+
Topology map[string]string `json:"topology,omitempty"`
26+
}
27+
28+
// LocationBindingStatus defines the observed state of LocationBinding.
29+
type LocationBindingStatus struct {
30+
// +listType=map
31+
// +listMapKey=type
32+
// +patchStrategy=merge
33+
// +patchMergeKey=type
34+
// +optional
35+
Conditions []metav1.Condition `json:"conditions,omitempty"`
36+
}
37+
38+
// +kubebuilder:object:root=true
39+
// +kubebuilder:subresource:status
40+
// +kubebuilder:resource:scope=Cluster
41+
// +kubebuilder:printcolumn:name="Location",type="string",JSONPath=".spec.locationRef.name"
42+
// +kubebuilder:printcolumn:name="Class",type="string",JSONPath=".spec.locationClassName"
43+
// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=`.status.conditions[?(@.type=="Available")].status`
44+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
45+
46+
// LocationBinding is the Schema for the locationbindings API. It is a
47+
// cluster-scoped projection of a cluster-scoped Location into a project's
48+
// virtual control plane, created once the location's class is supported, the
49+
// Location is Ready, and the corresponding ServiceAvailability is Available.
50+
type LocationBinding struct {
51+
metav1.TypeMeta `json:",inline"`
52+
metav1.ObjectMeta `json:"metadata,omitempty"`
53+
54+
Spec LocationBindingSpec `json:"spec,omitempty"`
55+
Status LocationBindingStatus `json:"status,omitempty"`
56+
}
57+
58+
// +kubebuilder:object:root=true
59+
60+
// LocationBindingList contains a list of LocationBinding.
61+
type LocationBindingList struct {
62+
metav1.TypeMeta `json:",inline"`
63+
metav1.ListMeta `json:"metadata,omitempty"`
64+
Items []LocationBinding `json:"items"`
65+
}
66+
67+
func init() {
68+
SchemeBuilder.Register(&LocationBinding{}, &LocationBindingList{})
69+
}

api/v1alpha/zz_generated.deepcopy.go

Lines changed: 104 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.16.4
7+
name: locationbindings.networking.datumapis.com
8+
spec:
9+
group: networking.datumapis.com
10+
names:
11+
kind: LocationBinding
12+
listKind: LocationBindingList
13+
plural: locationbindings
14+
singular: locationbinding
15+
scope: Cluster
16+
versions:
17+
- additionalPrinterColumns:
18+
- jsonPath: .spec.locationRef.name
19+
name: Location
20+
type: string
21+
- jsonPath: .spec.locationClassName
22+
name: Class
23+
type: string
24+
- jsonPath: .status.conditions[?(@.type=="Available")].status
25+
name: Available
26+
type: string
27+
- jsonPath: .metadata.creationTimestamp
28+
name: Age
29+
type: date
30+
name: v1alpha
31+
schema:
32+
openAPIV3Schema:
33+
description: |-
34+
LocationBinding is the Schema for the locationbindings API. It is a
35+
cluster-scoped projection of a cluster-scoped Location into a project's
36+
virtual control plane, created once the location's class is supported, the
37+
Location is Ready, and the corresponding ServiceAvailability is Available.
38+
properties:
39+
apiVersion:
40+
description: |-
41+
APIVersion defines the versioned schema of this representation of an object.
42+
Servers should convert recognized schemas to the latest internal value, and
43+
may reject unrecognized values.
44+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
45+
type: string
46+
kind:
47+
description: |-
48+
Kind is a string value representing the REST resource this object represents.
49+
Servers may infer this from the endpoint the client submits requests to.
50+
Cannot be updated.
51+
In CamelCase.
52+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
53+
type: string
54+
metadata:
55+
type: object
56+
spec:
57+
description: LocationBindingSpec defines the desired state of LocationBinding.
58+
properties:
59+
displayName:
60+
description: DisplayName is a human-readable label for the location.
61+
type: string
62+
locationClassName:
63+
description: LocationClassName mirrors spec.locationClassName from
64+
the referenced Location.
65+
type: string
66+
locationRef:
67+
description: LocationRef references the canonical cluster-scoped Location
68+
object.
69+
properties:
70+
name:
71+
default: ""
72+
description: |-
73+
Name of the referent.
74+
This field is effectively required, but due to backwards compatibility is
75+
allowed to be empty. Instances of this type with an empty value here are
76+
almost certainly wrong.
77+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
78+
type: string
79+
type: object
80+
x-kubernetes-map-type: atomic
81+
topology:
82+
additionalProperties:
83+
type: string
84+
description: |-
85+
Topology mirrors spec.topology from the referenced Location, containing
86+
well-known keys like topology.datum.net/city-code and topology.datum.net/region.
87+
type: object
88+
required:
89+
- locationRef
90+
type: object
91+
status:
92+
description: LocationBindingStatus defines the observed state of LocationBinding.
93+
properties:
94+
conditions:
95+
items:
96+
description: Condition contains details for one aspect of the current
97+
state of this API Resource.
98+
properties:
99+
lastTransitionTime:
100+
description: |-
101+
lastTransitionTime is the last time the condition transitioned from one status to another.
102+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
103+
format: date-time
104+
type: string
105+
message:
106+
description: |-
107+
message is a human readable message indicating details about the transition.
108+
This may be an empty string.
109+
maxLength: 32768
110+
type: string
111+
observedGeneration:
112+
description: |-
113+
observedGeneration represents the .metadata.generation that the condition was set based upon.
114+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
115+
with respect to the current state of the instance.
116+
format: int64
117+
minimum: 0
118+
type: integer
119+
reason:
120+
description: |-
121+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
122+
Producers of specific condition types may define expected values and meanings for this field,
123+
and whether the values are considered a guaranteed API.
124+
The value should be a CamelCase string.
125+
This field may not be empty.
126+
maxLength: 1024
127+
minLength: 1
128+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
129+
type: string
130+
status:
131+
description: status of the condition, one of True, False, Unknown.
132+
enum:
133+
- "True"
134+
- "False"
135+
- Unknown
136+
type: string
137+
type:
138+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
139+
maxLength: 316
140+
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])$
141+
type: string
142+
required:
143+
- lastTransitionTime
144+
- message
145+
- reason
146+
- status
147+
- type
148+
type: object
149+
type: array
150+
x-kubernetes-list-map-keys:
151+
- type
152+
x-kubernetes-list-type: map
153+
type: object
154+
type: object
155+
served: true
156+
storage: true
157+
subresources:
158+
status: {}

config/crd/bases/networking.datumapis.com_locations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
listKind: LocationList
1313
plural: locations
1414
singular: location
15-
scope: Namespaced
15+
scope: Cluster
1616
versions:
1717
- additionalPrinterColumns:
1818
- jsonPath: .spec.locationClassName

config/crd/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ resources:
99
- bases/networking.datumapis.com_subnets.yaml
1010
- bases/networking.datumapis.com_subnetclaims.yaml
1111
- bases/networking.datumapis.com_locations.yaml
12+
- bases/networking.datumapis.com_locationbindings.yaml
1213
- bases/networking.datumapis.com_domains.yaml
1314
- bases/networking.datumapis.com_httpproxies.yaml
1415
- bases/networking.datumapis.com_trafficprotectionpolicies.yaml

0 commit comments

Comments
 (0)