Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 2144a66

Browse files
authored
Merge pull request #168 from gr455/oam/versioning
Add version to components
2 parents d02e0ca + c29b736 commit 2144a66

File tree

117 files changed

+133
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+133
-131
lines changed

.github/install/deploy.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ services:
33
osm:
44
type: OSMMesh
55
namespace: osm
6-
settings:
7-
version: #will be inserted dynamically
6+
version: #will be inserted dynamically

.github/workflows/e2etest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Change service mesh version in patternfile
4040
run: |
4141
42-
yq e -i '.services.osm.settings.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
42+
yq e -i '.services.osm.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
4343
cat ./.github/install/deploy.yaml
4444
- name: Uploading file
4545
uses: actions/upload-artifact@v2

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ replace (
99
)
1010

1111
require (
12-
github.com/layer5io/meshery-adapter-library v0.5.7
13-
github.com/layer5io/meshkit v0.5.20
12+
github.com/layer5io/meshery-adapter-library v0.5.8
13+
github.com/layer5io/meshkit v0.5.32
1414
github.com/layer5io/service-mesh-performance v0.3.4
1515
gopkg.in/yaml.v2 v2.4.0
1616
k8s.io/apimachinery v0.23.5
@@ -64,7 +64,7 @@ require (
6464
github.com/gogo/protobuf v1.3.2 // indirect
6565
github.com/golang/protobuf v1.5.2 // indirect
6666
github.com/google/btree v1.0.1 // indirect
67-
github.com/google/go-cmp v0.5.7 // indirect
67+
github.com/google/go-cmp v0.5.8 // indirect
6868
github.com/google/gofuzz v1.2.0 // indirect
6969
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
7070
github.com/google/uuid v1.3.0 // indirect
@@ -151,8 +151,8 @@ require (
151151
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
152152
google.golang.org/api v0.74.0 // indirect
153153
google.golang.org/appengine v1.6.7 // indirect
154-
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect
155-
google.golang.org/grpc v1.45.0 // indirect
154+
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
155+
google.golang.org/grpc v1.46.0 // indirect
156156
google.golang.org/protobuf v1.28.0 // indirect
157157
gopkg.in/gorp.v1 v1.7.2 // indirect
158158
gopkg.in/inf.v0 v0.9.1 // indirect

go.sum

Lines changed: 11 additions & 97 deletions
Large diffs are not rendered by default.

osm/oam.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ func handleComponentOSMMesh(h *Handler, comp v1alpha1.Component, isDel bool, kub
8989
// Get the osm version from the settings
9090
// we are sure that the version of osm would be present
9191
// because the configuration is already validated against the schema
92-
version := comp.Spec.Settings["version"].(string)
92+
version := comp.Spec.Version
93+
if version == "" {
94+
return "", fmt.Errorf("pass valid version inside service for OSM installation")
95+
}
96+
//TODO: When no version is passed in service, use the latest OSM version
9397

9498
msg, err := h.installOSM(isDel, version, comp.Namespace, kubeconfigs)
9599
if err != nil {

templates/oam/workloads/osmmesh.meshery.layer5io.schema.json

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

templates/oam/workloads/osmmesh_definition.json

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

templates/oam/workloads/v0.0.1/osmmesh.meshery.layer5io.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$id": "http://meshery.layer5.io/definition/Workload/OSMMesh",
33
"$schema": "http://json-schema.org/draft-07/schema",
44
"properties": {},
5+
"required": [],
56
"title": "OSMMesh",
67
"type": "object"
78
}

templates/oam/workloads/v0.0.1/osmmesh_definition.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"name": "osmmesh.meshery.layer5.io"
1010
},
1111
"metadata": {
12+
"@type": "pattern.meshery.io/core",
1213
"version": "v0.0.1"
1314
}
1415
}

templates/oam/workloads/v0.0.10/osmmesh.meshery.layer5io.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$id": "http://meshery.layer5.io/definition/Workload/OSMMesh",
33
"$schema": "http://json-schema.org/draft-07/schema",
44
"properties": {},
5+
"required": [],
56
"title": "OSMMesh",
67
"type": "object"
78
}

0 commit comments

Comments
 (0)