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

feat: Detect EC as a distribution #1529

Merged
merged 1 commit into from Apr 25, 2024

Conversation

banjoh
Copy link
Member

@banjoh banjoh commented Apr 25, 2024

Description, Motivation and Context

Detect Replicated's embedded cluster as a k8s distribution

Docs PR: replicatedhq/troubleshoot.sh#557

Using this spec

apiVersion: troubleshoot.sh/v1beta2
kind: Analyzer
spec:
  analyzers:
    - distribution:
        outcomes:
          - pass:
              when: "== embedded-cluster"
              message: embedded-cluster is supported
          - fail:
              message: There is no supported distribution

I get these results from a support bundle collected from EC

analyze --analyzers spec.yaml support-bundle-2024-04-25T14_24_51.tar.gz
Pass: Kubernetes Distribution
 embedded-cluster is supported

Checklist

  • New and existing tests pass locally with introduced changes.
  • Tests for the changes have been added (for bug fixes / features)
  • The commit message(s) are informative and highlight any breaking changes
  • Any documentation required has been added/updated. For changes to https://troubleshoot.sh/ create a PR here

Does this PR introduce a breaking change?

  • Yes
  • No

@banjoh banjoh added the type::feature New feature or request label Apr 25, 2024
@banjoh banjoh requested review from a team as code owners April 25, 2024 15:41
@@ -42,7 +42,7 @@ An initially unintended benefit of using the Aggregation Layer is that any HostC
* [microk8s implementation](https://github.com/canonical/microk8s/blob/master/build-scripts/patches/0000-Kubelite-integration.patch) - bundles slightly modified binaries
* [k0s uses upstream binaries statically compiled](https://docs.k0sproject.io/v1.23.8+k0s.0/architecture/) - bundles statically compiled binaries that self extract and uses a process monitor to run them

2. Can you in fact push metadat like "Status" into an api-server or do we have to write directly to etcd?
2. Can you in fact push metadata like "Status" into an api-server or do we have to write directly to etcd?
Copy link
Member Author

Choose a reason for hiding this comment

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

Note related to PR. Just correcting a typo

@@ -89,6 +97,66 @@ func Test_mustNormalizeDistributionName(t *testing.T) {
raw: "Docker-Desktop",
expected: dockerDesktop,
},
{
Copy link
Member Author

Choose a reason for hiding this comment

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

Here I'm just increasing test coverage

@banjoh banjoh merged commit a374b0a into replicatedhq:main Apr 25, 2024
27 checks passed
@banjoh banjoh deleted the em/detect-ec-distro branch April 25, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants