flotta-operator

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 36 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

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 go run ./cmd/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 go run ./cmd/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 name>
    

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
Package v1alpha1 contains API Schema definitions for the management v1alpha1 API group +kubebuilder:object:generate=true +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
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/edgedeployment
Package edgedeployment is a generated GoMock package.
Package edgedeployment is a generated GoMock package.
repository/edgedevice
Package edgedevice is a generated GoMock package.
Package edgedevice is a generated GoMock package.
Package restapi FlottaManagement Flotta Edge Management Schemes: http 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 Consumes: - application/json Produces: - application/json swagger:meta
Package restapi FlottaManagement Flotta Edge Management Schemes: http 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 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