Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

[Question]Can different workloads be selected? #149

@wenxinnnnn

Description

@wenxinnnnn

In order to meet the needs of each service of our microservices to mount the sidecar of consul-client.

I tried to develop a SidecarSetWorkload for the catalog, but I needed a differentiated choice of pod to mount the sidecar. I saw a related issue: #136, Do I have any other solutions?

apiVersion: core.oam.dev/v1alpha2
kind: Component
metadata:
  name: myService-Sidecar
spec:
  workload:
    apiVersion: core.oam.dev/v1alpha2
    kind: SidecarSetWorkload
    metadata:
      name: sonsul-client-sidecar
    spec:
      selector:
        matchLabels:
          app: myService
      containers:
       - name: consul
         image: consul:1.3.1
         args:
         - "agent"
         - "-data-dir=/consul/data"
         - "-advertise=$(PODIP)"
         - "-client=0.0.0.0"
         - "-node=activity-system-$(PODIP)"
         - "-retry-join=consul-service"
         - "-domain=cluster.local"
         - "-disable-host-node-id"
         ...
    parameters:
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions