Skip to content

Add Support for Servicemesh (redhat servicemesh, istio) #366

@Elyytscha

Description

@Elyytscha

Feature Request

Is your feature request related to a problem?

No

Describe the solution you'd like

Integrate RuntimeComponent into servicemesh (redhat, istio)

maybe like:

apiVersion: rc.app.stacks/v1beta2
kind: RuntimeComponent
metadata:
  annotations:
    sidecar.istio.io/inject: "true"
  name: my-app
spec:
  applicationImage: quay.io/my-repo/my-app:1.0
  service:
    type: ClusterIP
    port: 9080
  expose: true
  servicemesh:
    enabled: true
    

then enroll RuntimeComponent's namespace in servicemesh via ServicemeshMember

and create service mesh resources for runtime component

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: <RuntimeComponent.Name>-gateway
  namespace: <RuntimeComponent.Namespace>
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
      - <RuntimeComponent.Name>-<RuntimeComponent.Namespace>.<ClusterDomain>
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: <RuntimeComponent.Name>
  namespace: <RuntimeComponent.Namespace>
spec:
  hosts:
    -  <RuntimeComponent.Name>-<RuntimeComponent.Namespace>.<ClusterDomain>
  gateways:
  - <RuntimeComponent.Name>-gateway
  http:
  - name: <RuntimeComponent.Name>
    route:
    - destination:
        host: <RuntimeComponent.Servicename>
        port:
          number: <RuntimeComponent.Port>

more configuration options in RuntimeComponent Resource for Servicemesh should be discussed if needed, wanted, good to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions