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

URI is not replacing the spec but merging instead #1486

Closed
ricardomaraschini opened this issue Feb 22, 2024 · 3 comments · Fixed by #1537 or #1541
Closed

URI is not replacing the spec but merging instead #1486

ricardomaraschini opened this issue Feb 22, 2024 · 3 comments · Fixed by #1537 or #1541
Assignees

Comments

@ricardomaraschini
Copy link
Contributor

Bug Description

When I use the spec.uri of a support bundle the documentation states the the version pointed by spec.uri replaces the spec but it is actually merging the two specs.

Expected Behavior

The version pointed by spec.uri replaces the version being applied.

Steps To Reproduce

  • Create a support bundle spec that points to a different one through its URI property.
  • Run with the --dry-run and inspect the merged result.
@chris-sanders
Copy link
Member

@ricardomaraschini do you have an example that demonstrates how you reproduce this?

@ricardomaraschini
Copy link
Contributor Author

@chris-sanders

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: embedded-cluster-kotsadm-support-bundle
  labels:
    troubleshoot.io/kind: support-bundle
spec:
  uri: https://gist.githubusercontent.com/ricardomaraschini/8311a61dcb6307559f7fed7db979ec90/raw/b37965b733b76370bb936cb306248f4f51db2952/yaml
  collectors:
  - logs:
      name: podlogs/kotsadm
      selector:
      - app=kotsadm
      limits:
        maxAge: 720h

@ricardomaraschini
Copy link
Contributor Author

For completenes:

root@ec:~# kubectl support-bundle ./bundle-you-see-above.yaml --dry-run
apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  creationTimestamp: null
  name: merged-support-bundle-spec
spec:
  collectors:
  - logs:
      limits:
        maxAge: 720h
        sinceTime: null
      name: podlogs/kotsadm
      selector:
      - app=kotsadm
  - logs:
      limits:
        maxAge: 720h
        sinceTime: null
      name: podlogs/kotsadm
      selector:
      - app=another
  - clusterInfo: {}
  - clusterResources: {}
status: {}
root@ec:~#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants