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

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

Open
Elyytscha opened this issue Apr 5, 2022 · 0 comments
Open

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

Elyytscha opened this issue Apr 5, 2022 · 0 comments

Comments

@Elyytscha
Copy link
Contributor

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

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

No branches or pull requests

1 participant