Skip to content

Commit

Permalink
Merge pull request #141 from gr455/oam/versioning
Browse files Browse the repository at this point in the history
Add version to components
  • Loading branch information
Revolyssup authored Aug 5, 2022
2 parents 5b96571 + eff14f5 commit 52881f2
Show file tree
Hide file tree
Showing 25 changed files with 212 additions and 125 deletions.
4 changes: 2 additions & 2 deletions .github/install/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ services:
nginx:
type: NginxMesh
namespace: meshery
settings:
version: #will be inserted dynamically
version: #will be inserted dynamically

2 changes: 1 addition & 1 deletion .github/workflows/e2etests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
excludes: prerelease, draft, edge
- name: Change service mesh version in patternfile
run: |
yq e -i '.services.nginx.settings.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
yq e -i '.services.nginx.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
cat ./.github/install/deploy.yaml
- name: Uploading file
uses: actions/upload-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ replace (
)

require (
github.com/layer5io/meshery-adapter-library v0.5.7
github.com/layer5io/meshkit v0.5.28
github.com/layer5io/meshery-adapter-library v0.5.8
github.com/layer5io/meshkit v0.5.31
github.com/layer5io/service-mesh-performance v0.3.4
gopkg.in/yaml.v2 v2.4.0
k8s.io/apimachinery v0.23.5
Expand Down
98 changes: 4 additions & 94 deletions go.sum

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion nginx/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ func handleComponentNginxMesh(c *Nginx, comp v1alpha1.Component, isDelete bool,
// Get the Nginx version from the settings
// we are sure that the version of Nginx would be present
// because the configuration is already validated against the schema
version := comp.Spec.Settings["version"].(string)
version := comp.Spec.Version
if version == "" {
return "", fmt.Errorf("pass valid version inside service for Nginx SM installation")
}
//TODO: When no version is passed in service, use the latest Nginx SM version

msg, err := c.installNginx(isDelete, version, comp.Namespace, kubeconfigs)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.1.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.1.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.2.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.2.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.2.1/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.2.1"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.3.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.3.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.3.1/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.3.1"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.4.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.4.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.4.1/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.4.1"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.5.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.5.0"
}
}
}
13 changes: 0 additions & 13 deletions templates/oam/workloads/nginxmesh.meshery.layer5io.schema.json

This file was deleted.

12 changes: 0 additions & 12 deletions templates/oam/workloads/nginxmesh_definition.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/NginxMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "NginxMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/v1.4.0/nginxmesh_definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"apiVersion": "core.oam.dev/v1alpha1",
"kind": "WorkloadDefinition",
"metadata": {
"name": "NginxMesh"
},
"spec": {
"definitionRef": {
"name": "nginxmesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "v1.4.0"
}
}
}

0 comments on commit 52881f2

Please sign in to comment.