You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate to Crossplane v2 and namespaced XRs (#110)
- Update XRD to apiVersion v2 with scope: Namespaced
- Rename XSQLInstance/XNetwork to SQLInstance/Network (remove X prefix)
- Remove claimNames (not supported for namespaced v2 XRs)
- Replace deletionPolicy with managementPolicies array
- Move compositionSelector under spec.crossplane
- Remove namespace from passwordSecretRef (uses XR namespace)
- Switch from CompositeConnectionDetails to corev1.Secret for connection secrets
- Update providers from v1 to v2 (provider-azure-* packages)
- Update imports from azure to azurem with v1beta1 models
- Update upbound.yaml to v2alpha1 with new dependency format
- Add k8s apiDependencies for corev1 types
- Update configuration-azure-network dependency to v2.0.0
- Update all examples and tests to match new schema
Copy file name to clipboardExpand all lines: apis/definition.yaml
+25-20Lines changed: 25 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,13 @@
1
-
apiVersion: apiextensions.crossplane.io/v1
1
+
apiVersion: apiextensions.crossplane.io/v2
2
2
kind: CompositeResourceDefinition
3
3
metadata:
4
-
name: xsqlinstances.azure.platform.upbound.io
4
+
name: sqlinstances.azure.platform.upbound.io
5
5
spec:
6
+
scope: Namespaced
6
7
group: azure.platform.upbound.io
7
8
names:
8
-
kind: XSQLInstance
9
-
plural: xsqlinstances
10
-
claimNames:
11
9
kind: SQLInstance
12
10
plural: sqlinstances
13
-
connectionSecretKeys:
14
-
- username
15
-
- password
16
-
- port
17
-
- host
18
11
versions:
19
12
- name: v1alpha1
20
13
served: true
@@ -26,19 +19,34 @@ spec:
26
19
spec:
27
20
type: object
28
21
properties:
22
+
writeConnectionSecretToRef:
23
+
type: object
24
+
description: Connection secret reference for database credentials
25
+
properties:
26
+
name:
27
+
type: string
28
+
description: Name of the connection secret
29
+
required:
30
+
- name
29
31
parameters:
30
32
type: object
31
33
properties:
32
34
region:
33
35
type: string
34
36
description: Region is the region you'd like your resource to be created in.
35
-
deletionPolicy:
36
-
description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete
37
-
enum:
38
-
- Delete
39
-
- Orphan
40
-
type: string
41
-
default: Delete
37
+
managementPolicies:
38
+
description: ManagementPolicies for Azure Database resources. Defaults to ["*"] which includes all operations (Create, Observe, Update, Delete, LateInitialize). To orphan resources on deletion, use ["Create", "Observe", "Update", "LateInitialize"].
39
+
type: array
40
+
items:
41
+
type: string
42
+
enum:
43
+
- "*"
44
+
- Create
45
+
- Observe
46
+
- Update
47
+
- Delete
48
+
- LateInitialize
49
+
default: ["*"]
42
50
providerConfigName:
43
51
description: Crossplane ProviderConfig to use for provisioning this resources
44
52
type: string
@@ -53,14 +61,11 @@ spec:
53
61
type: object
54
62
description: "A reference to the Secret object containing database password"
0 commit comments