This message was deleted.
# fleet
a
This message was deleted.
s
you could combine both manifests into one with namespace at the top.
h
Thanks for your answer. I guess it works for my example but what if my app is more complex, like a custom configmap per environment, in different overlays/env folders ? I can't combine all manifest into one yaml file
s
then you need to use the
dependsOn
functionality in the fleet.yaml
👍 1
Copy code
# dependsOn allows you to configure dependencies to other bundles. The current bundle
# will only be deployed, after all dependencies are deployed and in a Ready state.
dependsOn:
  # Format: <GITREPO-NAME>-<BUNDLE_PATH> with all path separators replaced by "-"
  # Example: GitRepo name "one", Bundle path "/multi-cluster/hello-world" => "one-multi-cluster-hello-world"
  - name: one-multi-cluster-hello-world
  # Select bundles to depend on based on their label.
  - selector:
      matchLabels:
        app: weak-monkey
thats how you can get different bundles to be applied in a specific order
h
I managed to split my app into two bundles so I can create the namespace first but I'm facing this issue: https://github.com/rancher/fleet/issues/1484. My second bundle is a helm chart and the namespace requires PSA annotations
s
can you add the annotations to the namespace manifest?
h
I can but the second bundle tries to create the namespace while deploying the helm chart and fails as some annotations on the namespace are referring to the first bundle
s
doh
yeah that might need an RFE
hrmm
what about an overlay that patches the namespace?
Copy code
# If using raw YAML these are names that map to overlays/{name} that will be used
  # to replace or patch a resource. If you wish to customize the file ./subdir/resource.yaml
  # then a file ./overlays/myoverlay/subdir/resource.yaml will replace the base file.
  # A file named ./overlays/myoverlay/subdir/resource_patch.yaml will patch the base file.
  # A patch can in JSON Patch or JSON Merge format or a strategic merge patch for builtin
  # Kubernetes types. Refer to "Raw YAML Resource Customization" below for more information.
  yaml:
    overlays:
    - custom2
    - custom3
so namespace.yaml and namespace_patch.yaml in the overlay that has the annotations it needs.
h
i'm gonna try but I think the main issue is "When we install apps via fleet using the helm install way - this automatically creates the namespace for it" (From the issue linked above) and there is no way to disable or customize the namespace.
147 Views