Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spec path #328

Merged
merged 2 commits into from
Jul 19, 2023
Merged

Update spec path #328

merged 2 commits into from
Jul 19, 2023

Conversation

MUzairS15
Copy link
Contributor

Description
This PR ensures components registered dynamically and statically have the same schema, currently, there are discrepancies, resulting in deployment issues.
Some components are deployed like Istio, because the schema doesn't mark spec as a required field hence, it passes pattern-engine validation as well as k8s, but there's a warning and deployed resource is of no use.

Deployments Screenshot 2023-07-19 at 2 37 50 PM Screenshot 2023-07-19 at 2 47 55 PM Deployed with spec attribute in the design file Screenshot 2023-07-19 at 2 47 55 PM

AlertManger has "spec" as a required field in their schema, therefore even if the static AlertManger comp omits the spec attribute, deployment fails with the error: Alertmanager.monitoring.coreos.com "alertmanager" is invalid: spec: Required value (returned from k8s).

Sample design
name: Untitled Design
services:
  alertmanager:
    name: alertmanager
    type: Alertmanager
    apiVersion: monitoring.coreos.com/v1
    namespace: default
    model: kube-prometheus-stack
    settings:
        alertmanager Config Matcher Strategy:
          type: None
        image: quay.io/prometheus/alertmanager:v0.25.0
        port Name: web
        retention: 120h
    traits:
      meshmap:
        edges: []
        id: f5340528-3a36-46da-a336-325f779b759f
        label: alertmanager
        meshmodel-data:
          category:
            metadata: null
            name: Observability and Analysis
          displayName: Kube Prometheus Stack
          metadata:
            svgColor: ui/public/static/img/meshmodels/kube-prometheus-stack/color/alertmanager-color.svg
            svgWhite: ui/public/static/img/meshmodels/kube-prometheus-stack/white/alertmanager-white.svg
          name: kube-prometheus-stack
          version: 45.7.1
        meshmodel-metadata:
          genealogy: ""
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/examples/graduated.md#prometheus-logos
          model: kube-prometheus-stack
          modelDisplayName: Kube Prometheus Stack
          primaryColor: '#e75225'
          published: true
          secondaryColor: '#ec7551'
          shape: circle
          styleOverrides: ""
          subCategory: Monitoring
          svgColor: ui/public/static/img/meshmodels/kube-prometheus-stack/color/alertmanager-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kube-prometheus-stack/white/alertmanager-white.svg
        position:
          posX: 2.434789490733465
          posY: 88.81485589759697
Check out both branches and regenerate comp and try creating a new design, it will be deployed correctly.

Notes for Reviewers
Signed commits

  • Yes, I signed my commits.

Signed-off-by: MUzairS15 <muzair.shaikh810@gmail.com>
Signed-off-by: MUzairS15 <muzair.shaikh810@gmail.com>
@MUzairS15
Copy link
Contributor Author

MUzairS15 commented Jul 19, 2023

TODO: Requires changes in all adapters.

@MUzairS15
Copy link
Contributor Author

This will also resolve the issue faced by @asubedy , (Istio CRD is deployed manually but still have to wait for dynamic registration to complete.)

@leecalcote leecalcote merged commit 2f2de37 into meshery:master Jul 19, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants