jewertow / federation

0 stars 1 forks source link

Parse input configuration #1

Closed jewertow closed 1 day ago

jewertow commented 6 days ago

For simplicity, we will not implement our CRDs, e.g. MeshPeer, Exported/ImportedServiceSet in first versions of the federation controller. Instead, we will pass these configs as an argument to the federation-controller container, like below:

    spec: 
      containers: 
      - name: federation-controller
        args: 
        - "--meshPeers"
        - |
          - spec: 
              remote: 
                addresses: 
                - lb-1234567890.us-east-1.elb.amazonaws.com
                - 192.168.10.56
                ports: 
                  dataPlane: 15443
                  discovery: 15020
        - "--exportedServiceSet"
        - |
          rules: 
          - type: LabelSelector
            labelSelectors: 
            - matchLabels: 
                export-service: "true"
            - matchExpressions: {}
        - "--importedServiceSet"
        - |
          rules: 
          - type: LabelSelector
            labelSelectors: 
            - matchLabels: 
                export-service: "true"
            - matchExpressions: {}

These configs should be parsed into an exported Go structure located in internal/pkg/config and then used by other components.

Guillaume-Villain commented 5 days ago

i try to take this one

jewertow commented 1 day ago

Done in #6