Skip to content

Commit 442ee41

Browse files
committed
test: don't set the talosconfig owner ref to the machine
Now as we have core CAPI controllers running, they will do it automatically which provides better test coverage. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 8c7fec8 commit 442ee41

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

config/crd/bases/bootstrap.cluster.x-k8s.io_talosconfigs.yaml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.5.0
7+
controller-gen.kubebuilder.io/version: v0.6.2
88
creationTimestamp: null
99
name: talosconfigs.bootstrap.cluster.x-k8s.io
1010
spec:
@@ -24,10 +24,14 @@ spec:
2424
description: TalosConfig is the Schema for the talosconfigs API
2525
properties:
2626
apiVersion:
27-
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
27+
description: 'APIVersion defines the versioned schema of this representation
28+
of an object. Servers should convert recognized schemas to the latest
29+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2830
type: string
2931
kind:
30-
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
32+
description: 'Kind is a string value representing the REST resource this
33+
object represents. Servers may infer this from the endpoint the client
34+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3135
type: string
3236
metadata:
3337
type: object
@@ -55,10 +59,12 @@ spec:
5559
description: ErrorReason will be set on non-retryable errors
5660
type: string
5761
ready:
58-
description: Ready indicates the BootstrapData field is ready to be consumed
62+
description: Ready indicates the BootstrapData field is ready to be
63+
consumed
5964
type: boolean
6065
talosConfig:
61-
description: Talos config will be a string containing the config for download
66+
description: Talos config will be a string containing the config for
67+
download
6268
type: string
6369
type: object
6470
type: object
@@ -72,10 +78,14 @@ spec:
7278
description: TalosConfig is the Schema for the talosconfigs API
7379
properties:
7480
apiVersion:
75-
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
81+
description: 'APIVersion defines the versioned schema of this representation
82+
of an object. Servers should convert recognized schemas to the latest
83+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
7684
type: string
7785
kind:
78-
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
86+
description: 'Kind is a string value representing the REST resource this
87+
object represents. Servers may infer this from the endpoint the client
88+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
7989
type: string
8090
metadata:
8191
type: object
@@ -109,7 +119,8 @@ spec:
109119
description: TalosConfigStatus defines the observed state of TalosConfig
110120
properties:
111121
dataSecretName:
112-
description: DataSecretName is the name of the secret that stores the bootstrap data script.
122+
description: DataSecretName is the name of the secret that stores
123+
the bootstrap data script.
113124
type: string
114125
failureMessage:
115126
description: FailureMessage will be set on non-retryable errors
@@ -118,10 +129,12 @@ spec:
118129
description: FailureReason will be set on non-retryable errors
119130
type: string
120131
ready:
121-
description: Ready indicates the BootstrapData field is ready to be consumed
132+
description: Ready indicates the BootstrapData field is ready to be
133+
consumed
122134
type: boolean
123135
talosConfig:
124-
description: Talos config will be a string containing the config for download
136+
description: Talos config will be a string containing the config for
137+
download
125138
type: string
126139
type: object
127140
type: object

config/crd/bases/bootstrap.cluster.x-k8s.io_talosconfigtemplates.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.5.0
7+
controller-gen.kubebuilder.io/version: v0.6.2
88
creationTimestamp: null
99
name: talosconfigtemplates.bootstrap.cluster.x-k8s.io
1010
spec:
@@ -21,13 +21,18 @@ spec:
2121
- name: v1alpha2
2222
schema:
2323
openAPIV3Schema:
24-
description: TalosConfigTemplate is the Schema for the talosconfigtemplates API
24+
description: TalosConfigTemplate is the Schema for the talosconfigtemplates
25+
API
2526
properties:
2627
apiVersion:
27-
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
28+
description: 'APIVersion defines the versioned schema of this representation
29+
of an object. Servers should convert recognized schemas to the latest
30+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2831
type: string
2932
kind:
30-
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
33+
description: 'Kind is a string value representing the REST resource this
34+
object represents. Servers may infer this from the endpoint the client
35+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3136
type: string
3237
metadata:
3338
type: object
@@ -57,13 +62,18 @@ spec:
5762
- name: v1alpha3
5863
schema:
5964
openAPIV3Schema:
60-
description: TalosConfigTemplate is the Schema for the talosconfigtemplates API
65+
description: TalosConfigTemplate is the Schema for the talosconfigtemplates
66+
API
6167
properties:
6268
apiVersion:
63-
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
69+
description: 'APIVersion defines the versioned schema of this representation
70+
of an object. Servers should convert recognized schemas to the latest
71+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
6472
type: string
6573
kind:
66-
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
74+
description: 'Kind is a string value representing the REST resource this
75+
object represents. Servers may infer this from the endpoint the client
76+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
6777
type: string
6878
metadata:
6979
type: object

internal/integration/helpers_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ func createMachine(ctx context.Context, t *testing.T, c client.Client, cluster *
116116
},
117117
}
118118

119-
require.NoError(t, controllerutil.SetOwnerReference(cluster, machine, scheme.Scheme))
120-
121119
require.NoError(t, c.Create(ctx, machine))
122120

123121
return machine

0 commit comments

Comments
 (0)