Skip to content

Commit

Permalink
Merge pull request #185 from lolverae/master
Browse files Browse the repository at this point in the history
Upgrade meshkit with meshmodel changes
  • Loading branch information
Revolyssup authored Mar 6, 2023
2 parents 306f529 + ab39c1e commit 20adb52
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ replace (
require (
github.com/google/uuid v1.3.0
github.com/layer5io/meshery-adapter-library v0.6.3
github.com/layer5io/meshkit v0.6.11
github.com/layer5io/meshkit v0.6.17
github.com/layer5io/service-mesh-performance v0.3.4
gopkg.in/yaml.v2 v2.4.0
k8s.io/apimachinery v0.25.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ github.com/layer5io/meshery-adapter-library v0.6.3 h1:5tsbgrB1q84X2rM1TsRVe3pSBZ
github.com/layer5io/meshery-adapter-library v0.6.3/go.mod h1:x9/295iLiWab88uOwjgyZbJTX8aqkxfUlVZhqQKabew=
github.com/layer5io/meshkit v0.6.11 h1:VS2k34BALzYzHbsikyqii7J/v9bDKC4QdfHjeBgocnU=
github.com/layer5io/meshkit v0.6.11/go.mod h1:9ZXmiP0dxRCNlVYgchrOnfFcNrdHVXuayiuN8RRTQ68=
github.com/layer5io/meshkit v0.6.17 h1:1AsEo59R8q3xhYSpQWAXkoVkbOpexvLFVzuQYVmKk/E=
github.com/layer5io/meshkit v0.6.17/go.mod h1:9ZXmiP0dxRCNlVYgchrOnfFcNrdHVXuayiuN8RRTQ68=
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.4 h1:aw/elsx0wkry7SyiQRIj31wW7TPCP4YfhINdNOLXVg8=
github.com/layer5io/service-mesh-performance v0.3.4/go.mod h1:W153amv8aHAeIWxO7b7d7Vibt9RhaEVh4Uh+RG+BumQ=
Expand Down
10 changes: 2 additions & 8 deletions nginx/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ func handleNginxCoreComponents(
kind string,
kubeconfigs []string) (string, error) {
if apiVersion == "" {
apiVersion = getAPIVersionFromComponent(comp)
apiVersion = v1alpha1.GetAPIVersionFromComponent(comp)
if apiVersion == "" {
return "", ErrNginxCoreComponentFail(fmt.Errorf("failed to get API Version for: %s", comp.Name))
}
}

if kind == "" {
kind = getKindFromComponent(comp)
kind = v1alpha1.GetKindFromComponent(comp)
if kind == "" {
return "", ErrNginxCoreComponentFail(fmt.Errorf("failed to get kind for: %s", comp.Name))
}
Expand Down Expand Up @@ -210,12 +210,6 @@ func handleNginxCoreComponents(

return msg, c.applyManifest(yamlByt, isDel, comp.Namespace, kubeconfigs)
}
func getAPIVersionFromComponent(comp v1alpha1.Component) string {
return comp.Annotations["pattern.meshery.io.mesh.workload.k8sAPIVersion"]
}
func getKindFromComponent(comp v1alpha1.Component) string {
return comp.Annotations["pattern.meshery.io.mesh.workload.k8sKind"]
}

func mergeErrors(errs []error) error {
if len(errs) == 0 {
Expand Down

0 comments on commit 20adb52

Please sign in to comment.