Skip to content

frelon/k8s-radio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K8s radio

An operator that exposes SDR devices to your kubernetes cluster using device-plugin.

Quickstart

This will:

  • Spin up a kind cluster
  • Build the container images
  • Load the images into the kind cluster
  • Deploy the manager, device-plugin and sample RtlSdrReceiver
make cluster
make docker-build
make cluster-load
make deploy

A sample RtlSdrReceiver that will tune to 101.9Mhz and expose the I/Q stream on the host-port 1234.

apiVersion: radio.frelon.se/v1beta1
kind: RtlSdrReceiver
metadata:
  name: rtlsdrreceiver-sample
spec:
  version: v3
  frequency: "101.9M"
  port:
    containerPort: 1234
    hostPort: 1234
    protocol: TCP

Deploy the Manager to the cluster with the image specified by IMG:

make deploy IMG=<some-registry>/k8s-radio:tag

NOTE: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin.

Create instances of your solution You can apply the samples (examples) from the config/sample:

kubectl apply -k config/samples/

NOTE: Ensure that the samples has default values to test it out.

To Uninstall

Delete the instances (CRs) from the cluster:

kubectl delete -k config/samples/

Delete the APIs(CRDs) from the cluster:

make uninstall

UnDeploy the controller from the cluster:

make undeploy

Project Distribution

Following the options to release and provide this solution to the users.

By providing a bundle with all YAML files

  1. Build the installer for the image built and published in the registry:
make build-installer IMG=<some-registry>/k8s-radio:tag

NOTE: The makefile target mentioned above generates an 'install.yaml' file in the dist directory. This file contains all the resources built with Kustomize, which are necessary to install this project without its dependencies.

  1. Using the installer

Users can just run 'kubectl apply -f ' to install the project, i.e.:

kubectl apply -f https://raw.githubusercontent.com/<org>/k8s-radio/<tag or branch>/dist/install.yaml

By providing a Helm Chart

  1. Build the chart using the optional helm plugin
kubebuilder edit --plugins=helm/v2-alpha
  1. See that a chart was generated under 'dist/chart', and users can obtain this solution from there.

NOTE: If you change the project, you need to update the Helm Chart using the same command above to sync the latest changes. Furthermore, if you create webhooks, you need to use the above command with the '--force' flag and manually ensure that any custom configuration previously added to 'dist/chart/values.yaml' or 'dist/chart/manager/manager.yaml' is manually re-applied afterwards.

Contributing

// TODO(user): Add detailed information on how you would like others to contribute to this project

NOTE: Run make help for more information on all potential make targets

More information can be found via the Kubebuilder Documentation

License

About

Use RTL-SDR radio dongles in cloud-native environments.

Topics

Resources

License

Stars

Watchers

Forks

Contributors