Skip to content

Commit

Permalink
Merge pull request #304 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 81d8ed0 + 31a25eb commit e8b34f8
Show file tree
Hide file tree
Showing 23 changed files with 190 additions and 157 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:
kuma:
type: KumaMesh
namespace: kuma
settings:
version: #will be inserted dynamically
version: #will be inserted dynamically

2 changes: 1 addition & 1 deletion .github/workflows/e2etest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Change service mesh version in patternfile
run: |
yq e -i '.services.kuma.settings.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
yq e -i '.services.kuma.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 @@ -11,8 +11,8 @@ replace (
)

require (
github.com/layer5io/meshery-adapter-library v0.5.7
github.com/layer5io/meshkit v0.5.30
github.com/layer5io/meshery-adapter-library v0.5.8
github.com/layer5io/meshkit v0.5.32
github.com/layer5io/service-mesh-performance v0.3.4
gopkg.in/yaml.v2 v2.4.0
k8s.io/apimachinery v0.23.6
Expand Down
130 changes: 4 additions & 126 deletions go.sum

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion kuma/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ func handleComponentKumaMesh(kuma *Kuma, comp v1alpha1.Component, isDel bool, ku
// Get the kuma version from the settings
// we are sure that the version of kuma 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 Istio installation")
}
//TODO: When no version is passed in service, use the latest Kuma version

msg, err := kuma.installKuma(isDel, false, comp.Namespace, version, 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/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.2.2/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.2.2"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.3.0/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.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/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.3.1/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.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/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.4.0/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.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/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.4.1/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.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/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.5.0/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.5.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.5.1/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.5.1"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$id": "http://meshery.layer5.io/definition/Workload/KumaMesh",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "KumaMesh",
"type": "object"
}
16 changes: 16 additions & 0 deletions templates/oam/workloads/1.6.0/kumamesh_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": "KumaMesh"
},
"spec": {
"definitionRef": {
"name": "kumamesh.meshery.layer5.io"
},
"metadata": {
"@type": "pattern.meshery.io/core",
"version": "1.6.0"
}
}
}
13 changes: 0 additions & 13 deletions templates/oam/workloads/kumamesh.meshery.layer5io.schema.json

This file was deleted.

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

This file was deleted.

0 comments on commit e8b34f8

Please sign in to comment.