Skip to content

Commit b1b934d

Browse files
fix: ConversionWebhook (#77)
1 parent 58571c8 commit b1b934d

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/Function.SDK.CSharp.Sample/ConversionEndpoint.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Function.SDK.CSharp.Sample/ConversionWebhook.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public static class ConversionWebhook
99
{
1010
public static V1ConversionReview Convert(V1ConversionReview conversion)
1111
{
12-
if (conversion.Kind == V1alpha2XStorageBucket.KubeKind
13-
&& conversion.ApiVersion == V1alpha2XStorageBucket.KubeApiVersion
12+
if (conversion.Kind == "ConversionReview"
13+
&& conversion.ApiVersion == "apiextensions.k8s.io/v1"
1414
&& conversion.Request?.DesiredApiVersion == V1alpha1XStorageBucket.KubeApiVersion
1515
)
1616
{

tests/Function.SDK.CSharp.Sample.Tests/ConversionWebhookTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public void V2toV1ConversionTest()
1414
{
1515
var input = new V1ConversionReview()
1616
{
17-
ApiVersion = V1alpha2XStorageBucket.KubeApiVersion,
18-
Kind = V1alpha2XStorageBucket.KubeKind,
17+
ApiVersion = "apiextensions.k8s.io/v1",
18+
Kind = "ConversionReview",
1919

2020
Request = new()
2121
{

0 commit comments

Comments
 (0)