Skip to content

Commit 2a61004

Browse files
authored
Merge pull request #308 from ninech/add_sc_destinations
add destinations
2 parents df06268 + b5d69b8 commit 2a61004

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

create/serviceconnection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func groupVersionKindFromKind(kind string) (schema.GroupVersionKind, error) {
213213
func ServiceConnectionKongVars() kong.Vars {
214214
result := make(kong.Vars)
215215
result["allowed_sources"] = "kubernetescluster, application"
216-
result["allowed_destinations"] = "keyvaluestore"
216+
result["allowed_destinations"] = "keyvaluestore, mysql, postgres"
217217
result["label_selector_placeholder"] = "'key1=value1,key2=value2,key3 in (value3)'"
218218
result["label_selector_usage"] = "Selector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'. Matching objects must satisfy all of the specified label constraints."
219219
result["label_selector_requirements"] = "Can only be set when the source is a KubernetesCluster."

create/serviceconnection_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestServiceConnection(t *testing.T) {
7171
SourceNamespace: "application-ns",
7272
},
7373
source: "application/test-application",
74-
destination: "keyvaluestore/test-kvs",
74+
destination: "mysql/test-mysql",
7575
want: networking.ServiceConnectionParameters{
7676
Source: networking.Source{
7777
Reference: meta.TypedReference{
@@ -87,12 +87,12 @@ func TestServiceConnection(t *testing.T) {
8787
},
8888
Destination: meta.TypedReference{
8989
Reference: meta.Reference{
90-
Name: "test-kvs",
90+
Name: "test-mysql",
9191
Namespace: "default",
9292
},
9393
GroupKind: metav1.GroupKind{
9494
Group: storage.Group,
95-
Kind: storage.KeyValueStoreKind,
95+
Kind: storage.MySQLKind,
9696
},
9797
},
9898
},
@@ -140,7 +140,7 @@ func TestServiceConnection(t *testing.T) {
140140
},
141141
},
142142
source: "kubernetescluster/test-cluster",
143-
destination: "keyvaluestore/test-kvs",
143+
destination: "postgres/test-postgres",
144144
want: networking.ServiceConnectionParameters{
145145
Source: networking.Source{
146146
Reference: meta.TypedReference{
@@ -190,12 +190,12 @@ func TestServiceConnection(t *testing.T) {
190190
},
191191
Destination: meta.TypedReference{
192192
Reference: meta.Reference{
193-
Name: "test-kvs",
193+
Name: "test-postgres",
194194
Namespace: "default",
195195
},
196196
GroupKind: metav1.GroupKind{
197197
Group: storage.Group,
198-
Kind: storage.KeyValueStoreKind,
198+
Kind: storage.PostgresKind,
199199
},
200200
},
201201
},

0 commit comments

Comments
 (0)