Skip to content

Commit

Permalink
Merge pull request #368 from Revolyssup/schemas
Browse files Browse the repository at this point in the history
Schemas
  • Loading branch information
leecalcote committed Jan 24, 2022
2 parents 7dd50c6 + 756714c commit b5c1963
Show file tree
Hide file tree
Showing 4,814 changed files with 549,584 additions and 270,477 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 4 additions & 3 deletions build/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var DefaultGenerationMethod string
var DefaultGenerationURL string
var LatestVersion string
var WorkloadPath string
var AllVersions []string

//NewConfig creates the configuration for creating components
func NewConfig(version string) manifests.Config {
Expand All @@ -37,11 +38,11 @@ func NewConfig(version string) manifests.Config {
func init() {
wd, _ := os.Getwd()
WorkloadPath = filepath.Join(wd, "templates", "oam", "workloads")
versions, _ := utils.GetLatestReleaseTagsSorted("istio", "istio")
if len(versions) == 0 {
AllVersions, _ = utils.GetLatestReleaseTagsSorted("istio", "istio")
if len(AllVersions) == 0 {
return
}
LatestVersion = versions[len(versions)-1]
LatestVersion = AllVersions[len(AllVersions)-1]
DefaultGenerationMethod = adapter.Manifests
DefaultGenerationURL = "https://raw.githubusercontent.com/istio/istio/" + LatestVersion + "/manifests/charts/base/crds/crd-all.gen.yaml"
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ replace (
require (
github.com/aspenmesh/istio-vet v0.0.0-20200806222806-9c8e9a962b9f
github.com/layer5io/meshery-adapter-library v0.5.2
github.com/layer5io/meshkit v0.5.1
github.com/layer5io/meshkit v0.5.2
github.com/layer5io/service-mesh-performance v0.3.3
gopkg.in/yaml.v2 v2.4.0
istio.io/client-go v1.12.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ github.com/layer5io/meshery-adapter-library v0.5.2 h1:xjXaIZc96oKxIOWpydsYz0CJoV
github.com/layer5io/meshery-adapter-library v0.5.2/go.mod h1:OkeWQDI1r+TAvuJO7obHDjBkBcUWzWSftSHArg3afwY=
github.com/layer5io/meshkit v0.5.1 h1:zF4PvtxpWhq7Lw3/ysqya03hMtu3cEqWejgBFyd0tWY=
github.com/layer5io/meshkit v0.5.1/go.mod h1:2o6I6N7XmupMvJRb1gqlRBIf51GIUqwCzPCGarZxIRU=
github.com/layer5io/meshkit v0.5.2 h1:pTKQTHEIrLTEU8c9ScDXcFn5zjORvu83oeV50dY24N4=
github.com/layer5io/meshkit v0.5.2/go.mod h1:2o6I6N7XmupMvJRb1gqlRBIf51GIUqwCzPCGarZxIRU=
github.com/layer5io/service-mesh-performance v0.3.2-0.20210122142912-a94e0658b021/go.mod h1:W153amv8aHAeIWxO7b7d7Vibt9RhaEVh4Uh+RG+BumQ=
github.com/layer5io/service-mesh-performance v0.3.2/go.mod h1:W153amv8aHAeIWxO7b7d7Vibt9RhaEVh4Uh+RG+BumQ=
github.com/layer5io/service-mesh-performance v0.3.3 h1:KtouYXg64y+G0soPJwDeB0sM6PXolBpkV6Ke15aqwmk=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ func registerWorkloads(port string, log logger.Handler) {
DirName: version,
Config: build.NewConfig(version),
})

if err != nil {
log.Info("Failed to generate components for version "+version, "ERR: ", err.Error())
return
}

//The below log is checked in the workflows. If you change this log, reflect that change in the workflow where components are generated
log.Info("Component creation completed for version ", version)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
{
"description": "Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html",
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"provider"
]
}
]
}
},
{
"required": [
"provider"
]
}
],
"properties": {
"action": {
"description": "Optional.",
"enum": [
"ALLOW",
"DENY",
"AUDIT",
"CUSTOM"
],
"type": "string"
},
"provider": {
"description": "Specifies detailed configuration of the CUSTOM action.",
"properties": {
"name": {
"description": "Specifies the name of the extension provider.",
"format": "string",
"type": "string"
}
},
"type": "object"
},
"rules": {
"description": "Optional.",
"items": {
"properties": {
"from": {
"description": "Optional.",
"items": {
"properties": {
"source": {
"description": "Source specifies the source of a request.",
"properties": {
"ipBlocks": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"namespaces": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notIpBlocks": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notNamespaces": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notPrincipals": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notRemoteIpBlocks": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notRequestPrincipals": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"principals": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"remoteIpBlocks": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"requestPrincipals": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"to": {
"description": "Optional.",
"items": {
"properties": {
"operation": {
"description": "Operation specifies the operation of a request.",
"properties": {
"hosts": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"methods": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notHosts": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notMethods": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notPaths": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"notPorts": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"paths": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"ports": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"when": {
"description": "Optional.",
"items": {
"properties": {
"key": {
"description": "The name of an Istio attribute.",
"format": "string",
"type": "string"
},
"notValues": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
},
"values": {
"description": "Optional.",
"items": {
"format": "string",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"selector": {
"description": "Optional.",
"properties": {
"matchLabels": {
"additionalProperties": {
"format": "string",
"type": "string"
},
"type": "object"
}
},
"type": "object"
}
},
"title": "Authorization Policy",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "WorkloadDefinition",
"apiVersion": "core.oam.dev/v1alpha1",
"metadata": {
"name": "AuthorizationPolicy",
"creationTimestamp": null
},
"spec": {
"definitionRef": {
"name": "authorizationpolicy.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/mesh/workload",
"k8sAPIVersion": "security.istio.io/v1beta1",
"k8sKind": "AuthorizationPolicy",
"meshName": "ISTIO",
"meshVersion": "1.10.0-alpha.0"
}
}
}
Loading

0 comments on commit b5c1963

Please sign in to comment.