solo-io / service-mesh-extensions

A public registry of all service mesh extensions and other content for the Service Mesh Hub.
Apache License 2.0
14 stars 6 forks source link

Add "application requirements" #45

Closed rickducott closed 5 years ago

rickducott commented 5 years ago

To install istio as an application (see https://github.com/solo-io/service-mesh-hub/issues/44), we need to be able to model the fact that we need to install "istio-init" before installing "istio".

We could model it like this, for example:

// Represents a set of requirements that all need to be satisfied.
message RequirementSet {
    MeshRequirement mesh_requirement = 1;
    repeated ApplicationRequirement application_requirements = 2;
}

// Represents the requirement for a mesh to be installed.
message MeshRequirement {
    // Type of mesh
    MeshType mesh_type = 1;
    // Range of allowed versions. If empty, any version is allowed.
    AllowedVersions versions = 2;
}

message ApplicationRequirement {
    string name = 1;
    AllowedVersions versions = 2;
}

Then in the registry we could do something like this:

specs:
  - applicationCreator: Istio
    logoUrl: https://avatars3.githubusercontent.com/u/23534644?s=200&v=4
    longDescription: |
      Connect, secure, control, and observe services.
    name: istio
    shortDescription: |
      Connect, secure, control, and observe services.
    versions:
      - githubChart:
          org: istio
          repo: istio
          ref: 1.1.6
          directory: install/kubernetes/helm/istio
        flavors:
          - name: default
            description: "Install istio mesh with default options"
            requirementSets: 
            - applicationRequirements: 
              - name: istio-init
                 allowedVersions:
                   minVersion: "1.1.6"
                   maxVersion: "1.1.6"
        version: "1.1.6"
  - applicationCreator: Istio-init
    logoUrl: https://avatars3.githubusercontent.com/u/23534644?s=200&v=4
    longDescription: |
      Connect, secure, control, and observe services.
    name: istio-init
    shortDescription: |
      Connect, secure, control, and observe services.
    versions:
      - githubChart:
          org: istio
          repo: istio
          ref: 1.1.6
          directory: install/kubernetes/helm/istio-init
        flavors:
          - name: default
            description: "Initialize istio mesh with default options"
        version: "1.1.6"
rickducott commented 5 years ago

Went a different direction for the istio example, modeled as a multi-step installation spec.