Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 3688873

Browse files
authored
Merge pull request #9 from open-component-model/cleanup-the-api
chore(clean): remove the component ref as it is unused
2 parents 0074dc5 + 9c26e7a commit 3688873

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

api/v1alpha1/gitsync_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ type CommitTemplate struct {
2424

2525
// GitSyncSpec defines the desired state of GitSync
2626
type GitSyncSpec struct {
27-
ComponentRef Ref `json:"componentRef"`
2827
SnapshotRef Ref `json:"snapshotRef"`
2928
Interval metav1.Duration `json:"interval"`
3029
URL string `json:"url"`

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/delivery.ocm.software_gitsyncs.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,6 @@ spec:
6363
- message
6464
- name
6565
type: object
66-
componentRef:
67-
description: Ref defines a name and namespace ref to any object.
68-
properties:
69-
name:
70-
type: string
71-
namespace:
72-
type: string
73-
required:
74-
- name
75-
- namespace
76-
type: object
7766
interval:
7867
type: string
7968
prune:
@@ -97,7 +86,6 @@ spec:
9786
- authRef
9887
- branch
9988
- commitTemplate
100-
- componentRef
10189
- interval
10290
- snapshotRef
10391
- subPath

controllers/gitsync_controller_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
)
1919

2020
func TestGitSyncReconciler(t *testing.T) {
21-
cv := DefaultComponent.DeepCopy()
2221
snapshot := DefaultSnapshot.DeepCopy()
2322
secret := &v1.Secret{
2423
ObjectMeta: metav1.ObjectMeta{
@@ -36,10 +35,6 @@ func TestGitSyncReconciler(t *testing.T) {
3635
Namespace: "default",
3736
},
3837
Spec: v1alpha1.GitSyncSpec{
39-
ComponentRef: v1alpha1.Ref{
40-
Name: cv.Name,
41-
Namespace: cv.Namespace,
42-
},
4338
SnapshotRef: v1alpha1.Ref{
4439
Name: snapshot.Name,
4540
Namespace: snapshot.Namespace,
@@ -60,7 +55,7 @@ func TestGitSyncReconciler(t *testing.T) {
6055
},
6156
}
6257

63-
client := env.FakeKubeClient(WithObjets(gitSync, snapshot, cv, secret), WithAddToScheme(ocmv1.AddToScheme))
58+
client := env.FakeKubeClient(WithObjets(gitSync, snapshot, secret), WithAddToScheme(ocmv1.AddToScheme))
6459
m := &mockGit{
6560
digest: "test-digest",
6661
}

0 commit comments

Comments
 (0)