未验证 提交 7a00f9e3 编写于 作者: R runzexia

add multi version crd docs support &add crd docs gen

Signed-off-by: Nrunzexia <runzexia@yunify.com>
上级 a48d7f54
......@@ -87,6 +87,7 @@ openapi:
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/servicemesh/v1alpha2 -p kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/api/networking/v1,./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./vendor/k8s.io/apimachinery/pkg/util/intstr,./pkg/apis/network/v1alpha1 -p kubesphere.io/kubesphere/pkg/apis/network/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/devops/v1alpha1,./vendor/k8s.io/apimachinery/pkg/runtime,./vendor/k8s.io/api/core/v1 -p kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/devops/v1alpha3,./vendor/k8s.io/apimachinery/pkg/runtime -p kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
go run ./tools/cmd/crd-doc-gen/main.go
# Build the docker image
docker-build: all
......
API rule violation: list_type_missing,k8s.io/api/core/v1,AvoidPods,PreferAvoidPods
API rule violation: list_type_missing,k8s.io/api/core/v1,Capabilities,Add
API rule violation: list_type_missing,k8s.io/api/core/v1,Capabilities,Drop
API rule violation: list_type_missing,k8s.io/api/core/v1,CephFSPersistentVolumeSource,Monitors
API rule violation: list_type_missing,k8s.io/api/core/v1,CephFSVolumeSource,Monitors
API rule violation: list_type_missing,k8s.io/api/core/v1,ComponentStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/core/v1,ComponentStatusList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ConfigMapList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ConfigMapProjection,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ConfigMapVolumeSource,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,Container,Args
API rule violation: list_type_missing,k8s.io/api/core/v1,Container,Command
API rule violation: list_type_missing,k8s.io/api/core/v1,Container,Env
API rule violation: list_type_missing,k8s.io/api/core/v1,Container,EnvFrom
API rule violation: list_type_missing,k8s.io/api/core/v1,Container,VolumeDevices
API rule violation: list_type_missing,k8s.io/api/core/v1,Container,VolumeMounts
API rule violation: list_type_missing,k8s.io/api/core/v1,ContainerImage,Names
API rule violation: list_type_missing,k8s.io/api/core/v1,DownwardAPIProjection,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,DownwardAPIVolumeSource,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,EndpointSubset,Addresses
API rule violation: list_type_missing,k8s.io/api/core/v1,EndpointSubset,NotReadyAddresses
API rule violation: list_type_missing,k8s.io/api/core/v1,EndpointSubset,Ports
API rule violation: list_type_missing,k8s.io/api/core/v1,Endpoints,Subsets
API rule violation: list_type_missing,k8s.io/api/core/v1,EndpointsList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,Args
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,Command
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,Env
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,EnvFrom
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,Ports
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,VolumeDevices
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainerCommon,VolumeMounts
API rule violation: list_type_missing,k8s.io/api/core/v1,EphemeralContainers,EphemeralContainers
API rule violation: list_type_missing,k8s.io/api/core/v1,EventList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ExecAction,Command
API rule violation: list_type_missing,k8s.io/api/core/v1,FCVolumeSource,TargetWWNs
API rule violation: list_type_missing,k8s.io/api/core/v1,FCVolumeSource,WWIDs
API rule violation: list_type_missing,k8s.io/api/core/v1,HTTPGetAction,HTTPHeaders
API rule violation: list_type_missing,k8s.io/api/core/v1,HostAlias,Hostnames
API rule violation: list_type_missing,k8s.io/api/core/v1,ISCSIPersistentVolumeSource,Portals
API rule violation: list_type_missing,k8s.io/api/core/v1,ISCSIVolumeSource,Portals
API rule violation: list_type_missing,k8s.io/api/core/v1,LimitRangeList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,LimitRangeSpec,Limits
API rule violation: list_type_missing,k8s.io/api/core/v1,List,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,LoadBalancerStatus,Ingress
API rule violation: list_type_missing,k8s.io/api/core/v1,NamespaceList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,NamespaceSpec,Finalizers
API rule violation: list_type_missing,k8s.io/api/core/v1,NamespaceStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeAffinity,PreferredDuringSchedulingIgnoredDuringExecution
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeSelector,NodeSelectorTerms
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeSelectorRequirement,Values
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeSelectorTerm,MatchExpressions
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeSelectorTerm,MatchFields
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeSpec,PodCIDRs
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeSpec,Taints
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeStatus,Addresses
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeStatus,Images
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeStatus,VolumesAttached
API rule violation: list_type_missing,k8s.io/api/core/v1,NodeStatus,VolumesInUse
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeClaimList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeClaimSpec,AccessModes
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeClaimStatus,AccessModes
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeClaimStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeSpec,AccessModes
API rule violation: list_type_missing,k8s.io/api/core/v1,PersistentVolumeSpec,MountOptions
API rule violation: list_type_missing,k8s.io/api/core/v1,PodAffinity,PreferredDuringSchedulingIgnoredDuringExecution
API rule violation: list_type_missing,k8s.io/api/core/v1,PodAffinity,RequiredDuringSchedulingIgnoredDuringExecution
API rule violation: list_type_missing,k8s.io/api/core/v1,PodAffinityTerm,Namespaces
API rule violation: list_type_missing,k8s.io/api/core/v1,PodAntiAffinity,PreferredDuringSchedulingIgnoredDuringExecution
API rule violation: list_type_missing,k8s.io/api/core/v1,PodAntiAffinity,RequiredDuringSchedulingIgnoredDuringExecution
API rule violation: list_type_missing,k8s.io/api/core/v1,PodDNSConfig,Nameservers
API rule violation: list_type_missing,k8s.io/api/core/v1,PodDNSConfig,Options
API rule violation: list_type_missing,k8s.io/api/core/v1,PodDNSConfig,Searches
API rule violation: list_type_missing,k8s.io/api/core/v1,PodExecOptions,Command
API rule violation: list_type_missing,k8s.io/api/core/v1,PodList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,PodPortForwardOptions,Ports
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSecurityContext,SupplementalGroups
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSecurityContext,Sysctls
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,Containers
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,EphemeralContainers
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,HostAliases
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,ImagePullSecrets
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,InitContainers
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,ReadinessGates
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,Tolerations
API rule violation: list_type_missing,k8s.io/api/core/v1,PodSpec,Volumes
API rule violation: list_type_missing,k8s.io/api/core/v1,PodStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/core/v1,PodStatus,ContainerStatuses
API rule violation: list_type_missing,k8s.io/api/core/v1,PodStatus,EphemeralContainerStatuses
API rule violation: list_type_missing,k8s.io/api/core/v1,PodStatus,InitContainerStatuses
API rule violation: list_type_missing,k8s.io/api/core/v1,PodStatus,PodIPs
API rule violation: list_type_missing,k8s.io/api/core/v1,PodTemplateList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ProjectedVolumeSource,Sources
API rule violation: list_type_missing,k8s.io/api/core/v1,RBDPersistentVolumeSource,CephMonitors
API rule violation: list_type_missing,k8s.io/api/core/v1,RBDVolumeSource,CephMonitors
API rule violation: list_type_missing,k8s.io/api/core/v1,RangeAllocation,Data
API rule violation: list_type_missing,k8s.io/api/core/v1,ReplicationControllerList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ReplicationControllerStatus,Conditions
API rule violation: list_type_missing,k8s.io/api/core/v1,ResourceQuotaList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ResourceQuotaSpec,Scopes
API rule violation: list_type_missing,k8s.io/api/core/v1,ScopeSelector,MatchExpressions
API rule violation: list_type_missing,k8s.io/api/core/v1,ScopedResourceSelectorRequirement,Values
API rule violation: list_type_missing,k8s.io/api/core/v1,SecretList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,SecretProjection,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,SecretVolumeSource,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ServiceAccount,ImagePullSecrets
API rule violation: list_type_missing,k8s.io/api/core/v1,ServiceAccount,Secrets
API rule violation: list_type_missing,k8s.io/api/core/v1,ServiceAccountList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ServiceList,Items
API rule violation: list_type_missing,k8s.io/api/core/v1,ServiceSpec,ExternalIPs
API rule violation: list_type_missing,k8s.io/api/core/v1,ServiceSpec,LoadBalancerSourceRanges
API rule violation: list_type_missing,k8s.io/api/core/v1,TopologySelectorLabelRequirement,Values
API rule violation: list_type_missing,k8s.io/api/core/v1,TopologySelectorTerm,MatchLabelExpressions
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,APIGroup,ServerAddressByClientCIDRs
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,APIGroup,Versions
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,APIGroupList,Groups
......@@ -139,55 +24,10 @@ API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,Table
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,TableRow,Cells
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,TableRow,Conditions
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,UpdateOptions,DryRun
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,RawExtension,Raw
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerConfig,Env
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerInfo,BuildVolumes
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerInfo,RuntimeArtifacts
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,Parameter,OptValues
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iAutoScale,Containers
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBinaryList,Items
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuildResult,ImageRepoTags
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderList,Items
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateList,Items
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateSpec,ContainerInfo
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateSpec,Parameters
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,AddHost
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,BuildVolumes
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,DropCapabilities
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,Environment
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,Injections
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,NodeAffinityValues
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,RuntimeArtifacts
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,SecurityOpt
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iRunList,Items
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,UserDefineTemplate,Parameters
API rule violation: names_match,k8s.io/api/core/v1,AzureDiskVolumeSource,DataDiskURI
API rule violation: names_match,k8s.io/api/core/v1,ContainerStatus,LastTerminationState
API rule violation: names_match,k8s.io/api/core/v1,DaemonEndpoint,Port
API rule violation: names_match,k8s.io/api/core/v1,Event,ReportingController
API rule violation: names_match,k8s.io/api/core/v1,FCVolumeSource,WWIDs
API rule violation: names_match,k8s.io/api/core/v1,GlusterfsPersistentVolumeSource,EndpointsName
API rule violation: names_match,k8s.io/api/core/v1,GlusterfsVolumeSource,EndpointsName
API rule violation: names_match,k8s.io/api/core/v1,ISCSIPersistentVolumeSource,DiscoveryCHAPAuth
API rule violation: names_match,k8s.io/api/core/v1,ISCSIPersistentVolumeSource,SessionCHAPAuth
API rule violation: names_match,k8s.io/api/core/v1,ISCSIVolumeSource,DiscoveryCHAPAuth
API rule violation: names_match,k8s.io/api/core/v1,ISCSIVolumeSource,SessionCHAPAuth
API rule violation: names_match,k8s.io/api/core/v1,NodeResources,Capacity
API rule violation: names_match,k8s.io/api/core/v1,NodeSpec,DoNotUse_ExternalID
API rule violation: names_match,k8s.io/api/core/v1,PersistentVolumeSource,CephFS
API rule violation: names_match,k8s.io/api/core/v1,PersistentVolumeSource,StorageOS
API rule violation: names_match,k8s.io/api/core/v1,PodSpec,DeprecatedServiceAccount
API rule violation: names_match,k8s.io/api/core/v1,RBDPersistentVolumeSource,CephMonitors
API rule violation: names_match,k8s.io/api/core/v1,RBDPersistentVolumeSource,RBDImage
API rule violation: names_match,k8s.io/api/core/v1,RBDPersistentVolumeSource,RBDPool
API rule violation: names_match,k8s.io/api/core/v1,RBDPersistentVolumeSource,RadosUser
API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,CephMonitors
API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RBDImage
API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RBDPool
API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RadosUser
API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,CephFS
API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,StorageOS
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyList,Items
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,Conditions
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyList,Items
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,Conditions
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object
......@@ -195,16 +35,24 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEve
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerConfig,Env
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerConfig,Labels
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,DockerConfig,Endpoint
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBinarySpec,MD5
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateSpec,Parameters
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,CGroupLimits
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,CallbackURL
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,ImageScriptsURL
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,ScriptsURL
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,SourceURL
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,DestinationRuleSpecTemplate,ObjectMeta
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,LastProbeTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,LastTransitionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Message
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Reason
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Status
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Type
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,CompletionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,Conditions
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,StartTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,LastProbeTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,LastTransitionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Message
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Reason
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Status
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Type
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategySpec,GovernorVersion
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategySpec,PrincipalVersion
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,CompletionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,Conditions
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,StartTime
此差异已折叠。
......@@ -22,9 +22,11 @@ import (
k8sruntime "k8s.io/apimachinery/pkg/runtime"
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
devopsv1alpha1 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
)
func Install(scheme *k8sruntime.Scheme) {
urlruntime.Must(devopsv1alpha1.AddToScheme(scheme))
urlruntime.Must(scheme.SetVersionPriority(devopsv1alpha1.SchemeGroupVersion))
urlruntime.Must(devopsv1alpha3.AddToScheme(scheme))
urlruntime.Must(scheme.SetVersionPriority(devopsv1alpha3.SchemeGroupVersion, devopsv1alpha1.SchemeGroupVersion))
}
此差异已折叠。
......@@ -273,7 +273,6 @@ func (c *Controller) syncHandler(key string) error {
}
}
if !reflect.DeepEqual(copyProject, project) {
_, err := c.kubesphereClient.DevopsV1alpha3().DevOpsProjects().Update(copyProject)
if err != nil {
......
......@@ -16,6 +16,7 @@ import (
"k8s.io/kube-openapi/pkg/common"
devopsinstall "kubesphere.io/kubesphere/pkg/apis/devops/crdinstall"
devopsv1alpha1 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
networkinstall "kubesphere.io/kubesphere/pkg/apis/network/crdinstall"
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
servicemeshinstall "kubesphere.io/kubesphere/pkg/apis/servicemesh/crdinstall"
......@@ -74,7 +75,9 @@ func main() {
mapper.AddSpecific(networkv1alpha1.SchemeGroupVersion.WithKind(networkv1alpha1.ResourceKindWorkspaceNetworkPolicy),
networkv1alpha1.SchemeGroupVersion.WithResource(networkv1alpha1.ResourcePluralWorkspaceNetworkPolicy),
networkv1alpha1.SchemeGroupVersion.WithResource(networkv1alpha1.ResourceSingularWorkspaceNetworkPolicy), meta.RESTScopeRoot)
mapper.AddSpecific(devopsv1alpha3.SchemeGroupVersion.WithKind(devopsv1alpha3.ResourceKindDevOpsProject),
devopsv1alpha3.SchemeGroupVersion.WithResource(devopsv1alpha3.ResourcePluralDevOpsProject),
devopsv1alpha3.SchemeGroupVersion.WithResource(devopsv1alpha3.ResourceSingularDevOpsProject), meta.RESTScopeRoot)
spec, err := lib.RenderOpenAPISpec(lib.Config{
Scheme: Scheme,
Codecs: Codecs,
......@@ -96,6 +99,7 @@ func main() {
tenantv1alpha1.GetOpenAPIDefinitions,
networkv1alpha1.GetOpenAPIDefinitions,
devopsv1alpha1.GetOpenAPIDefinitions,
devopsv1alpha3.GetOpenAPIDefinitions,
},
Resources: []schema.GroupVersionResource{
//TODO(runzexia) At present, the document generation requires the openapi structure of the go language,
......@@ -109,6 +113,7 @@ func main() {
devopsv1alpha1.SchemeGroupVersion.WithResource(devopsv1alpha1.ResourcePluralS2iBuilderTemplate),
devopsv1alpha1.SchemeGroupVersion.WithResource(devopsv1alpha1.ResourcePluralS2iBuilder),
networkv1alpha1.SchemeGroupVersion.WithResource(networkv1alpha1.ResourcePluralWorkspaceNetworkPolicy),
devopsv1alpha3.SchemeGroupVersion.WithResource(devopsv1alpha3.ResourcePluralDevOpsProject),
},
Mapper: mapper,
})
......
......@@ -86,15 +86,15 @@ func RenderOpenAPISpec(cfg Config) (string, error) {
{
// api router map
table := map[schema.GroupVersion]map[string]ResourceInfo{}
table := map[string]map[string]ResourceInfo{}
for _, gvr := range cfg.Resources {
var resmap map[string]ResourceInfo
// init ResourceInfo map
if m, found := table[gvr.GroupVersion()]; found {
if m, found := table[gvr.Group]; found {
resmap = m
} else {
resmap = map[string]ResourceInfo{}
table[gvr.GroupVersion()] = resmap
table[gvr.Group] = resmap
}
gvk, err := cfg.Mapper.KindFor(gvr)
......@@ -119,13 +119,15 @@ func RenderOpenAPISpec(cfg Config) (string, error) {
}
}
for gv, resmap := range table {
apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(gv.Group, cfg.Scheme, metav1.ParameterCodec, cfg.Codecs)
apiGroupInfo.MetaGroupVersion = &gv
storage := map[string]rest.Storage{}
for g, resmap := range table {
apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(g, cfg.Scheme, metav1.ParameterCodec, cfg.Codecs)
storage := map[string]map[string]rest.Storage{}
for r, stuff := range resmap {
storage[r] = NewREST(stuff)
storage[r+"/status"] = NewStatusREST(
if storage[stuff.gvk.Version] == nil {
storage[stuff.gvk.Version] = map[string]rest.Storage{}
}
storage[stuff.gvk.Version][r] = NewREST(stuff)
storage[stuff.gvk.Version][r+"/status"] = NewStatusREST(
StatusResourceInfo{
gvk: struct {
Group string
......@@ -135,8 +137,9 @@ func RenderOpenAPISpec(cfg Config) (string, error) {
obj: stuff.obj,
})
}
apiGroupInfo.VersionedResourcesStorageMap[gv.Version] = storage
for version, s := range storage {
apiGroupInfo.VersionedResourcesStorageMap[version] = s
}
if err := genericServer.InstallAPIGroup(&apiGroupInfo); err != nil {
log.Fatal(err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册