Skip to content

Allow to build certain packages on non-Linux platforms #16843

@tklauser

Description

@tklauser

Following up on #16679 (review)

While building Cilium itself only makes sense for Linux, certain packages are imported by other projects - namely hubble and cilium-cli. These projects are also built for other platforms, mainly macOS and Windows. Moreover, some Cilium developers use macOS and might want to be able to at least build and unit test certain non-Linux-specific bits of Cilium on their development machines without running a VM.

This issue is about compiling a list of packages that should be buildable on non-Linux platforms (though maybe with certain features stubbed out), fixing these packages to build on all platforms and adding a CI test ensuring that future changes don't break them.

Preliminary list of packages

Direct dependencies in cilium-cli and hubble

  • api/v1/flow
  • api/v1/models
  • api/v1/observer
  • api/v1/peer
  • api/v1/recorder
  • api/v1/relay
  • pkg/hubble/api/v1
  • pkg/hubble/filters
  • pkg/k8s/apis/cilium.io/v2
  • pkg/k8s/client/clientset/versioned, pkg/k8s/client/clientset/versioned/scheme
  • pkg/monitor/api
  • pkg/versioncheck

Transitive dependencies in cilium-cli

Non-Linux specific bits

Others

Related:
#15355
#16679
#16806
cilium/cilium-cli#231

Metadata

Metadata

Assignees

Labels

area/CI-improvementTopic or proposal to improve the Continuous Integration workflowkind/enhancementThis would improve or streamline existing functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions