Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(openapi): initial Istio support analysis #6438

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type module struct {
var modules = []module{
{outputName: "openshift-generated", getDefinitionsFunc: generated_openshift_openapi.GetOpenAPIDefinitions, patterns: packages.OpenShiftPackagePatterns},
{outputName: "io.k8s.storage.snapshot", getDefinitionsFunc: generated_volumesnapshot_openapi.GetOpenAPIDefinitions, patterns: packages.VolumeSnapshotPackagePatterns},
//{outputName: "io.istio", getDefinitionsFunc: generated_istio_openapi.GetOpenAPIDefinitions, patterns: packages.IstioPackagePatterns},
{outputName: "sh.volcano", getDefinitionsFunc: generated_volcano_openapi.GetOpenAPIDefinitions, patterns: packages.VolcanoPackagePatterns},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
olm "github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1"
prometheusoperatorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
"github.com/spf13/cobra"
istioapiclientextensions "istio.io/client-go/pkg/apis/extensions/v1alpha1"
"strings"
volcanov1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1"
)
Expand Down Expand Up @@ -66,5 +67,6 @@ var supportedApisRun = func(cobraCmd *cobra.Command, args []string) {
prometheusoperatorv1.SchemeGroupVersion.String(),
volumesnapshotv1.SchemeGroupVersion.String(),
volcanov1beta1.SchemeGroupVersion.String(),
istioapiclientextensions.SchemeGroupVersion.String(),
}, "\n"))
}
2 changes: 2 additions & 0 deletions kubernetes-model-generator/openapi/generator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require (
github.com/operator-framework/operator-lifecycle-manager v0.0.0-00010101000000-000000000000
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.77.1
github.com/spf13/cobra v1.8.1
istio.io/client-go v1.23.2
k8s.io/api v0.31.1
k8s.io/apiextensions-apiserver v0.31.1
k8s.io/apimachinery v0.31.1
Expand Down Expand Up @@ -150,6 +151,7 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
istio.io/api v1.23.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
sigs.k8s.io/controller-runtime v0.19.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions kubernetes-model-generator/openapi/generator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,10 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
istio.io/api v1.23.2 h1:FvWi7GC+rWD60/ZFPuulX/h3k+f2Q9qot3dP8CIL8Ss=
istio.io/api v1.23.2/go.mod h1:QPSTGXuIQdnZFEm3myf9NZ5uBMwCdJWUvfj9ZZ+2oBM=
istio.io/client-go v1.23.2 h1:BIt6A+KaUOFin3SzXiDq2Fr/TMBev1+c836R0BfUfhU=
istio.io/client-go v1.23.2/go.mod h1:E08wpMtUulJk2tlWOCUVakjy1bKFxUNm22tM1R1QY0Y=
k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU=
k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI=
k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ var ChaosMeshPackagePatterns = []string{
"github.com/chaos-mesh/chaos-mesh/api/v1alpha1",
}

var IstioPackagePatterns = []string{
"istio.io/api/meta/v...",
"istio.io/api/type/v...",
"istio.io/client-go/pkg/apis/extensions/v...",
"istio.io/api/extensions/v...",
"istio.io/client-go/pkg/apis/networking/v...",
//"istio.io/api/networking/v...",
"istio.io/client-go/pkg/apis/security/v...",
//"istio.io/api/security/v...",
"istio.io/client-go/pkg/apis/telemetry/v...",
"istio.io/api/telemetry/v...",
}

var VolcanoPackagePatterns = []string{
"volcano.sh/apis/pkg/apis/batch/v1alpha1",
"volcano.sh/apis/pkg/apis/bus/v1alpha1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var modules = []module{
{patterns: packages.OpenShiftPackagePatterns, outputName: "generated_openshift_openapi"},
// https://github.com/chaos-mesh/chaos-mesh/issues/4517
//{patterns: packages.ChaosMeshPackagePatterns, outputName: "generated_chaosmesh_openapi"},
//{patterns: packages.IstioPackagePatterns, outputName: "generated_istio_openapi"},
{patterns: packages.VolcanoPackagePatterns, outputName: "generated_volcano_openapi"},
{patterns: packages.VolumeSnapshotPackagePatterns, outputName: "generated_volumesnapshot_openapi"},
}
Expand Down
Loading