This message was deleted.
# fleet
a
This message was deleted.
g
Copy code
targetCustomizations:
- name: bigip
  clusterSelector:
    matchLabels:
      platform: one
  kustomize:
    dir: overlay/bigip
 
- name: harbor
  clusterSelector:
    matchLabels:
      platform: one
  kustomize:
    dir: overlay/harbor

- name: logging
  clusterSelector:
    matchLabels:
      platform: one
  kustomize:
    dir: overlay/logging
there's my fleet.yaml
Here's the overlay kustomization.yaml under overlay/bigip
Copy code
resources:
- ../../base

patches:
  - target:
      kind: Flow
      name: flow
    patch: |-
      - op: replace
        path: /metadata/name
        value: bigip-flow
      - op: replace
        path: /metadata/namespace
        value: bigip
      - op: replace
        path: /spec/localOutputRefs/0
        value: "bigip-output"

  - target:
      kind: Output
      name: output
    patch: |-
      - op: replace
        path: /metadata/name
        value: bigip-output
      - op: replace
        path: /metadata/namespace
        value: bigip
      - op: replace
        path: /spec/cloudwatch/log_group_name
        value: bigip     
      - op: replace
        path: /spec/cloudwatch/log_stream_name
        value: bigip

  - target:
      kind: Secret
      name: aws-access
    patch: |-
      - op: replace
        path: /metadata/namespace
        value: bigip
And here's the kustomiztion.yaml under overlay/harbor
Copy code
resources:
- ../../base

patches:
  - target:
      kind: Flow
      name: flow
    patch: |-
      - op: replace
        path: /metadata/name
        value: harbor-flow
      - op: replace
        path: /metadata/namespace
        value: harbor
      - op: replace
        path: /spec/localOutputRefs/0
        value: "harbor-output"

  - target:
      kind: Output
      name: output
    patch: |-
      - op: replace
        path: /metadata/name
        value: harbor-output
      - op: replace
        path: /metadata/namespace
        value: harbor
      - op: replace
        path: /spec/cloudwatch/log_group_name
        value: harbor     
      - op: replace
        path: /spec/cloudwatch/log_stream_name
        value: harbor

  - target:
      kind: Secret
      name: aws-access
    patch: |-
      - op: replace
        path: /metadata/namespace
        value: harbor
The problem is creating 2 separate outputs and flows from Rancher logging. They both work separately and I can apply both with (kubectl apply -k). For some reason fleet doesn't know to tread them individually and thus only creates other one of those. Even tho Rancher displays that it has all the resources ready, including the harbor specific ones.
i
I faced the same issue and didn't find a way to workaround
g
I actually figured it out. You need to have them as separate repos and use Path in the repo-configuration. When pointing to a basefile it only does the patching once. So for every application or namespace you have to create their own fleet repo.
i
oh i see.. it makes sense, thanks Oskari