Skip to content

Commit 4cdfcd2

Browse files
authored
Merge pull request kubevela#312 from zzxwill/baseconfiguration
Remove the inlined BaseConfiguration
2 parents fdaf7d0 + 90b168f commit 4cdfcd2

File tree

3 files changed

+30
-56
lines changed

3 files changed

+30
-56
lines changed

api/v1beta2/configuration_types.go

-5
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ type ConfigurationSpec struct {
4343
// Path is the sub-directory of remote git repository.
4444
Path string `json:"path,omitempty"`
4545

46-
BaseConfigurationSpec `json:",inline"`
47-
}
48-
49-
// BaseConfigurationSpec defines the common fields of a ConfigurationSpec
50-
type BaseConfigurationSpec struct {
5146
// WriteConnectionSecretToReference specifies the namespace and name of a
5247
// Secret to which any connection details for this managed resource should
5348
// be written. Connection details frequently include the endpoint, username,

api/v1beta2/zz_generated.deepcopy.go

+15-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controllers/configuration_controller_test.go

+15-25
Original file line numberDiff line numberDiff line change
@@ -1404,11 +1404,9 @@ func TestGetTFOutputs(t *testing.T) {
14041404
k8sClient4 := fake.NewClientBuilder().WithObjects(secret4).Build()
14051405
configuration4 := v1beta2.Configuration{
14061406
Spec: v1beta2.ConfigurationSpec{
1407-
BaseConfigurationSpec: v1beta2.BaseConfigurationSpec{
1408-
WriteConnectionSecretToReference: &crossplane.SecretReference{
1409-
Name: "connection-secret-c",
1410-
Namespace: "default",
1411-
},
1407+
WriteConnectionSecretToReference: &crossplane.SecretReference{
1408+
Name: "connection-secret-c",
1409+
Namespace: "default",
14121410
},
14131411
},
14141412
}
@@ -1447,11 +1445,9 @@ func TestGetTFOutputs(t *testing.T) {
14471445
Name: "configuration5",
14481446
},
14491447
Spec: v1beta2.ConfigurationSpec{
1450-
BaseConfigurationSpec: v1beta2.BaseConfigurationSpec{
1451-
WriteConnectionSecretToReference: &crossplane.SecretReference{
1452-
Name: "connection-secret-d",
1453-
Namespace: "default",
1454-
},
1448+
WriteConnectionSecretToReference: &crossplane.SecretReference{
1449+
Name: "connection-secret-d",
1450+
Namespace: "default",
14551451
},
14561452
},
14571453
}
@@ -1492,11 +1488,9 @@ func TestGetTFOutputs(t *testing.T) {
14921488
Namespace: "default",
14931489
},
14941490
Spec: v1beta2.ConfigurationSpec{
1495-
BaseConfigurationSpec: v1beta2.BaseConfigurationSpec{
1496-
WriteConnectionSecretToReference: &crossplane.SecretReference{
1497-
Name: "connection-secret-e",
1498-
Namespace: "default",
1499-
},
1491+
WriteConnectionSecretToReference: &crossplane.SecretReference{
1492+
Name: "connection-secret-e",
1493+
Namespace: "default",
15001494
},
15011495
},
15021496
}
@@ -1539,11 +1533,9 @@ func TestGetTFOutputs(t *testing.T) {
15391533
Namespace: "b",
15401534
},
15411535
Spec: v1beta2.ConfigurationSpec{
1542-
BaseConfigurationSpec: v1beta2.BaseConfigurationSpec{
1543-
WriteConnectionSecretToReference: &crossplane.SecretReference{
1544-
Name: "connection-secret-e",
1545-
Namespace: "default",
1546-
},
1536+
WriteConnectionSecretToReference: &crossplane.SecretReference{
1537+
Name: "connection-secret-e",
1538+
Namespace: "default",
15471539
},
15481540
},
15491541
}
@@ -1581,11 +1573,9 @@ func TestGetTFOutputs(t *testing.T) {
15811573
Name: "configuration5",
15821574
},
15831575
Spec: v1beta2.ConfigurationSpec{
1584-
BaseConfigurationSpec: v1beta2.BaseConfigurationSpec{
1585-
WriteConnectionSecretToReference: &crossplane.SecretReference{
1586-
Name: "connection-secret-d",
1587-
Namespace: "default",
1588-
},
1576+
WriteConnectionSecretToReference: &crossplane.SecretReference{
1577+
Name: "connection-secret-d",
1578+
Namespace: "default",
15891579
},
15901580
},
15911581
}

0 commit comments

Comments
 (0)