flotta-operator

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

README

Installation

To install the operator CRDs in the cluster pointed to by kubectl configuration execute (it may take some time):

make install

When the CRDs are present in the cluster, the operator can either be run outside or inside the cluster.

Prerequisites/Dependencies

Go

The operator requires Go 1.17, Go 1.18 is not supported yet.

podman

This project relies strongly on Podman. It is used in the edge devices and also in the operator. Supported Podman version is 3.4.4

cert-manager

We use admission webhooks for managing the CRDs. Therefore, there's a need for TLS certificates and keys management. When deploying in a cluster, webhooks are enabled and require cert-manager. Refer to its installation instructions for installing it.

Disabling webhooks is done by setting environment variable ENABLE_WEBHOOKS=false for the manager's container.

Getting started

Outside the cluster

Run make run to start the operator.

Inside the cluster

Deployment
  • Build and push operator images:

    IMG=<image repository and tag> make docker-build docker-push

    for example: IMG=quay.io/jdzon/flotta-operator:latest make docker-build docker-push

On OpenShift cluster
  • Deploy the operator: IMG=<image registry and tag> TARGET=ocp make deploy.
  • Get HTTP server address by running: HTTP_SERVER=$(oc get routes flotta-operator-controller-manager -n flotta --no-headers -o=custom-columns=HOST:.spec.host).
  • Start yggdrasil with from the yggdrasil repository directory:
     sudo ./yggd \
     --log-level info \
     --protocol http \
     --path-prefix api/flotta-management/v1 \
     --client-id $(cat /etc/machine-id) \
     --cert-file /etc/pki/consumer/cert.pem \
     --key-file /etc/pki/consumer/key.pem \
     --server $HTTP_SERVER
    
On minikube
  • Deploy the operator: IMG=<image registry and tag> HOST=<host name> TARGET=k8s make deploy.
  • Add to /etc/hosts: <minikube ip> <host name>.
  • Start yggdrasil with from the yggdrasil repository directory:
     sudo ./yggd \
     --log-level info \
     --protocol http \
     --path-prefix api/flotta-management/v1 \
     --client-id $(cat /etc/machine-id) \
     --cert-file /etc/pki/consumer/cert.pem \
     --key-file /etc/pki/consumer/key.pem \
     --server $HOST
    

In order to change the verbosity of the logger check out here.

For additional resources check out: metrics, grafana dashboard, device metrics, image registries.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package +groupName=management.project-flotta.io Package v1alpha1 contains API Schema definitions for the management v1alpha1 API group +kubebuilder:object:generate=true +groupName=management.project-flotta.io
+k8s:openapi-gen=true +k8s:deepcopy-gen=package +groupName=management.project-flotta.io Package v1alpha1 contains API Schema definitions for the management v1alpha1 API group +kubebuilder:object:generate=true +groupName=management.project-flotta.io
generated
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
internal
configmaps
Package configmaps is a generated GoMock package.
Package configmaps is a generated GoMock package.
devicemetrics
Package devicemetrics is a generated GoMock package.
Package devicemetrics is a generated GoMock package.
images
Package images is a generated GoMock package.
Package images is a generated GoMock package.
k8sclient
Package k8sclient is a generated GoMock package.
Package k8sclient is a generated GoMock package.
metrics
Package metrics is a generated GoMock package.
Package metrics is a generated GoMock package.
repository/edgedevice
Package edgedevice is a generated GoMock package.
Package edgedevice is a generated GoMock package.
repository/edgedeviceset
Package edgedeviceset is a generated GoMock package.
Package edgedeviceset is a generated GoMock package.
repository/edgedevicesignedrequest
Package edgedevicesignedrequest is a generated GoMock package.
Package edgedevicesignedrequest is a generated GoMock package.
repository/edgeworkload
Package edgeworkload is a generated GoMock package.
Package edgeworkload is a generated GoMock package.
pkg
Package restapi FlottaManagement Flotta Edge Management Schemes: https Host: localhost BasePath: /api/flotta-management/v1 Version: 1.0.0 License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0.html Contact: Flotta flotta<flotta@redhat.com> https://github.com/project-flotta Consumes: - application/json Produces: - application/json swagger:meta
Package restapi FlottaManagement Flotta Edge Management Schemes: https Host: localhost BasePath: /api/flotta-management/v1 Version: 1.0.0 License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0.html Contact: Flotta flotta<flotta@redhat.com> https://github.com/project-flotta Consumes: - application/json Produces: - application/json swagger:meta

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL