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

[kubernetes] Add support for k8s snap #3842

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

arif-ali
Copy link
Member

Also, fix command for microk8s, and use variable


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

@arif-ali arif-ali added this to the 4.8.2 milestone Nov 18, 2024
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3842
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Comment on lines 43 to 48
f"{k8s_common}/var/lib/k8s-dqlite/info.yaml",
f"{k8s_common}/var/lib/k8s-dqlite/cluster.yaml",
f"{k8s_common}/var/lib/k8sd/state/truststore/k8s.yaml",
f"{k8s_common}/var/lib/k8sd/state/database/info.yaml",
f"{k8s_common}/var/lib/k8sd/state/database/cluster.yaml",
f"{k8s_common}/var/lib/k8sd/state/daemon.yaml",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yaml files cant contain any credentials worth to postproc, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have gone through these files maually twice :), and there isn't anything to obfuscate, except for /var/snap/k8s/common/var/lib/k8sd/state/truststore/k8s.yaml, which I've already added in postproc()

I am now getting all of this verified by our k8s SMEs to ensure we got everything

@TurboTurtle
Copy link
Member

Plugin looks fine. My only concern is around naming. We have kubernetes as well as microk8s already today. k8s is a well-known shorthand for kubernetes, so it may start being a little opaque what plugin collects what for "$defacto_standard_container_orchestration_platform"

@arif-ali
Copy link
Member Author

Plugin looks fine. My only concern is around naming. We have kubernetes as well as microk8s already today. k8s is a well-known shorthand for kubernetes, so it may start being a little opaque what plugin collects what for "$defacto_standard_container_orchestration_platform"

Happy to change it to canonical_k8s if that would be better, or rather we just add the relevant tests and collect in the kubernetes plugin.

I'm not precious in any way, as long as we collect the info, which is the main ethos here

@arif-ali
Copy link
Member Author

I've moved it now to the kubernetes.py plugin, hopefully that makes much more sense. Always good to think outside of the box, and this does make better sense.

This also made me realise that we were collecting a folder, and obfuscating the said folder. So, actually needed less code adding.

Maybe we can also move the microk8s here, and have everything under the one umbrella, I'll leave that thought here, and see what others think

Also, fix command for microk8s, and use variable

Signed-off-by: Arif Ali <[email protected]>
@arif-ali arif-ali added Canonical Eng Canonical Engineering for review Needs Review Review required and removed Canonical Eng Canonical Engineering for review labels Nov 20, 2024
@arif-ali arif-ali marked this pull request as ready for review November 22, 2024 21:16
@TurboTurtle TurboTurtle added ACK (Ready for merge) and removed Needs Review Review required labels Nov 23, 2024
@TurboTurtle TurboTurtle merged commit 0c70fa9 into sosreport:main Nov 23, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants